Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js |
— | — | @@ -1570,7 +1570,7 @@ |
1571 | 1571 | .text( gM( 'mwe-embedplayer-choose_player' ) ) |
1572 | 1572 | ); |
1573 | 1573 | |
1574 | | - $.each( embedPlayer.mediaElement.getPlayableSources(), function( sourceId, source ) { |
| 1574 | + $.each( embedPlayer.mediaElement.getPlayableSources(), function( sourceIndex, source ) { |
1575 | 1575 | |
1576 | 1576 | var isPlayable = (typeof mw.EmbedTypes.getMediaPlayers().defaultPlayer( source.getMIMEType() ) == 'object' ); |
1577 | 1577 | var isSelected = ( source.getSrc() == embedPlayer.mediaElement.selectedSource.getSrc() ); |
— | — | @@ -1609,15 +1609,15 @@ |
1610 | 1610 | $playerLine = $( '<a />') |
1611 | 1611 | .attr({ |
1612 | 1612 | 'href' : '#', |
1613 | | - 'id' : 'sc_' + sourceId + '_' + supportingPlayers[i].id |
| 1613 | + 'id' : 'sc_' + sourceIndex + '_' + supportingPlayers[i].id |
1614 | 1614 | }) |
1615 | 1615 | .addClass( 'ui-corner-all') |
1616 | 1616 | .text( supportingPlayers[i].getName() ) |
1617 | 1617 | .click( function() { |
1618 | 1618 | var iparts = $( this ).attr( 'id' ).replace(/sc_/ , '' ).split( '_' ); |
1619 | | - var sourceId = iparts[0]; |
| 1619 | + var sourceIndex = iparts[0]; |
1620 | 1620 | var player_id = iparts[1]; |
1621 | | - mw.log( 'source id: ' + sourceId + ' player id: ' + player_id ); |
| 1621 | + mw.log( 'source index: ' + sourceIndex + ' player id: ' + player_id ); |
1622 | 1622 | |
1623 | 1623 | embedPlayer.controlBuilder.closeMenuOverlay(); |
1624 | 1624 | |
— | — | @@ -1626,12 +1626,12 @@ |
1627 | 1627 | _this.restoreWindowPlayer(); |
1628 | 1628 | } |
1629 | 1629 | |
1630 | | - embedPlayer.mediaElement.setSourceByIndex( sourceId ); |
| 1630 | + embedPlayer.mediaElement.setSourceByIndex( sourceIndex ); |
1631 | 1631 | var playableSources = embedPlayer.mediaElement.getPlayableSources(); |
1632 | 1632 | |
1633 | 1633 | mw.EmbedTypes.getMediaPlayers().setPlayerPreference( |
1634 | 1634 | player_id, |
1635 | | - playableSources[ sourceId ].getMIMEType() |
| 1635 | + playableSources[ sourceIndex ].getMIMEType() |
1636 | 1636 | ); |
1637 | 1637 | |
1638 | 1638 | // Issue a stop |