r113734 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113733‎ | r113734 | r113735 >
Date:17:28, 13 March 2012
Author:dale
Status:ok
Tags:
Comment:
fixes MediaWikiPlayerSupport bindings
updated binding event name to newEmbedPlayerEvent
fixed case on getShareIframeSrc event name
Modified paths:
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.processEmbedPlayers.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js (modified) (history)
  • /trunk/extensions/TimedMediaHandler/TimedMediaHandler.hooks.php (modified) (history)
  • /trunk/extensions/TimedMediaHandler/resources/mw.MediaWikiPlayerSupport.js (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/TimedMediaHandler.hooks.php
@@ -65,6 +65,7 @@
6666 'scripts' => 'resources/mw.MediaWikiPlayerSupport.js',
6767 'dependencies'=> array( 'mw.Api' )
6868 ) ),
 69+ // adds support MediaWikiPlayerSupport player bindings
6970 "mw.MediaWikiPlayer.loader" => array_merge( $baseExtensionResource, array(
7071 'loaderScripts' => 'resources/mw.MediaWikiPlayer.loader.js',
7172 ) ),
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/EmbedPlayer.loader.js
@@ -2,7 +2,6 @@
33 * EmbedPlayer loader
44 */
55 ( function( mw, $ ) {
6 -
76 /**
87 * Add a DOM ready check for player tags
98 *
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -1539,7 +1539,7 @@
15401540 var iframeUrl = false;
15411541 $( this ).trigger( 'getShareIframeSrc', function( localIframeSrc ){
15421542 if( iframeUrl){
1543 - mw.log("Error multiple modules binding getShareIframeSrc" );
 1543+ mw.log("EmbedPlayer:: Error multiple modules binding getShareIframeSrc" );
15441544 }
15451545 iframeUrl = localIframeSrc;
15461546 });
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js
@@ -1760,7 +1760,7 @@
17611761 var _this = this;
17621762 var embedPlayer = this.embedPlayer;
17631763 // for each source with "native playback"
1764 - $sourceMenu = $('<ul />');
 1764+ var $sourceMenu = $('<ul />');
17651765
17661766 // Local function to closure the "source" variable scope:
17671767 function addToSourceMenu( source ){
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.processEmbedPlayers.js
@@ -87,7 +87,7 @@
8888 mw.log("EmbedPlayer::EmbedPlayerNewPlayer:trigger " + inDomPlayer.id );
8989
9090 // Allow plugins to add bindings to the inDomPlayer
91 - $( mw ).trigger ( 'EmbedPlayerNewPlayer', inDomPlayer );
 91+ $( mw ).trigger ( 'newEmbedPlayerEvent', inDomPlayer );
9292
9393 // Add a player ready binding:
9494 $( inDomPlayer ).bind( 'playerReady', areSelectedPlayersReady );
Index: trunk/extensions/TimedMediaHandler/resources/mw.MediaWikiPlayerSupport.js
@@ -243,13 +243,11 @@
244244 callback();
245245 }
246246 });
247 -
248 - $( embedPlayer ).bind( 'GetShareIframeSrc', function(event, callback){
 247+ $( embedPlayer ).bind( 'getShareIframeSrc', function(event, callback){
249248 // Check the embedPlayer title key:
250249 var title = $( embedPlayer).attr( 'data-mwtitle');
251250 // TODO Check the provider key and use that hosts title page entry point!
252251 var provider = $( embedPlayer).attr( 'data-mwprovider');
253 -
254252 var iframeUrl = false;
255253 if( mw.getConfig('wgServer') && mw.getConfig('wgArticlePath') ){
256254 iframeUrl = mw.getConfig('wgServer') +
@@ -257,6 +255,7 @@
258256 unescape( embedPlayer.apiTitleKey ).replace( /^(File:|Image:)/ , '' ) ) +
259257 '?' + 'embedplayer=yes';
260258 }
 259+
261260 callback( iframeUrl );
262261 });
263262 };

Status & tagging log