Commit 05ce1a0e by Ernie Park

HTML5 fallback working, time duration buggy from earlier, loading different tabs…

HTML5 fallback working, time duration buggy from earlier, loading different tabs subtitles/autoplay isn't triggered
parent bcdf6d50
...@@ -152,9 +152,32 @@ function onYouTubePlayerReady(playerId) { ...@@ -152,9 +152,32 @@ function onYouTubePlayerReady(playerId) {
var id=load_id; var id=load_id;
loadNewVideo(id, 0); loadNewVideo(id, 0);
} }
}
/* HTML5 YouTube iFrame API Specific */
function onYouTubePlayerAPIReady() {
ytplayer = new YT.Player('html5_player', {
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
updateytplayerInfoInterval = setInterval(updateytplayerInfo, 500);
ajax_videoInterval = setInterval(ajax_video, 5000);
}
function onPlayerReady(event) {
// alert("ready");
event.target.playVideo();
}
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING) {
}
} }
/* End HTML5 Specific */
// clear pings to video status when we switch to a different sequence tab with ajax // clear pings to video status when we switch to a different sequence tab with ajax
function videoDestroy() { function videoDestroy() {
load_id = 0; load_id = 0;
...@@ -233,7 +256,7 @@ function updateytplayerInfo() { ...@@ -233,7 +256,7 @@ function updateytplayerInfo() {
update_captions(getCurrentTime()); update_captions(getCurrentTime());
} }
// updateHTML("videoduration", getDuration()); // updateHTML("videoduration", getDuration());
// updateHTML("videotime", getCurrentTime()); // updateHTML("videotime", getCurrentTime());
// updateHTML("startbytes", getStartBytes()); // updateHTML("startbytes", getStartBytes());
// updateHTML("volume", getVolume()); // updateHTML("volume", getVolume());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment