Commit 6bbdae6f by Ernie Park

update video_init to use global video_speed variable to cue up same speed and…

update video_init to use global video_speed variable to cue up same speed and make sure active class added to corrct speed

--HG--
branch : ernie-templates-video-fixes
parent 186fee6b
......@@ -29,15 +29,18 @@ function good() {
}
ajax_video=good;
loadNewVideo(streams["1.0"], ${ position });
// load the same video speed your last video was at in a sequence
// if the last speed played on video doesn't exist on another video just use 1.0 as default
if (video_speed == 1 || !streams[video_speed]) {
loadNewVideo(streams["1.0"], streams["1.0"], ${ position });
} else {
loadNewVideo(streams["1.0"], streams[video_speed], ${ position });
}
function add_speed(key, stream) {
var id = 'speed_' + stream;
//TODO: this should be smarter and know which video is first selected when we have
// video speed as an option/parameter per user that is saved
if (key == 1.0) {
if (key == video_speed) {
$("#video_speeds").append(' <li class=active id="'+id+'">'+key+'x</li>');
} else {
$("#video_speeds").append(' <li id="'+id+'">'+key+'x</li>');
......
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