r79162 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79161‎ | r79162 | r79163 >
Date:05:16, 29 December 2010
Author:dale
Status:deferred
Tags:
Comment:
some java cortado tweeks for bug 25375
Modified paths:
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerJava.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -2067,6 +2067,10 @@
20682068 $j( this ).show();
20692069 this.controls = true;
20702070 }
 2071+ if( !this.useNativePlayerControls() && !this.isPersistentNativePlayer() && !_this.controlBuilder.checkOverlayControls() ){
 2072+ // give the interface more space for the controls:
 2073+ this.$interface.css('height', this.height + _this.controlBuilder.height );
 2074+ }
20712075
20722076 // Update Thumbnail for the "player"
20732077 this.updatePosterHTML();
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerJava.js
@@ -2,7 +2,7 @@
33 * List of domains and hosted location of cortado. Lets clients avoid the security warning for cross domain cortado
44 */
55 window.cortadoDomainLocations = {
6 - 'upload.wikimedia.org' : 'http://upload.wikimedia.org/jars/cortado.jar'
 6+ 'upload.wikimedia.org' : 'http://upload.wikimedia.org/jars/cortado.jar'
77 };
88
99 // Set the default location for CortadoApplet
@@ -32,16 +32,14 @@
3333 var _this = this;
3434 mw.log( "java play url:" + this.getSrc( this.seek_time_sec ) );
3535
36 - var applet_loc = this.getAppletLocation();
37 -
38 - mw.log('Applet location: ' + applet_loc );
 36+ mw.log('Applet location: ' + this.getAppletLocation() );
3937 mw.log('Play media: ' + this.getSrc() );
4038
4139 // load directly in the page..
42 - // (media must be on the same server or applet must be signed)
 40+ // ( media must be on the same server or applet must be signed )
4341 var appletCode = '' +
4442 '<applet id="' + this.pid + '" code="com.fluendo.player.Cortado.class" ' +
45 - 'archive="' + applet_loc + '" width="' + parseInt( this.getWidth() ) + '" ' +
 43+ 'archive="' + this.getAppletLocation() + '" width="' + parseInt( this.getWidth() ) + '" ' +
4644 'height="' + parseInt( this.getHeight() ) + '"> ' + "\n" +
4745 '<param name="url" value="' + this.getSrc() + '" /> ' + "\n" +
4846 '<param name="local" value="false"/>' + "\n" +
@@ -56,8 +54,10 @@
5755 appletCode += '<param name="duration" value="' + parseFloat( this.getDuration() ) + '" />' + "\n";
5856 }
5957
60 - appletCode += '<param name="bufferSize" value="4096" />' + "\n" +
61 - '</applet>';
 58+ appletCode += '<param name="BufferSize" value="4096" />' +
 59+ '<param name="BufferHigh" value="25">' +
 60+ '<param name="BufferLow" value="5">' +
 61+ '</applet>';
6262
6363 $j( this ).html( appletCode );
6464
@@ -96,7 +96,7 @@
9797 */
9898 getAppletLocation: function() {
9999 var mediaSrc = this.getSrc();
100 - var applet_loc = false;
 100+ var appletLoc = false;
101101 if (
102102 !mw.isLocalDomain( mediaSrc )
103103 ||
@@ -105,15 +105,15 @@
106106 mw.getConfig( 'relativeCortadoAppletPath' ) === false )
107107 ){
108108 if ( window.cortadoDomainLocations[ mw.parseUri( mediaSrc ).host ] ) {
109 - applet_loc = window.cortadoDomainLocations[ mw.parseUri( mediaSrc ).host ];
 109+ appletLoc = window.cortadoDomainLocations[ mw.parseUri( mediaSrc ).host ];
110110 } else {
111 - applet_loc = 'http://theora.org/cortado.jar';
 111+ appletLoc = 'http://theora.org/cortado.jar';
112112 }
113113 } else {
114114 // Get the local relative cortado applet location:
115 - applet_loc = mw.getConfig( 'relativeCortadoAppletPath' );
 115+ appletLoc = mw.getConfig( 'relativeCortadoAppletPath' );
116116 }
117 - return applet_loc;
 117+ return appletLoc;
118118 },
119119
120120 /**
@@ -128,11 +128,12 @@
129129 //mw.log(' ct: ' + this.playerElement.getPlayPosition() + ' ' + this.supportsURLTimeEncoding());
130130
131131 currentTime = this.playerElement.currentTime;
132 - if ( this.currentTime < 0 ) {
 132+ // ( java cortado has -1 time ~sometimes~ )
 133+ /*if ( this.currentTime < 0 ) {
133134 mw.log( 'pp:' + this.currentTime );
134135 // Probably reached clip ( should fire ondone event instead )
135136 this.onClipDone();
136 - }
 137+ }*/
137138 } catch ( e ) {
138139 mw.log( 'could not get time from jPlayer: ' + e );
139140 }
@@ -188,7 +189,7 @@
189190 mw.log( 'error:doPlayThenSeek failed' );
190191 }
191192 }
192 - }
 193+ };
193194 readyForSeek();
194195 },
195196

Follow-up revisions

RevisionCommit summaryAuthorDate
r90096wgNamespaceIds in JavaScript didn't include canonical namespaces. Adding them...krinkle22:49, 14 June 2011

Status & tagging log