http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73023

Revision: 73023
Author:   dale
Date:     2010-09-14 21:46:26 +0000 (Tue, 14 Sep 2010)

Log Message:
-----------
fixed target reference in sequencer tools

Modified Paths:
--------------
    branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
    branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
    branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js

Modified: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
===================================================================
--- branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js   
2010-09-14 21:25:02 UTC (rev 73022)
+++ branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js   
2010-09-14 21:46:26 UTC (rev 73023)
@@ -738,7 +738,7 @@
                        'onChange': function( _this, smilElement ){             
                
                                var smil = _this.sequencer.getSmil();
                                // Update the preview thumbs
-                               
+                               var $target = $j( '#editWidgets_trimTimeline' );
                                // (local function so it can be updated after 
the start time is done with its draw ) 
                                var updateDurationThumb = function(){
                                        // Check the duration:
@@ -747,7 +747,7 @@
                                                // Render a thumbnail for the 
updated duration  
                                                
smil.getLayout().drawSmilElementToTarget(                                       
                
                                                        smilElement,
-                                                       $j( target 
).find('.trimEndThumb'),
+                                                       
$target.find('.trimEndThumb'),
                                                        clipDur
                                                );
                                        }
@@ -755,13 +755,13 @@
                                
                                var clipBeginTime = 
$j('#editTool_trim_clipBegin').val();
                                if( !clipBeginTime ){
-                                       
$j(target).find('.trimStartThumb').hide();
+                                       $target.find('.trimStartThumb').hide();
                                } else {
                                        mw.log("Should update trimStartThumb::" 
+  $j(smilElement).attr('clipBegin') );
                                        // Render a thumbnail for relative 
start time = 0  
                                        
smil.getLayout().drawSmilElementToTarget(                                       
        
                                                smilElement, 
-                                               $j( target 
).find('.trimStartThumb'),
+                                               $target.find('.trimStartThumb'),
                                                0,
                                                updateDurationThumb()
                                        )

Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js     
2010-09-14 21:25:02 UTC (rev 73022)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilAnimate.js     
2010-09-14 21:46:26 UTC (rev 73023)
@@ -190,6 +190,7 @@
                //mw.log( 'checkForTransformUpdate::' + nodeName +' ' +  
animateTime ); 
                return false;
        },
+       
        /** 
         * Transform Element in an inner animation loop
         */
@@ -236,7 +237,9 @@
                // Get the video element 
                var assetId = this.smil.getSmilElementPlayerID( smilElement );
                var vid = $j ( '#' + assetId ).get( 0 );                
+               mw.log( "SmilAnimate::transformMediaForTime:" + assetId + " 
ct:" +vid.currentTime + ' should be: ' + mediaSeekTime );
                
+               
                var mediaSeekTime = animateTime;
                //Add the clipBegin if set
                if( $j( smilElement ).attr( 'clipBegin') && 
@@ -245,8 +248,6 @@
                        mediaSeekTime += this.smil.parseTime( $j( smilElement 
).attr( 'clipBegin') );  
                }
                                
-               //mw.log( "SmilAnimate::transformMediaForTime:" + assetId + " 
ct:" +vid.currentTime + ' should be: ' + mediaSeekTime );
-               
                // Register a buffer ready callback
                this.smil.getBuffer().mediaBufferSeek( smilElement, 
mediaSeekTime, function() {                 
                        //mw.log( "transformMediaForTime:: seek complete ")

Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js      
2010-09-14 21:25:02 UTC (rev 73022)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilBuffer.js      
2010-09-14 21:46:26 UTC (rev 73023)
@@ -332,7 +332,8 @@
        canPlayTime: function( smilElement, time ){
                switch( this.smil.getRefType( smilElement ) ){
                        case 'video':
-                               return this.canPlayVideoTime(  smilElement, 
time );                             
+                       case 'audio':
+                               return this.canPlayMediaTime(  smilElement, 
time );                             
                        break;
                }
                // by default return true 
@@ -342,7 +343,7 @@
        /**
         * Register a video loading progress indicator and check the time 
against the requested time 
         */
-       canPlayVideoTime: function( smilVideoElement, time ){
+       canPlayMediaTime: function( smilVideoElement, time ){
                var _this = this;
                var assetId = this.smil.getSmilElementPlayerID( 
smilVideoElement );
                var $vid = $j( '#' + assetId );



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to