http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72174
Revision: 72174
Author: dale
Date: 2010-09-01 23:07:26 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
* fixed audio playback in sequence editor preview
Modified Paths:
--------------
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
2010-09-01 23:01:43 UTC (rev 72173)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
2010-09-01 23:07:26 UTC (rev 72174)
@@ -27,6 +27,7 @@
// Pause the animation of a given element ( presently just
video )
switch( this.smil.getRefType( smilElement ) ){
case 'video':
+ case 'audio':
$j ( '#' + this.smil.getPageDomId( smilElement
) ).get( 0 ).pause();
break;
}
@@ -89,8 +90,10 @@
// Check for special playback types that for playback animation
action:
- if( this.smil.getRefType( smilElement ) == 'video' ){
- this.transformVideoForPlayback( smilElement,
animateTime );
+ if( this.smil.getRefType( smilElement ) == 'video'
+ ||
+ this.smil.getRefType( smilElement ) == 'audio' ){
+ this.transformMediaForPlayback( smilElement,
animateTime );
}
// Check if the current smilElement has any transforms to be
done
@@ -242,7 +245,7 @@
/**
* Used to support video playback
*/
- transformVideoForPlayback: function( smilElement, animateTime ){
+ transformMediaForPlayback: function( smilElement, animateTime ){
var $vid = $j ( '#' + this.smil.getPageDomId( smilElement ) );
// Set activePlayback flag ( informs edit and buffer actions )
@@ -261,7 +264,7 @@
if( this.smil.getBuffer().canPlayTime( smilElement, animateTime
)
&& vid.paused
) {
- //mw.log( "transformVideoForPlayback:: should play:" +
animateTime );
+ //mw.log( "transformMediaForPlayback:: should play:" +
animateTime );
vid.play();
return ;
}
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
2010-09-01 23:01:43 UTC (rev 72173)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBody.js
2010-09-01 23:07:26 UTC (rev 72174)
@@ -129,9 +129,7 @@
* Also See: http://www.firefogg.org/dev/render.html
*
* Note if we could "blend" or play two audio files at the same time
- * none of this would be needed
- *
- * ie this code should be replaced once we add improved audio support
+ * that would be more ideal.
*
* @return {Object} an array of audio with the following properties:
* start The start offset of the audio asset.
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs