Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js |
— | — | @@ -7,6 +7,7 @@ |
8 | 8 | * mw.PlayerControlBuilder Handles skinning of the player controls |
9 | 9 | */ |
10 | 10 | |
| 11 | +// TODO: (from review) move code that's immediately invoked into another file, for clarity. |
11 | 12 | ( function( mw, $ ) { |
12 | 13 | |
13 | 14 | |
— | — | @@ -206,9 +207,12 @@ |
207 | 208 | mw.log("EmbedPlayer::runPlayerSwap::" + $( playerElement ).attr('id') ); |
208 | 209 | |
209 | 210 | var playerInterface = new mw.EmbedPlayer( playerElement ); |
210 | | - var swapPlayer = swapEmbedPlayerElement( playerElement, playerInterface ); |
| 211 | + var swapPlayer = swapEmbedPlayerElement( playerElement, playerInterface ); |
| 212 | + |
211 | 213 | // Trigger the EmbedPlayerNewPlayer for embedPlayer interface |
212 | 214 | 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. |
213 | 217 | $( mw ).trigger ( 'EmbedPlayerNewPlayer', $( '#' + playerInterface.id ).get(0) ); |
214 | 218 | |
215 | 219 | // Add a player ready binding: |
— | — | @@ -216,6 +220,7 @@ |
217 | 221 | |
218 | 222 | // Issue the checkPlayerSources call to the new player |
219 | 223 | // interface: make sure to use the element that is in the DOM: |
| 224 | + // TODO: (from review) should be same as swapPlayer? |
220 | 225 | $( '#' + playerInterface.id ).get(0).checkPlayerSources(); |
221 | 226 | |
222 | 227 | } |