Skip to content
July 26, 2012 / Danii Oliver

HTML 5 Video Custom Random Playlist (Beta 2.0) Update

Video.js integration

function nextVideo()
{
 var videoOne = document.getElementById('video1_html5_api'); 
 videoOne.setAttribute("src", path + sessionList[0]+ ".mp4");
 if (sessionList.length !== 0) {
 videoOne.load();
 videoOne.play();
 }
 else if(sessionList.length === 0){
 videoOne.setAttribute("src", path + intro + ".mp4");
 videoOne.load();
 videoOne.setAttribute("poster", "media/END.jpg");
 for (i=0; i<videoArray.length; i++){
 sessionList.push(videoArray[i]);
 }
 sessionList.push(outro);
 if(videoOne.paused){
 videoOne.load();
 videoOne.pause(); 
 }
 }else{}
 sessionList.shift();
 return sessionList;
}

Update: I found this to be a great script of connivence, however the value of having a skilled developer on hand is their ability to code for custom considerations and debugging. This script does not work for FireFox as of [FF 14.0.1]. Firefox <video> tag only supports OGV and WebM. Any cross browser codec support Video.js has/had does not work with this customization of a random playlist.
It did however, work with playing just one video. (I think: As Video.JS rewrites your html code on the fly.)

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s