您可以尝试运行以下代码来实现< em>onend 属性 -
<!DOCTYPE HTML> <html> <body> <video width = "300" height = "200" controls onended = "display()"> <source src = "/html5/foo.ogg" type = "video/ogg" /> Your browser does not support the video element. </video> <script> function display() { alert ("Thank you for watching! Stay tuned!"); } </script> </body> </html>
您可以在onending 事件中加载下一个剪辑,如下面给出的代码所示
<script > var next = "path/of/next/video.mp4"; var video = document.getElementById('video'); video.onended = function(){ video.src = next; } </script> <video id = "video" src = "path/of/current/video.mp4" autoplayautobuffer controls />
以上就是HTML 5视频或音频播放列表的详细内容,更多请关注php中文网其它相关文章!
已抢187136个
抢已抢67525个
抢已抢353814个
抢已抢668560个
抢已抢124013个
抢已抢26288个
抢