Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js |
— | — | @@ -213,11 +213,13 @@ |
214 | 214 | break; |
215 | 215 | case 'img': |
216 | 216 | this.transformImageForTime( smilElement, animateTime ); |
217 | | - break; |
| 217 | + break; |
218 | 218 | case 'video': |
219 | | - case 'audio': |
220 | 219 | this.transformMediaForTime( smilElement, animateTime ); |
221 | 220 | break; |
| 221 | + case 'audio': |
| 222 | + // audio has no frame transform ( only playback ) |
| 223 | + break; |
222 | 224 | } |
223 | 225 | }, |
224 | 226 | |
— | — | @@ -253,30 +255,30 @@ |
254 | 256 | * Used to support video playback |
255 | 257 | */ |
256 | 258 | transformMediaForPlayback: function( smilElement, animateTime ){ |
257 | | - var $vid = $j ( '#' + this.smil.getSmilElementPlayerID( smilElement ) ); |
| 259 | + var $media = $j ( '#' + this.smil.getSmilElementPlayerID( smilElement ) ); |
258 | 260 | |
259 | 261 | // Set activePlayback flag ( informs edit and buffer actions ) |
260 | 262 | $j( smilElement ).data('activePlayback', true) |
261 | 263 | |
262 | 264 | // Make the video is being displayed and get a pointer to the video element: |
263 | | - var vid = $vid.show().get( 0 ); |
| 265 | + var media = $media.show().get( 0 ); |
264 | 266 | |
265 | 267 | // Set volume to master volume |
266 | | - vid.volume = this.smil.embedPlayer.volume; |
| 268 | + media.volume = this.smil.embedPlayer.volume; |
267 | 269 | |
268 | 270 | // Seek to correct time if off by more than 1 second |
269 | 271 | // ( buffer delays management things insync below this range ) |
270 | 272 | |
271 | 273 | // Check the buffer if we can play this time and the video is "paused" ( if so start playback ) |
272 | 274 | if( this.smil.getBuffer().canPlayTime( smilElement, animateTime ) |
273 | | - && vid.paused |
| 275 | + && media.paused |
274 | 276 | ) { |
275 | 277 | //mw.log( "transformMediaForPlayback:: should play:" + animateTime ); |
276 | | - vid.play(); |
| 278 | + media.play(); |
277 | 279 | return ; |
278 | 280 | } |
279 | 281 | // Else issue the initial "play" request |
280 | | - vid.play(); |
| 282 | + media.play(); |
281 | 283 | }, |
282 | 284 | |
283 | 285 | /** |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerServer.js |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | _this.currentSequencePage = _this.parseSequencerPage( smilPage ); |
110 | 110 | // Cache the latest serverSmil ( for local change checks ) |
111 | 111 | // ( save requests automatically respond with warnings on other user updates ) |
112 | | - _this.serverSmilXml =_this.currentSequencePage.sequenceXML; |
| 112 | + _this.serverSmilXml = _this.currentSequencePage.sequenceXML ; |
113 | 113 | |
114 | 114 | // Cache the pre / post bits |
115 | 115 | |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | _this.currentSequencePage.pageStart ="\nTo edit this sequence " + |
123 | 123 | '[{{fullurl:{{FULLPAGENAME}}|withJS=MediaWiki:MwEmbed.js}} enable the sequencer] for this page'; |
124 | 124 | } |
125 | | - return _this.currentSequencePage.pageStart + |
| 125 | + return _this.currentSequencePage.pageStart + |
126 | 126 | "\n\n<!-- " + SEQUENCER_PAYLOADKEY + "\n" + |
127 | 127 | xmlString + |
128 | 128 | "\n\n " + SEQUENCER_PAYLOADKEY + " -->\n" + |
— | — | @@ -139,10 +139,17 @@ |
140 | 140 | } |
141 | 141 | // trim the output: |
142 | 142 | return { |
143 | | - 'pageStart' : pageText.substring(0, pageText.indexOf( startKey ) ), |
144 | | - 'sequenceXML' : pageText.substring( pageText.indexOf( startKey ) + startKey.length, |
145 | | - pageText.indexOf(endKey ) ), |
146 | | - 'pageEnd' : pageText.substring( pageText.indexOf(endKey) + endKey.length ) |
| 143 | + 'pageStart' : $j.trim( |
| 144 | + pageText.substring(0, pageText.indexOf( startKey ) ) |
| 145 | + ), |
| 146 | + 'sequenceXML' : $j.trim( |
| 147 | + pageText.substring( pageText.indexOf( startKey ) + startKey.length, |
| 148 | + pageText.indexOf(endKey ) |
| 149 | + ) |
| 150 | + ), |
| 151 | + 'pageEnd' : $j.trim( |
| 152 | + pageText.substring( pageText.indexOf(endKey) + endKey.length ) |
| 153 | + ) |
147 | 154 | } |
148 | 155 | }, |
149 | 156 | |