tcplayer.js 4.7.2 → 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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tcplayer.js",
|
|
3
3
|
"description": "腾讯云 Web 播放器",
|
|
4
|
-
"version": "4.
|
|
5
|
-
"main": "./dist/tcplayer.v4.
|
|
4
|
+
"version": "4.8.0",
|
|
5
|
+
"main": "./dist/tcplayer.v4.8.0.min.js",
|
|
6
6
|
"style": "./dist/tcplayer.min.css",
|
|
7
7
|
"copyright": "Copyright Brightcove, Inc. <https://www.brightcove.com/>",
|
|
8
8
|
"license": "Apache-2.0",
|
|
@@ -35,8 +35,6 @@
|
|
|
35
35
|
"docs:lint": "remark -- './**/*.md'",
|
|
36
36
|
"docs:fix": "remark --output -- './**/*.md'",
|
|
37
37
|
"babel": "babel src/js -d es5",
|
|
38
|
-
"prepublish": "not-in-install && run-p build || in-install",
|
|
39
|
-
"publish": "node build/gh-release.js",
|
|
40
38
|
"version": "node build/version.js && git add CHANGELOG.md"
|
|
41
39
|
},
|
|
42
40
|
"dependencies": {
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
7
|
-
<meta name="viewport"
|
|
8
|
-
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
|
|
9
|
-
<title>腾讯云视频点播示例</title>
|
|
10
|
-
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.7.2/tcplayer.min.css" rel="stylesheet" />
|
|
11
|
-
|
|
12
|
-
<!--播放器脚本文件-->
|
|
13
|
-
<script src="https://testmig-1306264703.cos.ap-guangzhou.myqcloud.com/vin/tcplayer.v4.7.2.min.js"></script>
|
|
14
|
-
|
|
15
|
-
<style>
|
|
16
|
-
html,
|
|
17
|
-
body {
|
|
18
|
-
margin: 0;
|
|
19
|
-
padding: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.tcplayer {
|
|
23
|
-
margin: 0 auto;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@media screen and (max-width: 640px) {
|
|
27
|
-
#player-container-id {
|
|
28
|
-
width: 100%;
|
|
29
|
-
height: 270px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* 设置logo在高分屏的显示样式 */
|
|
34
|
-
@media only screen and (min-device-pixel-ratio: 2),
|
|
35
|
-
only screen and (-webkit-min-device-pixel-ratio: 2) {
|
|
36
|
-
.tcp-logo-img {
|
|
37
|
-
width: 50%;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
41
|
-
</head>
|
|
42
|
-
|
|
43
|
-
<body>
|
|
44
|
-
<!-- 设置播放器容器 -->
|
|
45
|
-
<video id="player-container-id" preload="auto" width="640" height="360" playsinline webkit-playsinline>
|
|
46
|
-
</video>
|
|
47
|
-
<!--
|
|
48
|
-
注意事项:
|
|
49
|
-
* 播放器容器必须为 video 标签
|
|
50
|
-
* player-container-id 为播放器容器的ID,可自行设置
|
|
51
|
-
* 播放器区域的尺寸请按需设置,建议通过 css 进行设置,通过css可实现容器自适应等效果
|
|
52
|
-
* playsinline webkit-playsinline 这几个属性是为了在标准移动端浏览器不劫持视频播放的情况下实现行内播放,此处仅作示例,请按需使用
|
|
53
|
-
* 设置 x5-playsinline 属性会使用 X5 UI 的播放器
|
|
54
|
-
-->
|
|
55
|
-
<script>
|
|
56
|
-
|
|
57
|
-
// TCPlayer.mountHlsProvider(true);
|
|
58
|
-
var player = TCPlayer('player-container-id', { // player-container-id 为播放器容器ID,必须与html中一致
|
|
59
|
-
sources: [
|
|
60
|
-
{ src: 'https://testlivepull.futunn.com/live/FutunnLive_100086025_LangCN_eng2chseng.flv?txWMID=173540' },
|
|
61
|
-
{ src: 'https://testlivepull.futunn.com/live/FutunnLive_100086025_LangCN_eng2chseng.m3u8?txWMID=173540' }
|
|
62
|
-
],
|
|
63
|
-
|
|
64
|
-
preload: 'auto',
|
|
65
|
-
controls: true,
|
|
66
|
-
language: 'zh-CN',
|
|
67
|
-
controlBar: {
|
|
68
|
-
liveDisplay: false,
|
|
69
|
-
progressControl: false, // 是否显示播放进度条。
|
|
70
|
-
volumePanel: true, // 是否显示音量控制
|
|
71
|
-
currentTimeDisplay: false, // 是否显示视频当前时间。
|
|
72
|
-
durationDisplay: false, // 是否显示视频时长。
|
|
73
|
-
timeDivider: false, // 是否显示时间分割符。
|
|
74
|
-
playbackRateMenuButton: false, // 是否显示播放速率选择按钮。
|
|
75
|
-
QualitySwitcherMenuButton: false, // 是否显示清晰度切换菜单
|
|
76
|
-
fullscreenToggle: false
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
</script>
|
|
84
|
-
</body>
|
|
85
|
-
|
|
86
|
-
</html>
|