tcplayer.js 4.7.0 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/console/vod-player-v3.html +125 -0
- package/dist/console/vod-player.html +124 -0
- package/dist/examples/vod/7447398155146701990.jpg +0 -0
- package/dist/examples/vod/7447398155146701990.vtt +301 -0
- package/dist/examples/vod/tcplayer-av1.html +123 -0
- package/dist/examples/vod/tcplayer-vod-all.html +135 -0
- package/dist/examples/vod/tcplayer-vod-audio-tracks.html +66 -0
- package/dist/examples/vod/tcplayer-vod-base-flash.html +64 -0
- package/dist/examples/vod/tcplayer-vod-base-native-control.html +68 -0
- package/dist/examples/vod/tcplayer-vod-base-v4-dash.html +84 -0
- package/dist/examples/vod/tcplayer-vod-base-v4-quality-api.html +90 -0
- package/dist/examples/vod/tcplayer-vod-base-v4.html +78 -0
- package/dist/examples/vod/tcplayer-vod-base.html +76 -0
- package/dist/examples/vod/tcplayer-vod-change-file-statistic.html +79 -0
- package/dist/examples/vod/tcplayer-vod-change-file.html +76 -0
- package/dist/examples/vod/tcplayer-vod-continue-play-by-fileid.html +70 -0
- package/dist/examples/vod/tcplayer-vod-continue-play-by-url.html +72 -0
- package/dist/examples/vod/tcplayer-vod-costom-host.html +66 -0
- package/dist/examples/vod/tcplayer-vod-custom-enter-full-viewport.html +88 -0
- package/dist/examples/vod/tcplayer-vod-custom-ui.html +98 -0
- package/dist/examples/vod/tcplayer-vod-definition.html +71 -0
- package/dist/examples/vod/tcplayer-vod-drm-fairplay.html +165 -0
- package/dist/examples/vod/tcplayer-vod-drm-token-auto.html +101 -0
- package/dist/examples/vod/tcplayer-vod-drm-token.html +156 -0
- package/dist/examples/vod/tcplayer-vod-drm-widevine.html +165 -0
- package/dist/examples/vod/tcplayer-vod-drm.html +164 -0
- package/dist/examples/vod/tcplayer-vod-dynamic-watermark.html +85 -0
- package/dist/examples/vod/tcplayer-vod-enter-full-viewport.html +87 -0
- package/dist/examples/vod/tcplayer-vod-event.html +93 -0
- package/dist/examples/vod/tcplayer-vod-ghost-watermark.html +48 -0
- package/dist/examples/vod/tcplayer-vod-hls-decrypt-key-tool.html +215 -0
- package/dist/examples/vod/tcplayer-vod-hls-decrypt-key.html +76 -0
- package/dist/examples/vod/tcplayer-vod-hls-encrypt-private.html +97 -0
- package/dist/examples/vod/tcplayer-vod-hls-encrypt.html +61 -0
- package/dist/examples/vod/tcplayer-vod-hls-masterplaylist.html +65 -0
- package/dist/examples/vod/tcplayer-vod-hls-token.html +67 -0
- package/dist/examples/vod/tcplayer-vod-image-patch.html +66 -0
- package/dist/examples/vod/tcplayer-vod-key.html +87 -0
- package/dist/examples/vod/tcplayer-vod-level-switch-tips.html +85 -0
- package/dist/examples/vod/tcplayer-vod-logo.html +72 -0
- package/dist/examples/vod/tcplayer-vod-mirror.html +66 -0
- package/dist/examples/vod/tcplayer-vod-mutil.html +68 -0
- package/dist/examples/vod/tcplayer-vod-no-control.html +62 -0
- package/dist/examples/vod/tcplayer-vod-no-progress.html +64 -0
- package/dist/examples/vod/tcplayer-vod-playlist.html +76 -0
- package/dist/examples/vod/tcplayer-vod-preload.html +74 -0
- package/dist/examples/vod/tcplayer-vod-progress-marker.html +64 -0
- package/dist/examples/vod/tcplayer-vod-refer.html +84 -0
- package/dist/examples/vod/tcplayer-vod-size-adaptive.html +70 -0
- package/dist/examples/vod/tcplayer-vod-size-full-viewport.html +68 -0
- package/dist/examples/vod/tcplayer-vod-size.html +70 -0
- package/dist/examples/vod/tcplayer-vod-vtt-thumbnail-src.html +71 -0
- package/dist/examples/vod/tcplayer-vod-vtt-thumbnail.html +65 -0
- package/dist/examples/vod/tcplayer-vod-x5-playsinline.html +65 -0
- package/dist/examples/vod/tcplayer-vod-x5.html +66 -0
- package/dist/examples/vod/typlayer-vod-dynamic-init.html +129 -0
- package/dist/examples/webrtc/tcplayer-src-dynamic.html +92 -0
- package/dist/examples/webrtc/tcplayer-src-meeting.html +193 -0
- package/dist/examples/webrtc/tcplayer-src-webrtc-abr.html +236 -0
- package/dist/examples/webrtc/tcplayer-src-webrtc-autoplay.html +124 -0
- package/dist/examples/webrtc/tcplayer-src-webrtc-change-src.html +189 -0
- package/dist/examples/webrtc/tcplayer-src-webrtc-mutilRes.html +142 -0
- package/dist/examples/webrtc/tcplayer-src-webrtc.html +165 -0
- package/dist/libs/TXLivePlayer-1.3.0.min.js +1 -0
- package/dist/libs/dash.all.min.v3.1.3.js +0 -20
- package/dist/libs/hlsp2p.min.1.6.28.js +3 -0
- package/dist/libs/qvbp2p_common.min.1.8.29.js +1 -0
- package/dist/tcplayer.css +2529 -0
- package/dist/tcplayer.min.css +1 -1
- package/dist/tcplayer.v4.8.0.min.js +17 -0
- package/package.json +2 -4
- package/dist/libs/TXLivePlayer-1.2.3.min.js +0 -1
- package/dist/libs/dash.all.min.2.9.3.js +0 -32
- package/dist/libs/dash.all.min.4.4.1.js +0 -0
- package/dist/libs/flv.min.1.5.js +0 -7
- package/dist/libs/flv.min.1.6.2.js +0 -10
- package/dist/libs/hls.min.0.12.4.js +0 -2
- package/dist/libs/hls.min.0.13.2m.js +0 -4
- package/dist/libs/hls.min.1.1.5.js +0 -28831
- package/dist/tcplayer.v4.7.0.min.js +0 -17
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
|
|
7
|
+
<title></title>
|
|
8
|
+
<link href="//imgcache.qq.com/open/qcloud/video/tcplayer/tcplayer.css" rel="stylesheet">
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/ie8/videojs-ie8.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/libs/hls.min.0.12.4.js"></script>
|
|
13
|
+
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/libs/dash.all.min.2.9.3.js"></script>
|
|
14
|
+
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/tcplayer.min.js"></script>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
html,body{
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
.tcp-skin{
|
|
22
|
+
margin:0 auto;
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
25
|
+
</head>
|
|
26
|
+
<body>
|
|
27
|
+
|
|
28
|
+
<video id="player" preload="auto" playsinline webkit-playsinline>
|
|
29
|
+
</video>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
(function(){
|
|
33
|
+
function getParams(name) {
|
|
34
|
+
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
|
|
35
|
+
var r = window.location.search.substr(1).match(reg);
|
|
36
|
+
if (r != null) {
|
|
37
|
+
return decodeURIComponent(r[2]);
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
function getPathParams(){
|
|
42
|
+
var path = location.pathname.split('/');
|
|
43
|
+
if(path[1] == 'vod-player'){
|
|
44
|
+
return{
|
|
45
|
+
'path' : '//'+location.host + path.slice(0, 4).join('/'),
|
|
46
|
+
'appID' : path[2],
|
|
47
|
+
'fileID' : path[3]
|
|
48
|
+
}
|
|
49
|
+
}else{
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
function getViewportSize(){
|
|
54
|
+
var doc = document;
|
|
55
|
+
var docE = doc.documentElement;
|
|
56
|
+
var body = doc.body;
|
|
57
|
+
return {
|
|
58
|
+
'width': (docE && docE.clientWidth) || (body && body.offsetWidth) || window.innerWidth || 0,
|
|
59
|
+
'height': (docE && docE.clientHeight) || (body && body.offsetHeight) || window.innerHeight || 0
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
var fileID = getParams('fileID'),
|
|
63
|
+
appID = getParams('appID'),
|
|
64
|
+
width = getParams('width'),
|
|
65
|
+
height = getParams('height'),
|
|
66
|
+
autoplay = (getParams('autoplay') == 'true' ? true : false),
|
|
67
|
+
ssign = getParams('ssign'),
|
|
68
|
+
t = getParams('t'),
|
|
69
|
+
us = getParams('us'),
|
|
70
|
+
sign = getParams('sign'),
|
|
71
|
+
exper = getParams('exper'),
|
|
72
|
+
playerID = getParams('playerID'),
|
|
73
|
+
definition = getParams('definition'),
|
|
74
|
+
playDefinition = getParams('playDefinition'),
|
|
75
|
+
swf = (function(){
|
|
76
|
+
var params = getPathParams();
|
|
77
|
+
if(params){
|
|
78
|
+
return params.path +'/tcplayer/player.swf';
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
// 避免设置宽度超过页面宽度,进行等比缩放。
|
|
82
|
+
var vpSize = getViewportSize();
|
|
83
|
+
if(vpSize['width'] < width){
|
|
84
|
+
height = vpSize['width']*height/width;
|
|
85
|
+
width = vpSize['width'];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
var options = {
|
|
89
|
+
appID : appID,
|
|
90
|
+
fileID: fileID,
|
|
91
|
+
playerID: playerID,
|
|
92
|
+
definition: definition,
|
|
93
|
+
t: t,
|
|
94
|
+
us: us,
|
|
95
|
+
sign: sign,
|
|
96
|
+
exper: exper,
|
|
97
|
+
autoplay: autoplay,
|
|
98
|
+
width: width,
|
|
99
|
+
height: height,
|
|
100
|
+
swf: swf
|
|
101
|
+
};
|
|
102
|
+
// IE10\9\8在iframe中无法使用全屏按钮
|
|
103
|
+
if(TCPlayer.browser.IE_VERSION && TCPlayer.browser.IE_VERSION < 11 && window != window.top){
|
|
104
|
+
options['controlBar']={
|
|
105
|
+
'fullscreenToggle': false
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if(ssign){
|
|
109
|
+
options['ssign'] = ssign;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
var pathParams = getPathParams();
|
|
113
|
+
if(pathParams){
|
|
114
|
+
options.appID = options.appID || pathParams.appID;
|
|
115
|
+
options.fileID = options.fileID || pathParams.fileID;
|
|
116
|
+
options.playDefinition = options.playDefinition || pathParams.playDefinition;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
var player = TCPlayer('player', options);
|
|
120
|
+
window.player = player;
|
|
121
|
+
|
|
122
|
+
})();
|
|
123
|
+
</script>
|
|
124
|
+
</body>
|
|
125
|
+
</html>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
|
|
7
|
+
<title></title>
|
|
8
|
+
<link href="//imgcache.qq.com/open/qcloud/video/tcplayer/tcplayer.css" rel="stylesheet">
|
|
9
|
+
<!--[if lt IE 9]>
|
|
10
|
+
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/ie8/videojs-ie8.js"></script>
|
|
11
|
+
<![endif]-->
|
|
12
|
+
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/libs/hls.min.0.13.2m.js"></script>
|
|
13
|
+
<script src="//imgcache.qq.com/open/qcloud/video/tcplayer/tcplayer.v4.1.min.js"></script>
|
|
14
|
+
|
|
15
|
+
<style>
|
|
16
|
+
html,body{
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
.tcp-skin{
|
|
21
|
+
margin:0 auto;
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
24
|
+
</head>
|
|
25
|
+
<body>
|
|
26
|
+
|
|
27
|
+
<video id="player" preload="auto" playsinline webkit-playsinline>
|
|
28
|
+
</video>
|
|
29
|
+
|
|
30
|
+
<script>
|
|
31
|
+
(function(){
|
|
32
|
+
function getParams(name) {
|
|
33
|
+
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
|
|
34
|
+
var r = window.location.search.substr(1).match(reg);
|
|
35
|
+
if (r != null) {
|
|
36
|
+
return decodeURIComponent(r[2]);
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
function getPathParams(){
|
|
41
|
+
var path = location.pathname.split('/');
|
|
42
|
+
if(path[1] == 'vod-player'){
|
|
43
|
+
return{
|
|
44
|
+
'path' : '//'+location.host + path.slice(0, 4).join('/'),
|
|
45
|
+
'appID' : path[2],
|
|
46
|
+
'fileID' : path[3]
|
|
47
|
+
}
|
|
48
|
+
}else{
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function getViewportSize(){
|
|
53
|
+
var doc = document;
|
|
54
|
+
var docE = doc.documentElement;
|
|
55
|
+
var body = doc.body;
|
|
56
|
+
return {
|
|
57
|
+
'width': (docE && docE.clientWidth) || (body && body.offsetWidth) || window.innerWidth || 0,
|
|
58
|
+
'height': (docE && docE.clientHeight) || (body && body.offsetHeight) || window.innerHeight || 0
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
var fileID = getParams('fileID'),
|
|
62
|
+
appID = getParams('appID'),
|
|
63
|
+
width = getParams('width'),
|
|
64
|
+
height = getParams('height'),
|
|
65
|
+
autoplay = (getParams('autoplay') == 'true' ? true : false),
|
|
66
|
+
ssign = getParams('ssign'),
|
|
67
|
+
t = getParams('t'),
|
|
68
|
+
us = getParams('us'),
|
|
69
|
+
sign = getParams('sign'),
|
|
70
|
+
exper = getParams('exper'),
|
|
71
|
+
psign = getParams('psign'),
|
|
72
|
+
playerID = getParams('playerID'),
|
|
73
|
+
definition = getParams('definition'),
|
|
74
|
+
swf = (function(){
|
|
75
|
+
var params = getPathParams();
|
|
76
|
+
if(params){
|
|
77
|
+
return params.path +'/tcplayer/player.swf';
|
|
78
|
+
}
|
|
79
|
+
})();
|
|
80
|
+
// 避免设置宽度超过页面宽度,进行等比缩放。
|
|
81
|
+
var vpSize = getViewportSize();
|
|
82
|
+
if(vpSize['width'] < width){
|
|
83
|
+
height = vpSize['width']*height/width;
|
|
84
|
+
width = vpSize['width'];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var options = {
|
|
88
|
+
appID : appID,
|
|
89
|
+
fileID: fileID,
|
|
90
|
+
playerID: playerID,
|
|
91
|
+
definition: definition,
|
|
92
|
+
t: t,
|
|
93
|
+
us: us,
|
|
94
|
+
sign: sign,
|
|
95
|
+
exper: exper,
|
|
96
|
+
autoplay: autoplay,
|
|
97
|
+
width: width,
|
|
98
|
+
height: height,
|
|
99
|
+
swf: swf,
|
|
100
|
+
psign: psign
|
|
101
|
+
};
|
|
102
|
+
// IE10\9\8在iframe中无法使用全屏按钮
|
|
103
|
+
if(TCPlayer.browser.IE_VERSION && TCPlayer.browser.IE_VERSION < 11 && window != window.top){
|
|
104
|
+
options['controlBar']={
|
|
105
|
+
'fullscreenToggle': false
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if(ssign){
|
|
109
|
+
options['ssign'] = ssign;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
var pathParams = getPathParams();
|
|
113
|
+
if(pathParams){
|
|
114
|
+
options.appID = options.appID || pathParams.appID;
|
|
115
|
+
options.fileID = options.fileID || pathParams.fileID;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
var player = TCPlayer('player', options);
|
|
119
|
+
window.player = player;
|
|
120
|
+
|
|
121
|
+
})();
|
|
122
|
+
</script>
|
|
123
|
+
</body>
|
|
124
|
+
</html>
|
|
Binary file
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
WEBVTT
|
|
2
|
+
|
|
3
|
+
00:00:00.000 --> 00:00:00.610
|
|
4
|
+
7447398155146701990.jpg#xywh=0,0,142,80
|
|
5
|
+
|
|
6
|
+
00:00:00.610 --> 00:00:01.220
|
|
7
|
+
7447398155146701990.jpg#xywh=142,0,142,80
|
|
8
|
+
|
|
9
|
+
00:00:01.220 --> 00:00:01.830
|
|
10
|
+
7447398155146701990.jpg#xywh=284,0,142,80
|
|
11
|
+
|
|
12
|
+
00:00:01.830 --> 00:00:02.440
|
|
13
|
+
7447398155146701990.jpg#xywh=426,0,142,80
|
|
14
|
+
|
|
15
|
+
00:00:02.440 --> 00:00:03.050
|
|
16
|
+
7447398155146701990.jpg#xywh=568,0,142,80
|
|
17
|
+
|
|
18
|
+
00:00:03.050 --> 00:00:03.660
|
|
19
|
+
7447398155146701990.jpg#xywh=710,0,142,80
|
|
20
|
+
|
|
21
|
+
00:00:03.660 --> 00:00:04.270
|
|
22
|
+
7447398155146701990.jpg#xywh=852,0,142,80
|
|
23
|
+
|
|
24
|
+
00:00:04.270 --> 00:00:04.880
|
|
25
|
+
7447398155146701990.jpg#xywh=994,0,142,80
|
|
26
|
+
|
|
27
|
+
00:00:04.880 --> 00:00:05.490
|
|
28
|
+
7447398155146701990.jpg#xywh=1136,0,142,80
|
|
29
|
+
|
|
30
|
+
00:00:05.490 --> 00:00:06.100
|
|
31
|
+
7447398155146701990.jpg#xywh=1278,0,142,80
|
|
32
|
+
|
|
33
|
+
00:00:06.100 --> 00:00:06.710
|
|
34
|
+
7447398155146701990.jpg#xywh=0,80,142,80
|
|
35
|
+
|
|
36
|
+
00:00:06.710 --> 00:00:07.320
|
|
37
|
+
7447398155146701990.jpg#xywh=142,80,142,80
|
|
38
|
+
|
|
39
|
+
00:00:07.320 --> 00:00:07.930
|
|
40
|
+
7447398155146701990.jpg#xywh=284,80,142,80
|
|
41
|
+
|
|
42
|
+
00:00:07.930 --> 00:00:08.540
|
|
43
|
+
7447398155146701990.jpg#xywh=426,80,142,80
|
|
44
|
+
|
|
45
|
+
00:00:08.540 --> 00:00:09.150
|
|
46
|
+
7447398155146701990.jpg#xywh=568,80,142,80
|
|
47
|
+
|
|
48
|
+
00:00:09.150 --> 00:00:09.760
|
|
49
|
+
7447398155146701990.jpg#xywh=710,80,142,80
|
|
50
|
+
|
|
51
|
+
00:00:09.760 --> 00:00:10.370
|
|
52
|
+
7447398155146701990.jpg#xywh=852,80,142,80
|
|
53
|
+
|
|
54
|
+
00:00:10.370 --> 00:00:10.980
|
|
55
|
+
7447398155146701990.jpg#xywh=994,80,142,80
|
|
56
|
+
|
|
57
|
+
00:00:10.980 --> 00:00:11.590
|
|
58
|
+
7447398155146701990.jpg#xywh=1136,80,142,80
|
|
59
|
+
|
|
60
|
+
00:00:11.590 --> 00:00:12.200
|
|
61
|
+
7447398155146701990.jpg#xywh=1278,80,142,80
|
|
62
|
+
|
|
63
|
+
00:00:12.200 --> 00:00:12.810
|
|
64
|
+
7447398155146701990.jpg#xywh=0,160,142,80
|
|
65
|
+
|
|
66
|
+
00:00:12.810 --> 00:00:13.420
|
|
67
|
+
7447398155146701990.jpg#xywh=142,160,142,80
|
|
68
|
+
|
|
69
|
+
00:00:13.420 --> 00:00:14.030
|
|
70
|
+
7447398155146701990.jpg#xywh=284,160,142,80
|
|
71
|
+
|
|
72
|
+
00:00:14.030 --> 00:00:14.640
|
|
73
|
+
7447398155146701990.jpg#xywh=426,160,142,80
|
|
74
|
+
|
|
75
|
+
00:00:14.640 --> 00:00:15.250
|
|
76
|
+
7447398155146701990.jpg#xywh=568,160,142,80
|
|
77
|
+
|
|
78
|
+
00:00:15.250 --> 00:00:15.860
|
|
79
|
+
7447398155146701990.jpg#xywh=710,160,142,80
|
|
80
|
+
|
|
81
|
+
00:00:15.860 --> 00:00:16.470
|
|
82
|
+
7447398155146701990.jpg#xywh=852,160,142,80
|
|
83
|
+
|
|
84
|
+
00:00:16.470 --> 00:00:17.080
|
|
85
|
+
7447398155146701990.jpg#xywh=994,160,142,80
|
|
86
|
+
|
|
87
|
+
00:00:17.080 --> 00:00:17.690
|
|
88
|
+
7447398155146701990.jpg#xywh=1136,160,142,80
|
|
89
|
+
|
|
90
|
+
00:00:17.690 --> 00:00:18.300
|
|
91
|
+
7447398155146701990.jpg#xywh=1278,160,142,80
|
|
92
|
+
|
|
93
|
+
00:00:18.300 --> 00:00:18.910
|
|
94
|
+
7447398155146701990.jpg#xywh=0,240,142,80
|
|
95
|
+
|
|
96
|
+
00:00:18.910 --> 00:00:19.520
|
|
97
|
+
7447398155146701990.jpg#xywh=142,240,142,80
|
|
98
|
+
|
|
99
|
+
00:00:19.520 --> 00:00:20.130
|
|
100
|
+
7447398155146701990.jpg#xywh=284,240,142,80
|
|
101
|
+
|
|
102
|
+
00:00:20.130 --> 00:00:20.740
|
|
103
|
+
7447398155146701990.jpg#xywh=426,240,142,80
|
|
104
|
+
|
|
105
|
+
00:00:20.740 --> 00:00:21.350
|
|
106
|
+
7447398155146701990.jpg#xywh=568,240,142,80
|
|
107
|
+
|
|
108
|
+
00:00:21.350 --> 00:00:21.960
|
|
109
|
+
7447398155146701990.jpg#xywh=710,240,142,80
|
|
110
|
+
|
|
111
|
+
00:00:21.960 --> 00:00:22.570
|
|
112
|
+
7447398155146701990.jpg#xywh=852,240,142,80
|
|
113
|
+
|
|
114
|
+
00:00:22.570 --> 00:00:23.180
|
|
115
|
+
7447398155146701990.jpg#xywh=994,240,142,80
|
|
116
|
+
|
|
117
|
+
00:00:23.180 --> 00:00:23.790
|
|
118
|
+
7447398155146701990.jpg#xywh=1136,240,142,80
|
|
119
|
+
|
|
120
|
+
00:00:23.790 --> 00:00:24.400
|
|
121
|
+
7447398155146701990.jpg#xywh=1278,240,142,80
|
|
122
|
+
|
|
123
|
+
00:00:24.400 --> 00:00:25.010
|
|
124
|
+
7447398155146701990.jpg#xywh=0,320,142,80
|
|
125
|
+
|
|
126
|
+
00:00:25.010 --> 00:00:25.620
|
|
127
|
+
7447398155146701990.jpg#xywh=142,320,142,80
|
|
128
|
+
|
|
129
|
+
00:00:25.620 --> 00:00:26.230
|
|
130
|
+
7447398155146701990.jpg#xywh=284,320,142,80
|
|
131
|
+
|
|
132
|
+
00:00:26.230 --> 00:00:26.840
|
|
133
|
+
7447398155146701990.jpg#xywh=426,320,142,80
|
|
134
|
+
|
|
135
|
+
00:00:26.840 --> 00:00:27.450
|
|
136
|
+
7447398155146701990.jpg#xywh=568,320,142,80
|
|
137
|
+
|
|
138
|
+
00:00:27.450 --> 00:00:28.060
|
|
139
|
+
7447398155146701990.jpg#xywh=710,320,142,80
|
|
140
|
+
|
|
141
|
+
00:00:28.060 --> 00:00:28.670
|
|
142
|
+
7447398155146701990.jpg#xywh=852,320,142,80
|
|
143
|
+
|
|
144
|
+
00:00:28.670 --> 00:00:29.280
|
|
145
|
+
7447398155146701990.jpg#xywh=994,320,142,80
|
|
146
|
+
|
|
147
|
+
00:00:29.280 --> 00:00:29.890
|
|
148
|
+
7447398155146701990.jpg#xywh=1136,320,142,80
|
|
149
|
+
|
|
150
|
+
00:00:29.890 --> 00:00:30.500
|
|
151
|
+
7447398155146701990.jpg#xywh=1278,320,142,80
|
|
152
|
+
|
|
153
|
+
00:00:30.500 --> 00:00:31.110
|
|
154
|
+
7447398155146701990.jpg#xywh=0,400,142,80
|
|
155
|
+
|
|
156
|
+
00:00:31.110 --> 00:00:31.720
|
|
157
|
+
7447398155146701990.jpg#xywh=142,400,142,80
|
|
158
|
+
|
|
159
|
+
00:00:31.720 --> 00:00:32.330
|
|
160
|
+
7447398155146701990.jpg#xywh=284,400,142,80
|
|
161
|
+
|
|
162
|
+
00:00:32.330 --> 00:00:32.940
|
|
163
|
+
7447398155146701990.jpg#xywh=426,400,142,80
|
|
164
|
+
|
|
165
|
+
00:00:32.940 --> 00:00:33.550
|
|
166
|
+
7447398155146701990.jpg#xywh=568,400,142,80
|
|
167
|
+
|
|
168
|
+
00:00:33.550 --> 00:00:34.160
|
|
169
|
+
7447398155146701990.jpg#xywh=710,400,142,80
|
|
170
|
+
|
|
171
|
+
00:00:34.160 --> 00:00:34.770
|
|
172
|
+
7447398155146701990.jpg#xywh=852,400,142,80
|
|
173
|
+
|
|
174
|
+
00:00:34.770 --> 00:00:35.380
|
|
175
|
+
7447398155146701990.jpg#xywh=994,400,142,80
|
|
176
|
+
|
|
177
|
+
00:00:35.380 --> 00:00:35.990
|
|
178
|
+
7447398155146701990.jpg#xywh=1136,400,142,80
|
|
179
|
+
|
|
180
|
+
00:00:35.990 --> 00:00:36.600
|
|
181
|
+
7447398155146701990.jpg#xywh=1278,400,142,80
|
|
182
|
+
|
|
183
|
+
00:00:36.600 --> 00:00:37.210
|
|
184
|
+
7447398155146701990.jpg#xywh=0,480,142,80
|
|
185
|
+
|
|
186
|
+
00:00:37.210 --> 00:00:37.820
|
|
187
|
+
7447398155146701990.jpg#xywh=142,480,142,80
|
|
188
|
+
|
|
189
|
+
00:00:37.820 --> 00:00:38.430
|
|
190
|
+
7447398155146701990.jpg#xywh=284,480,142,80
|
|
191
|
+
|
|
192
|
+
00:00:38.430 --> 00:00:39.040
|
|
193
|
+
7447398155146701990.jpg#xywh=426,480,142,80
|
|
194
|
+
|
|
195
|
+
00:00:39.040 --> 00:00:39.650
|
|
196
|
+
7447398155146701990.jpg#xywh=568,480,142,80
|
|
197
|
+
|
|
198
|
+
00:00:39.650 --> 00:00:40.260
|
|
199
|
+
7447398155146701990.jpg#xywh=710,480,142,80
|
|
200
|
+
|
|
201
|
+
00:00:40.260 --> 00:00:40.870
|
|
202
|
+
7447398155146701990.jpg#xywh=852,480,142,80
|
|
203
|
+
|
|
204
|
+
00:00:40.870 --> 00:00:41.480
|
|
205
|
+
7447398155146701990.jpg#xywh=994,480,142,80
|
|
206
|
+
|
|
207
|
+
00:00:41.480 --> 00:00:42.090
|
|
208
|
+
7447398155146701990.jpg#xywh=1136,480,142,80
|
|
209
|
+
|
|
210
|
+
00:00:42.090 --> 00:00:42.700
|
|
211
|
+
7447398155146701990.jpg#xywh=1278,480,142,80
|
|
212
|
+
|
|
213
|
+
00:00:42.700 --> 00:00:43.310
|
|
214
|
+
7447398155146701990.jpg#xywh=0,560,142,80
|
|
215
|
+
|
|
216
|
+
00:00:43.310 --> 00:00:43.920
|
|
217
|
+
7447398155146701990.jpg#xywh=142,560,142,80
|
|
218
|
+
|
|
219
|
+
00:00:43.920 --> 00:00:44.530
|
|
220
|
+
7447398155146701990.jpg#xywh=284,560,142,80
|
|
221
|
+
|
|
222
|
+
00:00:44.530 --> 00:00:45.140
|
|
223
|
+
7447398155146701990.jpg#xywh=426,560,142,80
|
|
224
|
+
|
|
225
|
+
00:00:45.140 --> 00:00:45.750
|
|
226
|
+
7447398155146701990.jpg#xywh=568,560,142,80
|
|
227
|
+
|
|
228
|
+
00:00:45.750 --> 00:00:46.360
|
|
229
|
+
7447398155146701990.jpg#xywh=710,560,142,80
|
|
230
|
+
|
|
231
|
+
00:00:46.360 --> 00:00:46.970
|
|
232
|
+
7447398155146701990.jpg#xywh=852,560,142,80
|
|
233
|
+
|
|
234
|
+
00:00:46.970 --> 00:00:47.580
|
|
235
|
+
7447398155146701990.jpg#xywh=994,560,142,80
|
|
236
|
+
|
|
237
|
+
00:00:47.580 --> 00:00:48.190
|
|
238
|
+
7447398155146701990.jpg#xywh=1136,560,142,80
|
|
239
|
+
|
|
240
|
+
00:00:48.190 --> 00:00:48.800
|
|
241
|
+
7447398155146701990.jpg#xywh=1278,560,142,80
|
|
242
|
+
|
|
243
|
+
00:00:48.800 --> 00:00:49.410
|
|
244
|
+
7447398155146701990.jpg#xywh=0,640,142,80
|
|
245
|
+
|
|
246
|
+
00:00:49.410 --> 00:00:50.020
|
|
247
|
+
7447398155146701990.jpg#xywh=142,640,142,80
|
|
248
|
+
|
|
249
|
+
00:00:50.020 --> 00:00:50.630
|
|
250
|
+
7447398155146701990.jpg#xywh=284,640,142,80
|
|
251
|
+
|
|
252
|
+
00:00:50.630 --> 00:00:51.240
|
|
253
|
+
7447398155146701990.jpg#xywh=426,640,142,80
|
|
254
|
+
|
|
255
|
+
00:00:51.240 --> 00:00:51.850
|
|
256
|
+
7447398155146701990.jpg#xywh=568,640,142,80
|
|
257
|
+
|
|
258
|
+
00:00:51.850 --> 00:00:52.460
|
|
259
|
+
7447398155146701990.jpg#xywh=710,640,142,80
|
|
260
|
+
|
|
261
|
+
00:00:52.460 --> 00:00:53.070
|
|
262
|
+
7447398155146701990.jpg#xywh=852,640,142,80
|
|
263
|
+
|
|
264
|
+
00:00:53.070 --> 00:00:53.680
|
|
265
|
+
7447398155146701990.jpg#xywh=994,640,142,80
|
|
266
|
+
|
|
267
|
+
00:00:53.680 --> 00:00:54.290
|
|
268
|
+
7447398155146701990.jpg#xywh=1136,640,142,80
|
|
269
|
+
|
|
270
|
+
00:00:54.290 --> 00:00:54.900
|
|
271
|
+
7447398155146701990.jpg#xywh=1278,640,142,80
|
|
272
|
+
|
|
273
|
+
00:00:54.900 --> 00:00:55.510
|
|
274
|
+
7447398155146701990.jpg#xywh=0,720,142,80
|
|
275
|
+
|
|
276
|
+
00:00:55.510 --> 00:00:56.120
|
|
277
|
+
7447398155146701990.jpg#xywh=142,720,142,80
|
|
278
|
+
|
|
279
|
+
00:00:56.120 --> 00:00:56.730
|
|
280
|
+
7447398155146701990.jpg#xywh=284,720,142,80
|
|
281
|
+
|
|
282
|
+
00:00:56.730 --> 00:00:57.340
|
|
283
|
+
7447398155146701990.jpg#xywh=426,720,142,80
|
|
284
|
+
|
|
285
|
+
00:00:57.340 --> 00:00:57.950
|
|
286
|
+
7447398155146701990.jpg#xywh=568,720,142,80
|
|
287
|
+
|
|
288
|
+
00:00:57.950 --> 00:00:58.560
|
|
289
|
+
7447398155146701990.jpg#xywh=710,720,142,80
|
|
290
|
+
|
|
291
|
+
00:00:58.560 --> 00:00:59.170
|
|
292
|
+
7447398155146701990.jpg#xywh=852,720,142,80
|
|
293
|
+
|
|
294
|
+
00:00:59.170 --> 00:00:59.780
|
|
295
|
+
7447398155146701990.jpg#xywh=994,720,142,80
|
|
296
|
+
|
|
297
|
+
00:00:59.780 --> 00:01:00.390
|
|
298
|
+
7447398155146701990.jpg#xywh=1136,720,142,80
|
|
299
|
+
|
|
300
|
+
00:01:00.390 --> 00:01:01.000
|
|
301
|
+
7447398155146701990.jpg#xywh=1278,720,142,80
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
|
|
7
|
+
<title>TCPlayer Demo</title>
|
|
8
|
+
<!-- 引入播放器 css 文件 -->
|
|
9
|
+
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.min.css" rel="stylesheet"/>
|
|
10
|
+
<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 Webrtc 视频,需要在 tcplayer.vx.x.x.min.js 之前引入 TXLivePlayer-x.x.x.min.js。-->
|
|
11
|
+
<!--有些浏览器环境不支持 Webrtc,播放器会将 Webrtc 流地址自动转换为 HLS 格式地址,因此快直播场景同样需要引入hls.min.x.xx.xm.js。-->
|
|
12
|
+
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.1/libs/TXLivePlayer-1.2.0.min.js"></script>
|
|
13
|
+
<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 HLS 协议的视频,需要在 tcplayer.vx.x.x.min.js 之前引入 hls.min.x.xx.xm.js。-->
|
|
14
|
+
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/libs/hls.min.0.13.2m.js"></script>
|
|
15
|
+
<!--如果需要在 Chrome 和 Firefox 等现代浏览器中通过 H5 播放 FLV 格式的视频,需要在 tcplayer.vx.x.x.min.js 之前引入 flv.min.x.x.x.js。-->
|
|
16
|
+
<script src="https://testmig-1306264703.cos.ap-guangzhou.myqcloud.com/wm/flv.min.av1.js"></script>
|
|
17
|
+
<!--播放器脚本文件-->
|
|
18
|
+
<script src="https://web.sdk.qcloud.com/player/tcplayer/release/v4.5.2/tcplayer.v4.5.2.min.js"></script>
|
|
19
|
+
<style>
|
|
20
|
+
html,body{
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
}
|
|
24
|
+
.tcplayer {
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
}
|
|
27
|
+
.buttons {
|
|
28
|
+
width: 100vw;
|
|
29
|
+
height: 60px;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
}
|
|
32
|
+
.buttons button {
|
|
33
|
+
height: 30px;
|
|
34
|
+
min-width: 24px;
|
|
35
|
+
padding: 0 20px;
|
|
36
|
+
background-color: #006eff;
|
|
37
|
+
color: #fff;
|
|
38
|
+
border: 1px solid #006eff;
|
|
39
|
+
line-height: 28px;
|
|
40
|
+
text-align: center;
|
|
41
|
+
display: inline-block;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
outline: 0 none;
|
|
44
|
+
-webkit-box-sizing: border-box;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
font-size: 12px;
|
|
48
|
+
vertical-align: middle;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
border-radius: 0;
|
|
51
|
+
margin-bottom: 10px;
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
54
|
+
</head>
|
|
55
|
+
<body>
|
|
56
|
+
|
|
57
|
+
<div class="buttons">
|
|
58
|
+
<button id="play">播放</button>
|
|
59
|
+
<button id="pause">暂停</button>
|
|
60
|
+
<button id="stop">停止</button>
|
|
61
|
+
<button id="destroy">销毁</button>
|
|
62
|
+
|
|
63
|
+
<div>
|
|
64
|
+
<input type="text" id="inputurl">
|
|
65
|
+
<button id="switch">切换</button>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
<video id="player-container-id" preload="auto" width="640" height="360" playsinline webkit-playsinline>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<script>
|
|
75
|
+
|
|
76
|
+
function getParams(name) {
|
|
77
|
+
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
|
|
78
|
+
var r = window.location.search.substr(1).match(reg);
|
|
79
|
+
if (r != null) {
|
|
80
|
+
return decodeURIComponent(r[2]);
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
var player = TCPlayer('player-container-id', {
|
|
85
|
+
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
var url = getParams('url') || 'https://testmig-1306264703.cos.ap-guangzhou.myqcloud.com/wm/av1.flv';
|
|
89
|
+
player.src(url);
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
document.getElementById('play').addEventListener('click', function() {
|
|
93
|
+
|
|
94
|
+
if (!player.tech_.flvProvider) {
|
|
95
|
+
player.src(url);
|
|
96
|
+
}
|
|
97
|
+
console.log('player', player);
|
|
98
|
+
player.play();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
document.getElementById('pause').addEventListener('click', function() {
|
|
102
|
+
player.pause();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
document.getElementById('stop').addEventListener('click', function() {
|
|
106
|
+
player.tech_.flvProvider.dispose();
|
|
107
|
+
});
|
|
108
|
+
document.getElementById('destroy').addEventListener('click', function() {
|
|
109
|
+
player.dispose();
|
|
110
|
+
});
|
|
111
|
+
document.getElementById('switch').addEventListener('click', function() {
|
|
112
|
+
var url = document.getElementById('inputurl').value;
|
|
113
|
+
if (url) {
|
|
114
|
+
player.src(url);
|
|
115
|
+
} else {
|
|
116
|
+
alert('请输入直播流地址');
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
</script>
|
|
122
|
+
</body>
|
|
123
|
+
</html>
|