Files
ClassContent/历届学生/韩想/项目开发/练习项目/仿快手/赵俊凯/play.html
2024-09-27 02:06:13 +08:00

45 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./css/clear.css">
<link rel="stylesheet" href="./css/public.css">
<link rel="stylesheet" href="./css/play.css">
</head>
<body>
<div class="shiping">
<div class="fanhui">
<a href="./index.html">x</a>
</div>
<video id="video_player" controls src=""></video>
</div>
</body>
<script src="./js/ajax.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script src="./js/utils.js"></script>
<script src="./js/play.js"></script>
<script>
var video = document.querySelector("video")
http({
url: 'http://127.0.0.1:3000/api/play',
method: 'GET',
data: {
principalId: GetQueryString("uid"),
photoId: GetQueryString("vid")
},
success: function (res) {
console.log(res)
video.src = res.playUrl
video.poster = res.poster
}
})
function zd(){
document.getElementById("video_player").setAttribute('autoplay', true);
}
window.onload=function(){
zd();
}
</script>
</html>