From: Michael Dale Date: Fri, 2 Oct 2009 23:51:15 +0000 (+0000) Subject: * updated local java applet from cortado svn ( supports theora 1.1 encodes ) X-Git-Tag: 1.31.0-rc.0~39401 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=c4ef6ed11d493dd8c897134222f33adbc34b620c;p=lhc%2Fweb%2Fwiklou.git * updated local java applet from cortado svn ( supports theora 1.1 encodes ) * some javaEmbed fixes --- diff --git a/js2/mwEmbed/binPlayers/cortado/README b/js2/mwEmbed/binPlayers/cortado/README index 554c23b9ab..9b2c1eafcb 100644 --- a/js2/mwEmbed/binPlayers/cortado/README +++ b/js2/mwEmbed/binPlayers/cortado/README @@ -1 +1 @@ -This version of cortado comes form http://theora.org/cortado.jar it should cloesly mirror the svn version hosted by wikimedia +This version of cortado comes form http://theora.org/cortado.jar diff --git a/js2/mwEmbed/binPlayers/cortado/cortado.jar b/js2/mwEmbed/binPlayers/cortado/cortado.jar index 30565ef2d8..6d9cbc7527 100644 Binary files a/js2/mwEmbed/binPlayers/cortado/cortado.jar and b/js2/mwEmbed/binPlayers/cortado/cortado.jar differ diff --git a/js2/mwEmbed/libEmbedVideo/embedVideo.js b/js2/mwEmbed/libEmbedVideo/embedVideo.js index 127fb641ef..7b288726da 100644 --- a/js2/mwEmbed/libEmbedVideo/embedVideo.js +++ b/js2/mwEmbed/libEmbedVideo/embedVideo.js @@ -1168,79 +1168,80 @@ embedVideo.prototype = { }; }, onClipDone:function(){ - js_log('base:onClipDone'); - //stop the clip (load the thumbnail etc) - this.stop(); - this.seek_time_sec = 0; - this.setSliderValue(0); - var _this = this; + js_log('base:onClipDone'); + //stop the clip (load the thumbnail etc) + this.stop(); + this.seek_time_sec = 0; + this.setSliderValue(0); + var _this = this; + + if(this.width < 300){ + return ; + } + this.onClipDone_disp=true; + this.thumbnail_disp=true; + + //make sure we are not in preview mode( no end clip actions in preview mode) + if( this.preview_mode ) + return ; - if(this.width < 300){ - return ; - } - this.onClipDone_disp=true; - this.thumbnail_disp=true; - //make sure we are not in preview mode( no end clip actions in preview mode) - if( this.preview_mode ) - return ; - - $j('#img_thumb_'+this.id).css('zindex',1); - $j( this.id + ' .play-btn-large').hide(); - - //add black background - $j('#dc_'+this.id).append('
' + - '
'); - - if( this.wikiTitleKey){ - $j('#dc_'+this.id).append( - ''); - $j('#img_thumb_' + this.id).fadeOut("fast"); - $j('#dc_'+ _this.id + ' .related_vids ul').html( gM('mwe-loading_txt') ); - this.mvVideoAudioSearch(); - }else{ - //add the liks_info_div black back - $j('#dc_'+this.id).append('
'+ - '
' - ); - //start animation (make thumb small in upper left add in div for "loading" - $j('#img_thumb_'+this.id).animate({ - width:parseInt(parseInt(_this.width)/2), - height:parseInt(parseInt(_this.height)/2), - top:20, - left:10 - }, - 1000, - function(){ - //animation done.. add "loading" to div if empty - if($j('#liks_info_'+_this.id).html()==''){ - $j('#liks_info_'+_this.id).html(gM('mwe-loading_txt')); - } - } - ) - //now load roe if run the showNextPrevLinks - if(this.roe && this.media_element.addedROEData==false){ - do_request(this.roe, function(data) - { - _this.media_element.addROE(data); - _this.getNextPrevLinks(); - }); - }else{ - this.getNextPrevLinks(); + $j('#img_thumb_'+this.id).css('zindex',1); + $j('#'+ this.id + ' .play-btn-large').hide(); + + //add black background + $j('#dc_'+this.id).append( '
' + + '
'); + + if( this.wikiTitleKey){ + $j('#dc_'+this.id).append( + ''); + $j('#img_thumb_' + this.id).fadeOut("fast"); + $j('#dc_'+ _this.id + ' .related_vids ul').html( gM('mwe-loading_txt') ); + this.mvVideoAudioSearch(); + }else{ + //add the liks_info_div black back + $j('#dc_'+this.id).append('
'+ + '
' + ); + //start animation (make thumb small in upper left add in div for "loading" + $j('#img_thumb_'+this.id).animate({ + width:parseInt(parseInt(_this.width)/2), + height:parseInt(parseInt(_this.height)/2), + top:20, + left:10 + }, + 1000, + function(){ + //animation done.. add "loading" to div if empty + if($j('#liks_info_'+_this.id).html()==''){ + $j('#liks_info_'+_this.id).html(gM('mwe-loading_txt')); + } } - } - }, + ) + //now load roe if run the showNextPrevLinks + if(this.roe && this.media_element.addedROEData==false){ + do_request(this.roe, function(data) + { + _this.media_element.addROE(data); + _this.getNextPrevLinks(); + }); + }else{ + this.getNextPrevLinks(); + } + } + }, //@@todo we should merge getNextPrevLinks with textInterface .. there is repeated code between them. getNextPrevLinks:function(){ js_log('f:getNextPrevLinks'); @@ -1997,7 +1998,7 @@ embedVideo.prototype = { } //make sure the big playbutton is has click action: - $j(_this.id + ' .play-btn-large').unbind('click').click(function(){ + $j('#' + _this.id + ' .play-btn-large').unbind('click').click(function(){ $j('#' +_this.id).get(0).play(); }); diff --git a/js2/mwEmbed/libEmbedVideo/javaEmbed.js b/js2/mwEmbed/libEmbedVideo/javaEmbed.js index 114577f739..c55210385f 100644 --- a/js2/mwEmbed/libEmbedVideo/javaEmbed.js +++ b/js2/mwEmbed/libEmbedVideo/javaEmbed.js @@ -84,21 +84,23 @@ var javaEmbed = { this.monitor(); }, monitor:function(){ - this.getJCE() - if(this.jce && this.jce.getPlayPosition){ - try{ - //java reads ogg media time.. so no need to add the start or seek offset: - //js_log(' ct: ' + this.jce.getPlayPosition() + ' ' + this.supportsURLTimeEncoding()); - this.currentTime = this.jce.getPlayPosition(); - if( this.jce.getPlayPosition() < 0){ - js_log('pp:'+this.jce.getPlayPosition()); - //probably reached clip end - this.onClipDone(); - } - }catch (e){ - js_log('could not get time from jPlayer: ' + e); - } - } + this.getJCE(); + if( this.isPlaying() ){ + if( this.jce && this.jce.getPlayPosition ){ + try{ + //java reads ogg media time.. so no need to add the start or seek offset: + //js_log(' ct: ' + this.jce.getPlayPosition() + ' ' + this.supportsURLTimeEncoding()); + this.currentTime = this.jce.getPlayPosition(); + if( this.jce.getPlayPosition() < 0){ + js_log('pp:'+this.jce.getPlayPosition()); + //probably reached clip end + this.onClipDone(); + } + }catch (e){ + js_log('could not get time from jPlayer: ' + e); + } + } + } //once currentTime is updated call parent_monitor this.parent_monitor(); }, @@ -169,7 +171,9 @@ var javaEmbed = { doThumbnailHTML:function(){ //empty out player html (jquery with java applets does mix) : var pelm = document.getElementById('dc_' + this.id ); - pelm.innerHTML = ''; + if( pelm ){ + pelm.innerHTML = ''; + } this.parent_doThumbnailHTML(); }, play:function(){