-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
69 lines (62 loc) · 1.7 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
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
}
html,
body {
height: 100%;
}
.wrapper {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
#video {
width: 600px;
height: 400px;
box-shadow: 0 0 10px rgba(100, 100, 100, 0.3);
outline: none;
}
</style>
</head>
<body>
<div class="wrapper">
<video controls id="video"></video>
</div>
<script src="/bundle.js"></script>
<script>
var config = {
req: "http://127.0.0.1:8123/video/TQ2Ytc3g1Pw/160.mp4",
thread: 2,
thunk: 81920,
start: 0,
end: 1670400
}
var loader = new fastloadjs(config);
// loader.save("1.mp4")
loader.attach(document.querySelector('#video'), [
{
req: "http://127.0.0.1:8123/video/TQ2Ytc3g1Pw/160.mp4",
init: { start: 0, end: 709 },
index: { start: 710, end: 1281 },
mimeCodec: 'video/mp4; codecs="avc1.4d400c"',
},
{
req: "http://127.0.0.1:8123/video/TQ2Ytc3g1Pw/140.mp4",
init: { start: 0, end: 591 },
index: { start: 592, end: 899 },
mimeCodec: 'audio/mp4; codecs="mp4a.40.2"'
}
])
</script>
</body>
</html>