-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.html
66 lines (59 loc) · 1.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
<script src="./dist/player.umd.js"></script>
<!-- 在vite dev模式下使用 -->
<script type="module" src="./src/index.ts"></script>
<title>RunKePlayer</title>
<style>
html,
body {
width: 100%;
height: 100%;
}
#video {
height: 300px;
width: 600px;
resize: both;
overflow: auto;
margin: 100px auto;
}
</style>
</head>
<body>
<svg width="24" height="24" viewBox="0 0 24 24">
<path d="" fill="black"></path>
</svg>
<div id="video"></div>
<h3 style="color: rgb(89, 0, 0);font-size: 18px;">该代码仅供示例,所获取的video链接与弹幕连接均已失效,请自行更换为自己的链接</h3>
<script>
window.onload = function () {
let player = new Player.default({
url: 'https://novaex.cc/fireworks.mp4',
container: document.getElementById('video'),
streamPlay: true,
thumbnails: {
// 缩略图设置选项
col: 1,
row: 47,
total: 47,
source: 'https://novaex.cc/sprites.png',
interval: 6,
},
danmaku: {
//弹幕
open: true,
api: 'https://bilibili-service.vercel.app/api/danmaku',
type: 'http',
timeout: 5000,
},
title: 'hi!你好!我叫佐伊,你叫什么?',
})
}
</script>
</body>
</html>