测试版
This commit is contained in:
74
node_modules/tcplayer.js/dist/examples/vod/tcplayer-vod-pdt-seek.html
generated
vendored
Normal file
74
node_modules/tcplayer.js/dist/examples/vod/tcplayer-vod-pdt-seek.html
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
|
||||
<title>腾讯云视频点播示例</title>
|
||||
<link href="https://web.sdk.qcloud.com/player/tcplayer/release/v4.6.0/tcplayer.min.css" rel="stylesheet"/>
|
||||
|
||||
<!--播放器脚本文件-->
|
||||
<!-- <script src="https://vincentlli-1306264703.cos.ap-nanjing.myqcloud.com/tcplayer/hls.min.1.1.7.js"></script> -->
|
||||
<script src="http://10.21.39.55:8080/libs/hls.min.1.1.7.js"></script>
|
||||
|
||||
|
||||
<!-- <script src="https://vincentlli-1306264703.cos.ap-nanjing.myqcloud.com/tcplayer/tcplayer.v4.8.0.min.js"></script> -->
|
||||
<script src="http://10.21.39.55:8080/dist/tcplayer.v4.8.0.js"></script>
|
||||
<style>
|
||||
html,body{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.tcplayer {
|
||||
margin: 0 auto;
|
||||
}
|
||||
@media screen and (max-width: 640px) {
|
||||
#player-container-id {
|
||||
width: 100%;
|
||||
height: 270px;
|
||||
}
|
||||
}
|
||||
/* 设置logo在高分屏的显示样式 */
|
||||
@media only screen and (min-device-pixel-ratio: 2), only screen and (-webkit-min-device-pixel-ratio: 2) {
|
||||
.tcp-logo-img {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- 设置播放器容器 -->
|
||||
<video id="player-container-id" preload="auto" width="640" height="360" playsinline webkit-playsinline>
|
||||
</video>
|
||||
<!--
|
||||
注意事项:
|
||||
* 播放器容器必须为 video 标签
|
||||
* player-container-id 为播放器容器的ID,可自行设置
|
||||
* 播放器区域的尺寸请按需设置,建议通过 css 进行设置,通过css可实现容器自适应等效果
|
||||
* playsinline webkit-playsinline 这几个属性是为了在标准移动端浏览器不劫持视频播放的情况下实现行内播放,此处仅作示例,请按需使用
|
||||
* 设置 x5-playsinline 属性会使用 X5 UI 的播放器
|
||||
-->
|
||||
<script>
|
||||
var player = TCPlayer('player-container-id', { // player-container-id 为播放器容器ID,必须与html中一致
|
||||
controlBar: {
|
||||
// 是否开启显示pdt时间
|
||||
// PDTDisplay: false,
|
||||
},
|
||||
|
||||
plugins: {
|
||||
// PDT: true,
|
||||
}
|
||||
//其他参数请在开发文档中查看
|
||||
});
|
||||
|
||||
player.src('https://1255302378.vod2.myqcloud.com/344f1646vodcq1255302378/dbf24ce65576678020381447062/playlist.m3u8');
|
||||
|
||||
player.on('firstpdt', function(e) {
|
||||
console.log('获取pdt起始时间', e.data);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user