r72172 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72171‎ | r72172 | r72173 >
Date:23:00, 1 September 2010
Author:dale
Status:deferred
Tags:
Comment:
fixed in sequence editor playback of sequence
Modified paths:
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/SwarmTransport/loader.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js
@@ -75,6 +75,7 @@
7676 // Check for data url
7777 var dataUrlKey = 'data:text/xml;charset=utf-8,';
7878 if( url.indexOf( dataUrlKey ) === 0 ){
 79+ // Load the smil document from the data url:
7980 _this.loadFromString(
8081 unescape( url.substr( dataUrlKey.length ) )
8182 );
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
@@ -50,7 +50,8 @@
5151 * Put the embed player into the container
5252 */
5353 doEmbedPlayer: function() {
54 - var _this = this;
 54+ var _this = this;
 55+
5556 // check if we have already embed the player:
5657 if( this.smilPlayerEmbedded ){
5758 return;
@@ -148,8 +149,17 @@
149150 play: function( playSegmentEndTime ){
150151 var _this = this;
151152 mw.log(" EmbedPlayerSmil::play " + _this.smilPlayTime + ' to ' + playSegmentEndTime + ' pause time: ' + this.smilPauseTime );
 153+
 154+ // Set thumbnail_disp to false
 155+ this.thumbnail_disp = false;
 156+
 157+ // Update clock start time
 158+ _this.clockStartTime = new Date().getTime()
 159+
152160 // Update the interface
153161 this.parent_play();
 162+
 163+ // xxx set player to 'loading / buffering'
154164
155165 // Update the playSegmentEndTime flag
156166 if( ! playSegmentEndTime ){
@@ -159,13 +169,18 @@
160170 }
161171
162172 // Make sure this.smil is ready :
163 - this.getSmil( function( smil ){
 173+ this.getSmil( function( smil ){
 174+
164175 // Start buffering the movie
165176 _this.smil.startBuffer();
166 -
 177+
 178+ if( isNaN( _this.smilPlayTime ) ){
 179+ _this.smilPlayTime = 0;
 180+ }
167181 // Sync with current smilPlayTime
168 - _this.clockStartTime = new Date().getTime() -( _this.smilPlayTime * 1000 );
169 -
 182+ _this.clockStartTime = new Date().getTime() - ( _this.smilPlayTime * 1000 );
 183+ mw.log('smil callback set clockTime: ' + new Date().getTime() +
 184+ '-' + ' splaytime: ' + _this.smilPlayTime +' x1000' );
170185 // Zero out the pause time:
171186 _this.smilPauseTime = 0;
172187
@@ -187,6 +202,7 @@
188203 },
189204
190205 stop: function(){
 206+ mw.log("EmbedSmilPlayer:: stop");
191207 this.smilPlayTime = 0;
192208 this.smilPauseTime = 0;
193209 this.setCurrentTime( 0 );
@@ -218,8 +234,9 @@
219235 /**
220236 * Monitor function render a given time
221237 */
222 - monitor: function(){
 238+ monitor: function(){
223239 // Get a local variable of the new target time:
 240+ //mw.log("smilPlayer::monitor: isPlaying:" + this.isPlaying() + ' pausedForBuffer:' + this.pausedForBuffer + ' playtime:' + this.smilPlayTime);
224241
225242 // Check if we reached playSegmentEndTime and pause playback
226243 if( this.playSegmentEndTime && this.smilPlayTime >= this.playSegmentEndTime ) {
@@ -255,13 +272,14 @@
256273
257274 if( !this.pausedForBuffer ){
258275 // Update playtime if not pausedForBuffer
259 - this.smilPlayTime = this.smilPauseTime + ( ( new Date().getTime() - this.clockStartTime ) / 1000 );
260 - /*
261 - mw.log(" update smilPlayTime: " + this.smilPauseTime + " getTime: " + new Date().getTime() +
 276+ this.smilPlayTime = this.smilPauseTime +
 277+ ( ( new Date().getTime() - this.clockStartTime ) / 1000 );
 278+
 279+ /*mw.log(" update smilPlayTime: " + this.smilPauseTime + " getTime: " + new Date().getTime() +
262280 ' - clockStartTime: ' + this.clockStartTime + ' = ' +
263281 ( ( new Date().getTime() - this.clockStartTime ) / 1000 ) +
264 - " \n time:" + this.smilPlayTime );
265 - */
 282+ " \n time:" + this.smilPlayTime );*/
 283+
266284 }
267285
268286 // Reset the pausedForBuffer flag:
Index: branches/MwEmbedStandAlone/modules/SwarmTransport/loader.js
@@ -15,7 +15,7 @@
1616 /**
1717 * If SwarmTransport should be enabled by default as video transport mechanism
1818 */
19 - 'SwarmTransport.Enable': true,
 19+ 'SwarmTransport.Enable': false,
2020
2121 /**
2222 * If the swarm transport plugin should be recommended if the user does not have it installed.
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
@@ -2813,6 +2813,8 @@
28142814 this.showThumbnail();
28152815 this.bufferedPercent = 0; // reset buffer state
28162816 this.controlBuilder.setStatus( this.getTimeRange() );
 2817+ // stop monitor:
 2818+ this.monitorInterval = null;
28172819
28182820 // Reset the playhead
28192821 mw.log("EmbedPlayer::Stop:: Reset play head")
@@ -3081,6 +3083,7 @@
30823084 }, this.monitorRate )
30833085 }
30843086 } else {
 3087+ mw.log("EmbedPlayer::monitor: player is stoped, stop monitor")
30853088 // If stopped "stop" monitor:
30863089 clearInterval( this.monitorInterval );
30873090 }
Index: branches/MwEmbedStandAlone/modules/Sequencer/loader.js
@@ -7,7 +7,7 @@
88
99 // Loader configuration options ( all runtime options are stored in mw.SequencerConfig.js )
1010 mw.setDefaultConfig({
11 - 'Sequencer.KalturaPlayerEditOverlay' : true
 11+ 'Sequencer.KalturaPlayerEditOverlay' : false
1212 });
1313
1414

Status & tagging log