http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72172
Revision: 72172
Author: dale
Date: 2010-09-01 23:00:02 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
fixed in sequence editor playback of sequence
Modified Paths:
--------------
branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
branches/MwEmbedStandAlone/modules/Sequencer/loader.js
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js
branches/MwEmbedStandAlone/modules/SwarmTransport/loader.js
Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
===================================================================
--- branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
2010-09-01 22:37:19 UTC (rev 72171)
+++ branches/MwEmbedStandAlone/modules/EmbedPlayer/mw.EmbedPlayer.js
2010-09-01 23:00:02 UTC (rev 72172)
@@ -2813,6 +2813,8 @@
this.showThumbnail();
this.bufferedPercent = 0; // reset buffer state
this.controlBuilder.setStatus( this.getTimeRange() );
+ // stop monitor:
+ this.monitorInterval = null;
// Reset the playhead
mw.log("EmbedPlayer::Stop:: Reset play head")
@@ -3081,6 +3083,7 @@
}, this.monitorRate )
}
} else {
+ mw.log("EmbedPlayer::monitor: player is stoped, stop
monitor")
// If stopped "stop" monitor:
clearInterval( this.monitorInterval );
}
Modified: branches/MwEmbedStandAlone/modules/Sequencer/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/Sequencer/loader.js 2010-09-01
22:37:19 UTC (rev 72171)
+++ branches/MwEmbedStandAlone/modules/Sequencer/loader.js 2010-09-01
23:00:02 UTC (rev 72172)
@@ -7,7 +7,7 @@
// Loader configuration options ( all runtime options are stored in
mw.SequencerConfig.js )
mw.setDefaultConfig({
- 'Sequencer.KalturaPlayerEditOverlay' : true
+ 'Sequencer.KalturaPlayerEditOverlay' : false
});
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
2010-09-01 22:37:19 UTC (rev 72171)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js
2010-09-01 23:00:02 UTC (rev 72172)
@@ -50,7 +50,8 @@
* Put the embed player into the container
*/
doEmbedPlayer: function() {
- var _this = this;
+ var _this = this;
+
// check if we have already embed the player:
if( this.smilPlayerEmbedded ){
return;
@@ -148,8 +149,17 @@
play: function( playSegmentEndTime ){
var _this = this;
mw.log(" EmbedPlayerSmil::play " + _this.smilPlayTime + ' to '
+ playSegmentEndTime + ' pause time: ' + this.smilPauseTime );
+
+ // Set thumbnail_disp to false
+ this.thumbnail_disp = false;
+
+ // Update clock start time
+ _this.clockStartTime = new Date().getTime()
+
// Update the interface
this.parent_play();
+
+ // xxx set player to 'loading / buffering'
// Update the playSegmentEndTime flag
if( ! playSegmentEndTime ){
@@ -159,13 +169,18 @@
}
// Make sure this.smil is ready :
- this.getSmil( function( smil ){
+ this.getSmil( function( smil ){
+
// Start buffering the movie
_this.smil.startBuffer();
-
+
+ if( isNaN( _this.smilPlayTime ) ){
+ _this.smilPlayTime = 0;
+ }
// Sync with current smilPlayTime
- _this.clockStartTime = new Date().getTime() -(
_this.smilPlayTime * 1000 );
-
+ _this.clockStartTime = new Date().getTime() - (
_this.smilPlayTime * 1000 );
+ mw.log('smil callback set clockTime: ' + new
Date().getTime() +
+ '-' + ' splaytime: ' +
_this.smilPlayTime +' x1000' );
// Zero out the pause time:
_this.smilPauseTime = 0;
@@ -187,6 +202,7 @@
},
stop: function(){
+ mw.log("EmbedSmilPlayer:: stop");
this.smilPlayTime = 0;
this.smilPauseTime = 0;
this.setCurrentTime( 0 );
@@ -218,8 +234,9 @@
/**
* Monitor function render a given time
*/
- monitor: function(){
+ monitor: function(){
// Get a local variable of the new target time:
+ //mw.log("smilPlayer::monitor: isPlaying:" + this.isPlaying() +
' pausedForBuffer:' + this.pausedForBuffer + ' playtime:' + this.smilPlayTime);
// Check if we reached playSegmentEndTime and pause playback
if( this.playSegmentEndTime && this.smilPlayTime >=
this.playSegmentEndTime ) {
@@ -255,13 +272,14 @@
if( !this.pausedForBuffer ){
// Update playtime if not pausedForBuffer
- this.smilPlayTime = this.smilPauseTime + ( (
new Date().getTime() - this.clockStartTime ) / 1000 );
- /*
- mw.log(" update smilPlayTime: " +
this.smilPauseTime + " getTime: " + new Date().getTime() +
+ this.smilPlayTime = this.smilPauseTime +
+ ( ( new Date().getTime() -
this.clockStartTime ) / 1000 );
+
+ /*mw.log(" update smilPlayTime: " +
this.smilPauseTime + " getTime: " + new Date().getTime() +
' - clockStartTime: ' +
this.clockStartTime + ' = ' +
( ( new Date().getTime() -
this.clockStartTime ) / 1000 ) +
- " \n time:" + this.smilPlayTime
);
- */
+ " \n time:" + this.smilPlayTime
);*/
+
}
// Reset the pausedForBuffer flag:
Modified: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js 2010-09-01
22:37:19 UTC (rev 72171)
+++ branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js 2010-09-01
23:00:02 UTC (rev 72172)
@@ -75,6 +75,7 @@
// Check for data url
var dataUrlKey = 'data:text/xml;charset=utf-8,';
if( url.indexOf( dataUrlKey ) === 0 ){
+ // Load the smil document from the data url:
_this.loadFromString(
unescape( url.substr( dataUrlKey.length ) )
);
Modified: branches/MwEmbedStandAlone/modules/SwarmTransport/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/SwarmTransport/loader.js 2010-09-01
22:37:19 UTC (rev 72171)
+++ branches/MwEmbedStandAlone/modules/SwarmTransport/loader.js 2010-09-01
23:00:02 UTC (rev 72172)
@@ -15,7 +15,7 @@
/**
* If SwarmTransport should be enabled by default as video
transport mechanism
*/
- 'SwarmTransport.Enable': true,
+ 'SwarmTransport.Enable': false,
/**
* If the swarm transport plugin should be recommended if the
user does not have it installed.
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs