Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js |
— | — | @@ -1596,14 +1596,13 @@ |
1597 | 1597 | // for each source with "native playback" |
1598 | 1598 | $sourceMenu = $('<ul />'); |
1599 | 1599 | |
1600 | | - // local function to closure the source variable scope: |
| 1600 | + // Local function to closure the "source" variable scope: |
1601 | 1601 | function addToSourceMenu( source ){ |
1602 | 1602 | // Check if source is selected: |
1603 | | - var icon =( source.getSrc() == embedPlayer.mediaElement.selectedSource.getSrc() ) ? 'bullet' : 'radio-on'; |
| 1603 | + var icon = ( source.getSrc() == embedPlayer.mediaElement.selectedSource.getSrc() ) ? 'bullet' : 'radio-on'; |
1604 | 1604 | $sourceMenu.append( |
1605 | 1605 | $.getLineItem( source.shorttitle, icon, function(){ |
1606 | 1606 | mw.log( 'PlayerControlBuilder::SwichSourceMenu: ' + source.getSrc() ); |
1607 | | - |
1608 | 1607 | // TODO this logic should be in mw.EmbedPlayer |
1609 | 1608 | embedPlayer.mediaElement.setSource( source ); |
1610 | 1609 | if( ! _this.embedPlayer.isStopped() ){ |
— | — | @@ -1632,7 +1631,6 @@ |
1633 | 1632 | } |
1634 | 1633 | } |
1635 | 1634 | }); |
1636 | | - |
1637 | 1635 | return $sourceMenu; |
1638 | 1636 | }, |
1639 | 1637 | |
Index: trunk/extensions/TimedMediaHandler/MwEmbedModules/EmbedPlayer/resources/mw.MediaSource.js |
— | — | @@ -115,14 +115,14 @@ |
116 | 116 | var sourceAttr = mw.getConfig( 'EmbedPlayer.SourceAttributes' ); |
117 | 117 | $.each(sourceAttr, function(inx, attr){ |
118 | 118 | if ( $j( element ).attr( attr ) ) { |
| 119 | + var attrName = attr; |
119 | 120 | // strip data- from the attribute name |
120 | 121 | if( attr.indexOf('data-') === 0){ |
121 | | - attr = attr.substr(5); |
| 122 | + attrName = attr.substr(5); |
122 | 123 | } |
123 | | - _this[ attr ] = $j( element ).attr( attr ); |
| 124 | + _this[ attrName ] = $( element ).attr( attr ); |
124 | 125 | } |
125 | 126 | }); |
126 | | - |
127 | 127 | // Normalize "label" to "title" ( label is the actual spec so use that over title ) |
128 | 128 | if( this.label ){ |
129 | 129 | this.title = this.label; |