Commit 429fc12b authored by Dan Rossi's avatar Dan Rossi
Browse files

- #104 when completing a seek click or drag, do a final non silent seek...

- #104 when completing a seek click or drag, do a final non silent seek request when both paused and resuming playback from a paused seek. This fix also enables seeking while clicking the scrubber when paused.
- #104 if the updated time is a fraction less than the seek target time ie for HDS, use a bitwise rounding so the seek time can stop.
parent 38d8dccf
......@@ -64,7 +64,7 @@ package org.flowplayer.controller {
private var _pauseAfterStart:Boolean;
private var _volumeController:VolumeController;
private var _seekTargetWaitTimer:Timer;
private var _seekTarget:Number;
private var _seekTarget:Number = 0;
private var _model:ProviderModel;
private var _connectionProvider:ConnectionProvider;
private var _clipUrlResolverHelper:ClipURLResolverHelper;
......@@ -788,6 +788,7 @@ package org.flowplayer.controller {
// dispatchPlayEvent(ClipEventType.STOP);
} else if (event.info.code == "NetStream.Seek.Notify") {
if (! silentSeek) {
startSeekTargetWait();
} else {
......@@ -840,7 +841,8 @@ package org.flowplayer.controller {
}
private function onSeekTargetWait(event:TimerEvent):void {
if (time >= _seekTarget) {
//#104 if the updated time is a fraction less than the seek target time ie for HDS, use a bitwise rounding so the seek time can stop.
if ((time|0) >= (_seekTarget|0)) {
_seekTargetWaitTimer.stop();
log.debug("dispatching onSeek");
dispatchPlayEvent(ClipEventType.SEEK, _seekTarget);
......
......@@ -427,13 +427,17 @@ package org.flowplayer.controls.scrubber {
if (_isSeekPaused) {
_player.resume(true);
seekToScrubberValue(false);
//seekToScrubberValue(false);
_isSeekPaused = false;
return;
}
if (_player.isPaused()) {
_currentClip.dispatchEvent(new ClipEvent(ClipEventType.SEEK, value));
//return;
}
//#104 when completing a seek click or drag, do a final non silent seek request when both paused and resuming playback from a paused seek.
seekToScrubberValue(false);
//else if (_player.isPaused()) {
//seekToScrubberValue(false);
//_currentClip.dispatchEvent(new ClipEvent(ClipEventType.SEEK, value));
//}
}
//#321 set an maximum end seek limit or else playback completion may fail
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment