-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
67 lines (59 loc) · 1.82 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<style>
body {
margin: 0;
font-size: 16px;
height: 100vh;
}
#tiancai9-video {
width: 100%;
height: 400px;
}
@media(max-width:400px) {
#tiancai9-video {
width: 100%;
height: 200px;
}
}
</style>
<body>
<div id="tiancai9-video"></div>
</body>
<script type="module">
import TiancaiVideoHls from '/src/main.js'
// import TiancaiVideoHls from './dist/tiancai-video-hls.js'
// import './dist/style.css'
const video = new TiancaiVideoHls({
autoPlay: false,
onHandle: {
onError: () => { console.log('onError') },
onSuccee: () => { console.log(`onSuccee`) },
onProgress: () => { console.log(`onProgress`) },
onPlaying: () => { console.log(`onPlaying`) },
onEnded: () => { console.log(`onEnded`) },
onPause: () => { console.log(`onPause`) },
onPlay: () => { console.log(`onPlay`) },
onCanplay: () => { console.log(`onCanplay`) }
},
box: document.getElementById('tiancai9-video'),
sources: ['http://127.0.0.1:3000/1.mp4', 'https://c3.monidai.com/20231119/JqT4DANw/index.m3u8', 'https://c3.monid43ai.com/202', 'https://c354.mon424idai.com/202']
})
window.video = video
</script>
<!-- <link rel="stylesheet" href="./dist/style.css" type="text/css">
<script src="./dist/tiancai-video-hls.umd.cjs"></script>
<script>
const video = new TiancaiVideoHls({
box: document.getElementById('tiancai9-video'),
sources: ['http://127.0.0.1:3000/1.mp4', 'https://c3.monidai.com/20231119/JqT4DANw/index.m3u8', 'https://c3.monid43ai.com/202', 'https://c354.mon424idai.com/202']
})
window.video = video
</script> -->
</html>