Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js |
— | — | @@ -129,9 +129,7 @@ |
130 | 130 | * Also See: http://www.firefogg.org/dev/render.html |
131 | 131 | * |
132 | 132 | * Note if we could "blend" or play two audio files at the same time |
133 | | - * none of this would be needed |
134 | | - * |
135 | | - * ie this code should be replaced once we add improved audio support |
| 133 | + * that would be more ideal. |
136 | 134 | * |
137 | 135 | * @return {Object} an array of audio with the following properties: |
138 | 136 | * start The start offset of the audio asset. |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js |
— | — | @@ -27,6 +27,7 @@ |
28 | 28 | // Pause the animation of a given element ( presently just video ) |
29 | 29 | switch( this.smil.getRefType( smilElement ) ){ |
30 | 30 | case 'video': |
| 31 | + case 'audio': |
31 | 32 | $j ( '#' + this.smil.getPageDomId( smilElement ) ).get( 0 ).pause(); |
32 | 33 | break; |
33 | 34 | } |
— | — | @@ -89,8 +90,10 @@ |
90 | 91 | |
91 | 92 | |
92 | 93 | // Check for special playback types that for playback animation action: |
93 | | - if( this.smil.getRefType( smilElement ) == 'video' ){ |
94 | | - this.transformVideoForPlayback( smilElement, animateTime ); |
| 94 | + if( this.smil.getRefType( smilElement ) == 'video' |
| 95 | + || |
| 96 | + this.smil.getRefType( smilElement ) == 'audio' ){ |
| 97 | + this.transformMediaForPlayback( smilElement, animateTime ); |
95 | 98 | } |
96 | 99 | |
97 | 100 | // Check if the current smilElement has any transforms to be done |
— | — | @@ -242,7 +245,7 @@ |
243 | 246 | /** |
244 | 247 | * Used to support video playback |
245 | 248 | */ |
246 | | - transformVideoForPlayback: function( smilElement, animateTime ){ |
| 249 | + transformMediaForPlayback: function( smilElement, animateTime ){ |
247 | 250 | var $vid = $j ( '#' + this.smil.getPageDomId( smilElement ) ); |
248 | 251 | |
249 | 252 | // Set activePlayback flag ( informs edit and buffer actions ) |
— | — | @@ -261,7 +264,7 @@ |
262 | 265 | if( this.smil.getBuffer().canPlayTime( smilElement, animateTime ) |
263 | 266 | && vid.paused |
264 | 267 | ) { |
265 | | - //mw.log( "transformVideoForPlayback:: should play:" + animateTime ); |
| 268 | + //mw.log( "transformMediaForPlayback:: should play:" + animateTime ); |
266 | 269 | vid.play(); |
267 | 270 | return ; |
268 | 271 | } |