forked from bytedance/xgplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (47 loc) · 1.13 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,minimal-ui"
/>
<meta name="referrer" content="no-referrer" />
<title>播放器</title>
<style type="text/css">
html,
body {
width: 100%;
height: 100%;
margin: auto;
overflow: hidden;
}
body {
display: flex;
}
#mse {
flex: auto;
}
</style>
<script type="text/javascript">
window.addEventListener("resize", function () {
document.getElementById("mse").style.height = window.innerHeight + "px";
});
</script>
</head>
<body>
<div id="mse"></div>
<script src="./packages/xgplayer/browser/index.js" charset="utf-8"></script>
<script type="text/javascript">
let player = new Player({
id: "mse",
autoplay: true,
volume: 0.3,
url: "/test.mp4",
playsinline: true,
height: window.innerHeight,
width: window.innerWidth
});
</script>
</body>
</html>