r72174 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72173‎ | r72174 | r72175 >
Date:23:07, 1 September 2010
Author:dale
Status:deferred
Tags:
Comment:
* fixed audio playback in sequence editor preview
Modified paths:
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
@@ -129,9 +129,7 @@
130130 * Also See: http://www.firefogg.org/dev/render.html
131131 *
132132 * 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.
136134 *
137135 * @return {Object} an array of audio with the following properties:
138136 * start The start offset of the audio asset.
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
@@ -27,6 +27,7 @@
2828 // Pause the animation of a given element ( presently just video )
2929 switch( this.smil.getRefType( smilElement ) ){
3030 case 'video':
 31+ case 'audio':
3132 $j ( '#' + this.smil.getPageDomId( smilElement ) ).get( 0 ).pause();
3233 break;
3334 }
@@ -89,8 +90,10 @@
9091
9192
9293 // 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 );
9598 }
9699
97100 // Check if the current smilElement has any transforms to be done
@@ -242,7 +245,7 @@
243246 /**
244247 * Used to support video playback
245248 */
246 - transformVideoForPlayback: function( smilElement, animateTime ){
 249+ transformMediaForPlayback: function( smilElement, animateTime ){
247250 var $vid = $j ( '#' + this.smil.getPageDomId( smilElement ) );
248251
249252 // Set activePlayback flag ( informs edit and buffer actions )
@@ -261,7 +264,7 @@
262265 if( this.smil.getBuffer().canPlayTime( smilElement, animateTime )
263266 && vid.paused
264267 ) {
265 - //mw.log( "transformVideoForPlayback:: should play:" + animateTime );
 268+ //mw.log( "transformMediaForPlayback:: should play:" + animateTime );
266269 vid.play();
267270 return ;
268271 }

Status & tagging log