r73023 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73022‎ | r73023 | r73024 >
Date:21:46, 14 September 2010
Author:dale
Status:deferred
Tags:
Comment:
fixed target reference in sequencer tools
Modified paths:
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
@@ -190,6 +190,7 @@
191191 //mw.log( 'checkForTransformUpdate::' + nodeName +' ' + animateTime );
192192 return false;
193193 },
 194+
194195 /**
195196 * Transform Element in an inner animation loop
196197 */
@@ -236,7 +237,9 @@
237238 // Get the video element
238239 var assetId = this.smil.getSmilElementPlayerID( smilElement );
239240 var vid = $j ( '#' + assetId ).get( 0 );
 241+ mw.log( "SmilAnimate::transformMediaForTime:" + assetId + " ct:" +vid.currentTime + ' should be: ' + mediaSeekTime );
240242
 243+
241244 var mediaSeekTime = animateTime;
242245 //Add the clipBegin if set
243246 if( $j( smilElement ).attr( 'clipBegin') &&
@@ -245,8 +248,6 @@
246249 mediaSeekTime += this.smil.parseTime( $j( smilElement ).attr( 'clipBegin') );
247250 }
248251
249 - //mw.log( "SmilAnimate::transformMediaForTime:" + assetId + " ct:" +vid.currentTime + ' should be: ' + mediaSeekTime );
250 -
251252 // Register a buffer ready callback
252253 this.smil.getBuffer().mediaBufferSeek( smilElement, mediaSeekTime, function() {
253254 //mw.log( "transformMediaForTime:: seek complete ")
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js
@@ -332,7 +332,8 @@
333333 canPlayTime: function( smilElement, time ){
334334 switch( this.smil.getRefType( smilElement ) ){
335335 case 'video':
336 - return this.canPlayVideoTime( smilElement, time );
 336+ case 'audio':
 337+ return this.canPlayMediaTime( smilElement, time );
337338 break;
338339 }
339340 // by default return true
@@ -342,7 +343,7 @@
343344 /**
344345 * Register a video loading progress indicator and check the time against the requested time
345346 */
346 - canPlayVideoTime: function( smilVideoElement, time ){
 347+ canPlayMediaTime: function( smilVideoElement, time ){
347348 var _this = this;
348349 var assetId = this.smil.getSmilElementPlayerID( smilVideoElement );
349350 var $vid = $j( '#' + assetId );
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
@@ -738,7 +738,7 @@
739739 'onChange': function( _this, smilElement ){
740740 var smil = _this.sequencer.getSmil();
741741 // Update the preview thumbs
742 -
 742+ var $target = $j( '#editWidgets_trimTimeline' );
743743 // (local function so it can be updated after the start time is done with its draw )
744744 var updateDurationThumb = function(){
745745 // Check the duration:
@@ -747,7 +747,7 @@
748748 // Render a thumbnail for the updated duration
749749 smil.getLayout().drawSmilElementToTarget(
750750 smilElement,
751 - $j( target ).find('.trimEndThumb'),
 751+ $target.find('.trimEndThumb'),
752752 clipDur
753753 );
754754 }
@@ -755,13 +755,13 @@
756756
757757 var clipBeginTime = $j('#editTool_trim_clipBegin').val();
758758 if( !clipBeginTime ){
759 - $j(target).find('.trimStartThumb').hide();
 759+ $target.find('.trimStartThumb').hide();
760760 } else {
761761 mw.log("Should update trimStartThumb::" + $j(smilElement).attr('clipBegin') );
762762 // Render a thumbnail for relative start time = 0
763763 smil.getLayout().drawSmilElementToTarget(
764764 smilElement,
765 - $j( target ).find('.trimStartThumb'),
 765+ $target.find('.trimStartThumb'),
766766 0,
767767 updateDurationThumb()
768768 )

Status & tagging log