Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js |
— | — | @@ -1598,11 +1598,12 @@ |
1599 | 1599 | // Run embedPlayer sources hook |
1600 | 1600 | mw.runTriggersCallback( _this, 'checkPlayerSourcesEvent', function(){ |
1601 | 1601 | _this.checkForTimedText(); |
1602 | | - }) |
1603 | | - } |
| 1602 | + }); |
| 1603 | + }; |
1604 | 1604 | |
1605 | | - // NOTE: Should could be moved to mediaWiki Api support module |
1606 | | - if ( _this.apiTitleKey ) { |
| 1605 | + // NOTE: Should could be moved to mediaWiki Api support module |
| 1606 | + // only load from api if sources are empty: |
| 1607 | + if ( _this.apiTitleKey && this.mediaElement.sources.length == 0) { |
1607 | 1608 | // Load media from external data |
1608 | 1609 | mw.log( 'EmbedPlayer::checkPlayerSources: loading apiTitleKey data' ); |
1609 | 1610 | _this.loadSourceFromApi( function(){ |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | _this.getMenu().drawMenu(); |
168 | 168 | |
169 | 169 | // initialize the edit stack to support undo / redo actions |
170 | | - _this.getActionsEdit().setupEditStack(); |
| 170 | + _this.getActionsEdit().setupEditStack(); |
171 | 171 | }); |
172 | 172 | |
173 | 173 | }, |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js |
— | — | @@ -110,8 +110,13 @@ |
111 | 111 | // XXX need to support multipe pages in single context |
112 | 112 | _this.currentSequencePage = _this.parseSequencerPage( smilPage ); |
113 | 113 | // Cache the latest serverSmil ( for local change checks ) |
114 | | - // ( save requests automatically respond with warnings on other user updates ) |
115 | | - _this.serverSmilXml = _this.currentSequencePage.sequenceXML ; |
| 114 | + // ( save requests automatically respond with warnings on other user updates ) |
| 115 | + if( _this.currentSequencePage.sequenceXML ){ |
| 116 | + _this.serverSmilXml = _this.currentSequencePage.sequenceXML ; |
| 117 | + } else { |
| 118 | + // empty result |
| 119 | + _this.serverSmilXml = ''; |
| 120 | + } |
116 | 121 | |
117 | 122 | // Cache the pre / post bits |
118 | 123 | |
— | — | @@ -143,8 +148,8 @@ |
144 | 149 | var endKey = SEQUENCER_PAYLOADKEY + ' -->'; |
145 | 150 | // If the key is not found fail |
146 | 151 | if( !pageText || pageText.indexOf( startKey ) == -1 || pageText.indexOf(endKey) == -1 ){ |
147 | | - mw.log("Error could not find sequence payload"); |
148 | | - return ''; |
| 152 | + mw.log( "Error could not find sequence payload" ); |
| 153 | + return {}; |
149 | 154 | } |
150 | 155 | // trim the output: |
151 | 156 | return { |
Index: branches/MwEmbedStandAlone/remotes/mediaWiki.js |
— | — | @@ -363,7 +363,7 @@ |
364 | 364 | poster_attr = ''; |
365 | 365 | pheight = 0; |
366 | 366 | }else{ |
367 | | - var poster_attr = 'poster = "' + $pimg.attr( 'src' ) + '" '; |
| 367 | + var poster_attr = ' poster = "' + $pimg.attr( 'src' ) + '" '; |
368 | 368 | var pheight = $pimg.attr( 'height' ); |
369 | 369 | } |
370 | 370 | |