r98199 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98198‎ | r98199 | r98200 >
Date:23:54, 26 September 2011
Author:raindrift
Status:ok
Tags:
Comment:
additional update for clarity, added some todos
Modified paths:
  • /trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js
@@ -7,6 +7,7 @@
88 * mw.PlayerControlBuilder Handles skinning of the player controls
99 */
1010
 11+// TODO: (from review) move code that's immediately invoked into another file, for clarity.
1112 ( function( mw, $ ) {
1213
1314
@@ -206,9 +207,12 @@
207208 mw.log("EmbedPlayer::runPlayerSwap::" + $( playerElement ).attr('id') );
208209
209210 var playerInterface = new mw.EmbedPlayer( playerElement );
210 - var swapPlayer = swapEmbedPlayerElement( playerElement, playerInterface );
 211+ var swapPlayer = swapEmbedPlayerElement( playerElement, playerInterface );
 212+
211213 // Trigger the EmbedPlayerNewPlayer for embedPlayer interface
212214 mw.log("EmbedPlayer::EmbedPlayerNewPlayer:trigger " + playerInterface.id );
 215+
 216+ // TODO: (from review) $( '#' + playerInterface.id ).get(0) is, theoreticaly, the same as swapPlayer and they might be interchangeable.
213217 $( mw ).trigger ( 'EmbedPlayerNewPlayer', $( '#' + playerInterface.id ).get(0) );
214218
215219 // Add a player ready binding:
@@ -216,6 +220,7 @@
217221
218222 // Issue the checkPlayerSources call to the new player
219223 // interface: make sure to use the element that is in the DOM:
 224+ // TODO: (from review) should be same as swapPlayer?
220225 $( '#' + playerInterface.id ).get(0).checkPlayerSources();
221226
222227 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r98224moved proccessEmbedPlayers into its own file.dale15:41, 27 September 2011
r98225use a direct pointer to the inDomPlayer ( instead of circular reference via j...dale15:51, 27 September 2011

Status & tagging log