use*_*280 5 javascript video jquery html5
我在页面上有几个html5视频.当我第一次进入页面时,它们正确加载 - 我可以看到正确的帧大小,播放视频等.进入另一页并回到视频页面后,帧不够高而视频没有玩,不全屏等
在我看来,它是视频加载的东西.我尝试使用onloadeddata但没有成功(我可能使用它错了,新手在这里).
是否有任何方式可以强制加载视频?就像一个循环检查是否加载了视频,如果没有 - 加载它们?
更新:这是代码.
var content = '';
var index;
$.post('api/getVideo.php', {id: id}, function(data) {
//console.log(data);
for (index = 0; index < data.length; index++) {
content = content + '<div class="col-md-6 video-col"> <button id="play" class="full-play-button"><i class="fa fa-play"></i></button>' +
'<video id="video1" class="video-small"> <source src="'+data[index]["Path"] + '"type="video/'+data[index]["Typ"]+'" class="video-file"> </video><h3 class="video-title">'+
data[index]["Tytul"]+'</h3></div>';
}
}, "json");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2605 次 |
| 最近记录: |