I am developing a page in which i have to show video with its related pdf. I have used pdf.js and video.js projects for reading pdf and video respectively. They both are implemented in different div. this is the link of my page's screenshot here .I need to implement a function which checks for video current time and change the position of the pdf div according to time below is the code i implemented but its not working at all
//function to perform on every timeupdate
var myFunc =function(){
var myPlayer = this;
var whereYouAt = myPlayer.currentTime();
//working of function
switch(whereYouAt)
{
case 30: bookmarkscroll('pageContainer2');
break;
case 60: bookmarkscroll('pageContainer3');
break;
case 90: bookmarkscroll('pageContainer4');
break;
case 120: bookmarkscroll('pageContainer5');
break;
case 150: bookmarkscroll('pageContainer6');
break;
case 180: bookmarkscroll('pageContainer7');
break;
}
};
myPlayer.addEvent("timeupdate",myFunc);