r75226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75225‎ | r75226 | r75227 >
Date:06:54, 23 October 2010
Author:dale
Status:deferred
Tags:
Comment:
* minor fix for share page
* bump remote version id
Modified paths:
  • /branches/MwEmbedStandAlone/ResourceLoader.php (modified) (history)
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerNative.js (modified) (history)
  • /branches/MwEmbedStandAlone/remotes/mediaWiki.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/ResourceLoader.php
@@ -16,15 +16,15 @@
1717
1818 // Check if we are an entry point or being used as part of MEDIAWIKI:
1919 if ( !defined( 'MEDIAWIKI' ) && !defined( 'SCRIPTLOADER_MEDIAWIKI') ) {
20 - // Load stand alone Resource Loader config
21 - // ( if running as a remote, mediaWiki variables / functions are already included as part of mediaWiki )
22 - require_once( realpath( dirname( __FILE__ ) ) . '/includes/noMediaWikiConfig.php' );
23 -
2420 // Allow an installation an optional PHP customization/overrides file
2521 if ( is_file ( dirname( __FILE__ ) .'/../localSettings.php' ) ) {
2622 require_once dirname( __FILE__ ) .'/../localSettings.php';
2723 }
2824
 25+ // Load stand alone Resource Loader config
 26+ // ( if running as a remote, mediaWiki variables / functions are already included as part of mediaWiki )
 27+ require_once( realpath( dirname( __FILE__ ) ) . '/includes/noMediaWikiConfig.php' );
 28+
2929 $myResourceLoader = new ResourceLoader();
3030 if( $myResourceLoader->outputFromCache() ) {
3131 exit();
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -2540,7 +2540,7 @@
25412541 if( this.height ){
25422542 params.height = parseInt( this.height );
25432543 }
2544 - iframeUrl += $.param( params );
 2544+ iframeUrl += $j.param( params );
25452545
25462546 // Set up embedFrame src path
25472547 var embedCode = '<object data="' + mw.escapeQuotesHTML( iframeUrl ) + '" ';
@@ -2695,7 +2695,7 @@
26962696 if( this.paused ){
26972697 this.paused = false;
26982698 mw.log("trigger play event::");
2699 - $j( this ).trigger( 'play' );
 2699+ //$j( this ).trigger( 'play' );
27002700 }
27012701
27022702
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayerNative.js
@@ -245,78 +245,8 @@
246246 _this.seeking = false;
247247 _this.monitor();
248248 })
249 - },
 249+ },
250250
251 - insertAndPlaySource: function( src , options ){
252 - mw.log("NativeEmbed:: insertAndPlaySource: " + src + ' insertAndPlayingConfig:' + this.insertAndPlayingConfig);
253 - if(!options)
254 - options = {};
255 -
256 - if( options.lockUI ){
257 - this.playerElement.controls = false;
258 - }
259 -
260 - // Make sure to capture the original source
261 - if(! this.insertAndPlayingConfig ){
262 - //alert( 'setup this.insertAndPlayingConfig ');
263 - this.insertAndPlayingConfig = {
264 - 'src' : this.getSrc(),
265 - 'time' : this.currentTime,
266 - 'callback' : options.callback,
267 - 'restoreControls' : options.lockUI
268 - }
269 - }
270 - // Try to directly playback the source
271 - this.switchSrc( src );
272 -
273 - },
274 - restoreSourcePlayback: function( ){
275 - var _this = this;
276 - mw.log( "RestoreSourcePlayback:: empty out insertAndPlayingConfig" );
277 - if( !this.insertAndPlayingConfig) {
278 - mw.log("Error: called restored playback with empty insertAndPlayingConfig")
279 - return;
280 - }
281 - this.switchSrc( this.insertAndPlayingConfig.src );
282 - //this.playerElement.play();
283 - // Remove insert and playing config flag
284 - this.insertAndPlayingConfig = false;
285 -
286 - var time = this.insertAndPlayingConfig.time;
287 - var callback = this.insertAndPlayingConfig.callback;
288 -
289 - // run the seek:
290 - this.setCurrentTime( time ,function(){
291 - if( this.insertAndPlayingConfig.restoreControls ){
292 - this.playerElement.controls = true;
293 - }
294 - });
295 - // Give some time for ipad to figure out whats going on:
296 - setTimeout(function(){
297 - _this.playerElement.load();
298 - _this.playerElement.play();
299 - },100);
300 -
301 - //alert("insertAndPlayingConfig:: " + this.insertAndPlayingConfig);
302 - // Run the callback
303 - if( callback ){
304 - callback();
305 - }
306 - },
307 - switchSrc: function( src ){
308 - mw.log( 'switchSrc' )
309 - if( this.getPlayerElement() ){
310 - try{
311 - //this.playerElement.pause();
312 - this.playerElement.src = src;
313 - this.playerElement.load();
314 - this.playerElement.play();
315 - } catch( e ){
316 - mw.log("Error: possible error in swiching source playback");
317 - }
318 - }
319 - },
320 -
321251 /**
322252 * Seek in a existing stream
323253 *
@@ -646,12 +576,7 @@
647577 var _this = this;
648578 mw.log( 'EmbedPlayer:native: onended:' + this.playerElement.currentTime + ' real dur:' + this.getDuration() +
649579 ' insertAndPlayingConfig: ' + this.insertAndPlayingConfig);
650 -
651 - if( this.insertAndPlayingConfig ){
652 - this.restoreSourcePlayback();
653 - this.insertAndPlayingConfig = false;
654 - return ;
655 - }
 580+
656581 this.onClipDone();
657582 }
658583 };
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js
@@ -4,7 +4,7 @@
55 */
66 var urlparts = getRemoteEmbedPath();
77 var mwEmbedHostPath = urlparts[0];
8 -var mwRemoteVersion = 'r170';
 8+var mwRemoteVersion = 'r171';
99 var mwUseScriptLoader = true;
1010
1111 // Log the mwRemote version makes it easy to debug cache issues

Status & tagging log