-
Notifications
You must be signed in to change notification settings - Fork 17
/
pm3u8.html
30 lines (30 loc) · 956 Bytes
/
pm3u8.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
<!DOCTYPE html>
<html lang="en">
<head>
<title>COS 音视频</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<script src="https://cdn.jsdelivr.net/npm/hls.js@1.1.5/dist/hls.min.js"></script>
<style>
html, body{
margin: 0;
padding: 0;
overflow: hidden;
width: 100%;
}
</style>
</head>
<body>
<div id="dplayer" style="width: 100%; height:450px"></div>
<script src="https://cdn.jsdelivr.net/npm/dplayer@1.26.0/dist/DPlayer.min.js"></script>
<script>
const dp = new DPlayer({
container: document.getElementById('dplayer'),
// 关于 pm3u8 详情请查看相关文档:https://cloud.tencent.com/document/product/436/73189
video: {
url: 'https://cos-video-1258344699.cos.ap-guangzhou.myqcloud.com/hls/test.m3u8?ci-process=pm3u8&expires=3600',
},
});
</script>
</body>
</html>