Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.Smil.js |
— | — | @@ -75,6 +75,7 @@ |
76 | 76 | // Check for data url |
77 | 77 | var dataUrlKey = 'data:text/xml;charset=utf-8,'; |
78 | 78 | if( url.indexOf( dataUrlKey ) === 0 ){ |
| 79 | + // Load the smil document from the data url: |
79 | 80 | _this.loadFromString( |
80 | 81 | unescape( url.substr( dataUrlKey.length ) ) |
81 | 82 | ); |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.EmbedPlayerSmil.js |
— | — | @@ -50,7 +50,8 @@ |
51 | 51 | * Put the embed player into the container |
52 | 52 | */ |
53 | 53 | doEmbedPlayer: function() { |
54 | | - var _this = this; |
| 54 | + var _this = this; |
| 55 | + |
55 | 56 | // check if we have already embed the player: |
56 | 57 | if( this.smilPlayerEmbedded ){ |
57 | 58 | return; |
— | — | @@ -148,8 +149,17 @@ |
149 | 150 | play: function( playSegmentEndTime ){ |
150 | 151 | var _this = this; |
151 | 152 | 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 | + |
152 | 160 | // Update the interface |
153 | 161 | this.parent_play(); |
| 162 | + |
| 163 | + // xxx set player to 'loading / buffering' |
154 | 164 | |
155 | 165 | // Update the playSegmentEndTime flag |
156 | 166 | if( ! playSegmentEndTime ){ |
— | — | @@ -159,13 +169,18 @@ |
160 | 170 | } |
161 | 171 | |
162 | 172 | // Make sure this.smil is ready : |
163 | | - this.getSmil( function( smil ){ |
| 173 | + this.getSmil( function( smil ){ |
| 174 | + |
164 | 175 | // Start buffering the movie |
165 | 176 | _this.smil.startBuffer(); |
166 | | - |
| 177 | + |
| 178 | + if( isNaN( _this.smilPlayTime ) ){ |
| 179 | + _this.smilPlayTime = 0; |
| 180 | + } |
167 | 181 | // 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' ); |
170 | 185 | // Zero out the pause time: |
171 | 186 | _this.smilPauseTime = 0; |
172 | 187 | |
— | — | @@ -187,6 +202,7 @@ |
188 | 203 | }, |
189 | 204 | |
190 | 205 | stop: function(){ |
| 206 | + mw.log("EmbedSmilPlayer:: stop"); |
191 | 207 | this.smilPlayTime = 0; |
192 | 208 | this.smilPauseTime = 0; |
193 | 209 | this.setCurrentTime( 0 ); |
— | — | @@ -218,8 +234,9 @@ |
219 | 235 | /** |
220 | 236 | * Monitor function render a given time |
221 | 237 | */ |
222 | | - monitor: function(){ |
| 238 | + monitor: function(){ |
223 | 239 | // Get a local variable of the new target time: |
| 240 | + //mw.log("smilPlayer::monitor: isPlaying:" + this.isPlaying() + ' pausedForBuffer:' + this.pausedForBuffer + ' playtime:' + this.smilPlayTime); |
224 | 241 | |
225 | 242 | // Check if we reached playSegmentEndTime and pause playback |
226 | 243 | if( this.playSegmentEndTime && this.smilPlayTime >= this.playSegmentEndTime ) { |
— | — | @@ -255,13 +272,14 @@ |
256 | 273 | |
257 | 274 | if( !this.pausedForBuffer ){ |
258 | 275 | // 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() + |
262 | 280 | ' - clockStartTime: ' + this.clockStartTime + ' = ' + |
263 | 281 | ( ( new Date().getTime() - this.clockStartTime ) / 1000 ) + |
264 | | - " \n time:" + this.smilPlayTime ); |
265 | | - */ |
| 282 | + " \n time:" + this.smilPlayTime );*/ |
| 283 | + |
266 | 284 | } |
267 | 285 | |
268 | 286 | // Reset the pausedForBuffer flag: |
Index: branches/MwEmbedStandAlone/modules/SwarmTransport/loader.js |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | /** |
17 | 17 | * If SwarmTransport should be enabled by default as video transport mechanism |
18 | 18 | */ |
19 | | - 'SwarmTransport.Enable': true, |
| 19 | + 'SwarmTransport.Enable': false, |
20 | 20 | |
21 | 21 | /** |
22 | 22 | * 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 @@ |
2814 | 2814 | this.showThumbnail(); |
2815 | 2815 | this.bufferedPercent = 0; // reset buffer state |
2816 | 2816 | this.controlBuilder.setStatus( this.getTimeRange() ); |
| 2817 | + // stop monitor: |
| 2818 | + this.monitorInterval = null; |
2817 | 2819 | |
2818 | 2820 | // Reset the playhead |
2819 | 2821 | mw.log("EmbedPlayer::Stop:: Reset play head") |
— | — | @@ -3081,6 +3083,7 @@ |
3082 | 3084 | }, this.monitorRate ) |
3083 | 3085 | } |
3084 | 3086 | } else { |
| 3087 | + mw.log("EmbedPlayer::monitor: player is stoped, stop monitor") |
3085 | 3088 | // If stopped "stop" monitor: |
3086 | 3089 | clearInterval( this.monitorInterval ); |
3087 | 3090 | } |
Index: branches/MwEmbedStandAlone/modules/Sequencer/loader.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | // Loader configuration options ( all runtime options are stored in mw.SequencerConfig.js ) |
10 | 10 | mw.setDefaultConfig({ |
11 | | - 'Sequencer.KalturaPlayerEditOverlay' : true |
| 11 | + 'Sequencer.KalturaPlayerEditOverlay' : false |
12 | 12 | }); |
13 | 13 | |
14 | 14 | |