html5 video 有时候播放不了视频,有时候能加载,怎么监控视频地址加载失败,在从新加载一次,第一次发帖新手求教!
黄舟
黄舟 2017-04-17 12:06:27
0
1
1326
<video id="video1" width="100%" height="250" autoplay="autoplay"`请输入代码` controls webkit-playsinline> 
     <source src="a.php?vid=1124" type="video/mp4"></source> 
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
Ty80

Listen to the video event on the error element, and then check the video attribute or readyState attribute of the networkState element. If the loading fails, call the video method of the load() element. This method Just reload. Please refer to here for the specific values ​​that will appear in those two states

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!