From: Michael Dale Date: Tue, 29 Sep 2009 03:01:38 +0000 (+0000) Subject: ~ fixed playhead update issue X-Git-Tag: 1.31.0-rc.0~39480 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=e7d9feeeaa91a9d61b6506284fa10ed1782f581f;p=lhc%2Fweb%2Fwiklou.git ~ fixed playhead update issue --- diff --git a/js2/mwEmbed/libEmbedVideo/embedVideo.js b/js2/mwEmbed/libEmbedVideo/embedVideo.js index 885e185407..af316c03c4 100644 --- a/js2/mwEmbed/libEmbedVideo/embedVideo.js +++ b/js2/mwEmbed/libEmbedVideo/embedVideo.js @@ -2053,7 +2053,7 @@ embedVideo.prototype = { }, //do common monitor code like update the playhead and play status //plugin objects are responsible for updating currentTime - monitor:function(){ + monitor:function(){ if( this.currentTime && this.currentTime > 0 && this.duration){ if( !this.userSlide ){ if( this.start_offset ){ @@ -2152,13 +2152,11 @@ embedVideo.prototype = { //do head request if on the same domain return this.media_element.selected_source.URLTimeEncoding; }, - setSliderValue: function(perc, hide_progress){ - if(this.controls && $j('#mv_play_head_'+this_id).length != 0){ - var this_id = (this.pc)?this.pc.pp.id:this.id; + setSliderValue: function(perc, hide_progress){ + var this_id = (this.pc)?this.pc.pp.id:this.id; + if(this.controls && $j( '#mv_play_head_' + this_id).length != 0){ var val = parseInt( perc*1000 ); - $j('#mv_play_head_'+this_id).slider('value', val); - - //js_log("embed video set: " + '#mv_play_head_'+this_id + ' to ' + val); + $j('#mv_play_head_'+this_id).slider('value', val); } //js_log('set#mv_seeker_slider_'+this_id + ' perc in: ' + perc + ' * ' + $j('#mv_seeker_'+this_id).width() + ' = set to: '+ val + ' - '+ Math.round(this.mv_seeker_width*perc) ); //js_log('op:' + offset_perc + ' *('+perc+' * ' + $j('#slider_'+id).width() + ')');