Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js |
— | — | @@ -190,6 +190,7 @@ |
191 | 191 | //mw.log( 'checkForTransformUpdate::' + nodeName +' ' + animateTime ); |
192 | 192 | return false; |
193 | 193 | }, |
| 194 | + |
194 | 195 | /** |
195 | 196 | * Transform Element in an inner animation loop |
196 | 197 | */ |
— | — | @@ -236,7 +237,9 @@ |
237 | 238 | // Get the video element |
238 | 239 | var assetId = this.smil.getSmilElementPlayerID( smilElement ); |
239 | 240 | var vid = $j ( '#' + assetId ).get( 0 ); |
| 241 | + mw.log( "SmilAnimate::transformMediaForTime:" + assetId + " ct:" +vid.currentTime + ' should be: ' + mediaSeekTime ); |
240 | 242 | |
| 243 | + |
241 | 244 | var mediaSeekTime = animateTime; |
242 | 245 | //Add the clipBegin if set |
243 | 246 | if( $j( smilElement ).attr( 'clipBegin') && |
— | — | @@ -245,8 +248,6 @@ |
246 | 249 | mediaSeekTime += this.smil.parseTime( $j( smilElement ).attr( 'clipBegin') ); |
247 | 250 | } |
248 | 251 | |
249 | | - //mw.log( "SmilAnimate::transformMediaForTime:" + assetId + " ct:" +vid.currentTime + ' should be: ' + mediaSeekTime ); |
250 | | - |
251 | 252 | // Register a buffer ready callback |
252 | 253 | this.smil.getBuffer().mediaBufferSeek( smilElement, mediaSeekTime, function() { |
253 | 254 | //mw.log( "transformMediaForTime:: seek complete ") |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js |
— | — | @@ -332,7 +332,8 @@ |
333 | 333 | canPlayTime: function( smilElement, time ){ |
334 | 334 | switch( this.smil.getRefType( smilElement ) ){ |
335 | 335 | case 'video': |
336 | | - return this.canPlayVideoTime( smilElement, time ); |
| 336 | + case 'audio': |
| 337 | + return this.canPlayMediaTime( smilElement, time ); |
337 | 338 | break; |
338 | 339 | } |
339 | 340 | // by default return true |
— | — | @@ -342,7 +343,7 @@ |
343 | 344 | /** |
344 | 345 | * Register a video loading progress indicator and check the time against the requested time |
345 | 346 | */ |
346 | | - canPlayVideoTime: function( smilVideoElement, time ){ |
| 347 | + canPlayMediaTime: function( smilVideoElement, time ){ |
347 | 348 | var _this = this; |
348 | 349 | var assetId = this.smil.getSmilElementPlayerID( smilVideoElement ); |
349 | 350 | var $vid = $j( '#' + assetId ); |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js |
— | — | @@ -738,7 +738,7 @@ |
739 | 739 | 'onChange': function( _this, smilElement ){ |
740 | 740 | var smil = _this.sequencer.getSmil(); |
741 | 741 | // Update the preview thumbs |
742 | | - |
| 742 | + var $target = $j( '#editWidgets_trimTimeline' ); |
743 | 743 | // (local function so it can be updated after the start time is done with its draw ) |
744 | 744 | var updateDurationThumb = function(){ |
745 | 745 | // Check the duration: |
— | — | @@ -747,7 +747,7 @@ |
748 | 748 | // Render a thumbnail for the updated duration |
749 | 749 | smil.getLayout().drawSmilElementToTarget( |
750 | 750 | smilElement, |
751 | | - $j( target ).find('.trimEndThumb'), |
| 751 | + $target.find('.trimEndThumb'), |
752 | 752 | clipDur |
753 | 753 | ); |
754 | 754 | } |
— | — | @@ -755,13 +755,13 @@ |
756 | 756 | |
757 | 757 | var clipBeginTime = $j('#editTool_trim_clipBegin').val(); |
758 | 758 | if( !clipBeginTime ){ |
759 | | - $j(target).find('.trimStartThumb').hide(); |
| 759 | + $target.find('.trimStartThumb').hide(); |
760 | 760 | } else { |
761 | 761 | mw.log("Should update trimStartThumb::" + $j(smilElement).attr('clipBegin') ); |
762 | 762 | // Render a thumbnail for relative start time = 0 |
763 | 763 | smil.getLayout().drawSmilElementToTarget( |
764 | 764 | smilElement, |
765 | | - $j( target ).find('.trimStartThumb'), |
| 765 | + $target.find('.trimStartThumb'), |
766 | 766 | 0, |
767 | 767 | updateDurationThumb() |
768 | 768 | ) |