Open alexzhao1984 opened 6 years ago
@xqq 感谢您的回复。现在我的页面可以播放了。但是播放中途会出现“视频播放因网络错误中止”。我的电影是1.01GB大小,时长1小时28分钟左右。每次播放1分半的时候回出现这个提示。下面是一些有关的截图
<tr>
<td><p><video id="videoElement" width="320" height="240" controls autostart="off" loop>Your browser does not support the video tag.</video></p></td>
</tr>
<script>
if (flvjs.isSupported()) {
var videoElement=document.getElementById("videoElement");
var flvPlayer=flvjs.createPlayer({type:'mp4',url:"http://192.168.26.131:8080/static/testmp4.mp4"});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
}
</script>
我试了一下,把这个视频截取其中10分钟。是能够成功播完的。是跟大小有关系吗?我应该怎样优化使得视频能正产播完呢?
We do not support directly reference ES6 module in HTML.
Please use the compiled and packaged
flv.js
orflv.min.js
.