泽西大少
泽西大少
  • 发布:2019-11-06 16:05
  • 更新:2019-11-06 16:12
  • 阅读:639

plus.video.VideoPlayer 安卓 移动网络环境 播放加载时间很长(无线网络很快)

分类:HTML5+

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title>Video Example</title>
<script type="text/javascript">
var video = null;
// H5 plus事件处理
function plusReady() {
// 创建视频播放控件
video = new plus.video.VideoPlayer('video', {
src: 'http://xxxxx/test.mp4',
controls: 'false',
//autoplay: 'true',//IOS不支持
loop: 'true',
//show-fullscreen-btn:'false',
//show-play-btn:'false',
objectFit: 'cover',
});
video.play();
}
document.addEventListener('plusready', plusReady, false);
</script>
</head>
<body style="margin: 0; padding: 0; text-align: center;">
<div id="video" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000;">
</div>
</body>
</html>

2019-11-06 16:05 负责人:无 分享
已邀请:
泽西大少

泽西大少 (作者)

重贴一下代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title>Video Example</title>
<script type="text/javascript">
var video = null;
// H5 plus事件处理
function plusReady() {
// 创建视频播放控件
video = new plus.video.VideoPlayer('video', {
src: 'http://xxxxxx/test.mp4',
controls: 'false',
//autoplay: 'true',//IOS不支持
loop: 'true',
//show-fullscreen-btn:'false',
//show-play-btn:'false',
objectFit: 'cover',
});
video.play();
}
document.addEventListener('plusready', plusReady, false);
</script>
</head>
<body style="margin: 0; padding: 0; text-align: center;">
<div id="video" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #000;">
</div>
</body>
</html>

该问题目前已经被锁定, 无法添加新回复