You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Exception when seeking from inital buffer state. (w/patch) Created Mar 10, 2009

This thread is solved

Views: 2880     Replies: 1     Last reply Mar 12, 2009  
You must login first before you can use this feature

ezran

Posts: 14

Registered:
Jan 21, 2009

Exception when seeking from inital buffer state. (w/patch)

Posted: Mar 10, 2009

As of version 3.0.7, when calling seek() on the player while it's still in the buffering state (sometimes the case during the onStart callback), an exeption occurs that cuts off the rest of the javascript and such.


$f.onStart(function() {
  $f.seek(20);
  alert('Did the seek.');
});

So, in the case I'm describing, that alert just won't even get called.

Anyway, the issue is due to the durationTracker not yet being created in AbstractDurationTrackingController, so when it calls doSeekTo in the StreamProviderController, there's an error trying to set the "durationTracker.time = seconds".

To fix this, and allow the seeking to happen correctly, I've just updated seekTo so it can create the durationTracker, like so:


AbstractDurationTrackingController.as (3.0.8-dev)
@@ -168,5 +168,5 @@
    private function seekTo(event:ClipEvent, seconds:Number):void {
+     if (! durationTracker) createDurationTracker(clip);
      doSeekTo(event, seconds);
-     if (! durationTracker) return;
      durationTracker.time = seconds;
    }

As you can see, the patch is applied to the version from 3.0.8-dev (which exhibits the same behavior).

Assuming this doesn't cause any other problems, it'd be great if it could be included in the next release.

Anssi
Flowplayer Flash & video streaming developer

Posts: 1076

Registered:
Jul 24, 2007

» Exception when seeking from inital buffer state. (w/patch)

Posted: Mar 12, 2009

Reply to: Exception when seeking from inital buffer state. (w/patch), from ezran
Thanks for the patch! Will add this to 3.1.