-
Notifications
You must be signed in to change notification settings - Fork 304
/
componentadd.html
83 lines (79 loc) · 2 KB
/
componentadd.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!Doctype html>
<html xmlns=http://www.w3.org/1999/xhtml> <head>
<meta http-equiv=Content-Type content="text/html;charset=utf-8">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
<meta content=always name=referrer>
<link rel="shortcut icon" href=/favicon.ico type=image/x-icon> <title>H.265在线播放器DEMO</title>
<link rel="stylesheet" href="../dist/goldplay-h265.css">
<script src="../dist/goldplay-h265-sdk.js"></script>
<style>
.play-container {
width: 800px;
height: 600px;
/* background-color: #000; */
margin: 20px 0 0 100px;
float:left;
}
.inline {
display: inline-block;
width: 50px;
}
.play-container2 {
width: 300px;
height: 400px;
background-color: red;
margin: 0 0 0 100px;
float:left;
}
code {
font-family: Arial,Helvetica,sans-serif;
color: #476582;
padding: .25rem .5rem;
margin: 0;
font-size: .85em;
background-color: #e6effb;
border-radius: 3px;
}
code.desc {
background-color: rgba(27,31,35,.05);
}
.goldplay__control--testcom {
display: inline-block;
color: #ccc;
vertical-align: middle;
margin: -14px 10px 0 0;
}
</style>
</head>
<body>
<div id="PlayerWrapper">
<div class="play-container"></div>
</div>
<br clear="all">
<br>
<script type="module">
//load compoent
import './component.js'
(function (win, doc) {
const Config = {
get buildPath() {
let path = win.location.origin
let pathname = win.location.pathname
let demoIdx = pathname.lastIndexOf('/demo/')
return path + pathname.substr(0, demoIdx) + '/dist/'
},
get libPath() {
return this.buildPath + 'lib/'
}
}
let el = doc.querySelector('.play-container')
let player = new GoldPlay(el, {
sourceURL: 'http://localhost:9011/gitwork/date/265/playlist.m3u8',
type: 'HLS',
libPath: Config.libPath,
playBackRate: 1
})
})(window, document)
</script>
</body>
</html>