-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtbVideo.html
70 lines (64 loc) · 1.96 KB
/
tbVideo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>淘宝返利教程</title>
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/video-js.css">
<style>
body,
html {
width: 100%;
height: 100%
}
#my-video {
width: 100%;
height: 100%
}
</style>
</head>
<body>
<div class="m" style="width:100%;height:100%;background:#000">
<video id="my-video" controls preload="auto" poster="./img/tbPoster.jpg" data-setup="{}" webkit-playsinline="true" playsinline="true">
<source class="videoSrc" src="https://zhishun520.com/asset/video/tbTutorial.mp4" type="video/mp4">
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
</div>
</body>
<script src="./js/zepto.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="./js/fastclick.js"></script>
<script>
"addEventListener" in document && document.addEventListener("DOMContentLoaded", function() {
FastClick.attach(document.body)
}, !1);
var userID = getUrlParams("userId"),
myVid = document.getElementById("my-video");
function update() {
axios({
url: "/taoBao/shop/video",
method: "get",
baseURL: ajaxUrl,
params: {
userId: userID,
type: 7
}
}).then(function(e) {
console.log("同步数据", e)
}).catch(function(e) {
console.log(e)
})
}
function getUrlParams(e) {
var t = new RegExp("(^|&)" + e + "=([^&]*)(&|$)", "i"),
n = window.location.search.substr(1).match(t);
return null != n ? unescape(n[2]) : null
}
ajaxUrl = "https://zhishun520.com/zaotoutiao-api-home-1.0.0", myVid.onplay = function() {
userID && "null" !== userID && setTimeout(update, 2e3)
}
</script>
</html>