html5 video play方法,HTML5 video video playlist

凌朗
2023-12-01

this is simplistic, simplified HTML5 video playlist.Surprisingly for me, it seems to be working just fine in mozzila/chrome/opera just like that i mean - with ogv only specified in the script.Question - do i have to specify mp4 and webm as well?

if so - how in this particular case?

What about the IE?

regards

the code :

HTML5_video

var videoPlayer;

var video_count = 1;

window.onload = function (){

videoPlayer = document.getElementById("homevideo");

videoPlayer.addEventListener("ended", function (){

video_count++;

if (video_count == 4) video_count = 1;

var nextVideo = video_count+".ogv";

videoPlayer.src = nextVideo;

}, false);

}

 类似资料: