Jump to content
Search Community

NetStream.Seek.InvalidTime

boogie test
Moderator Tag

Recommended Posts

Hi, is there any way of retrieving the NetStream.Seek.InvalidTime event from the VideoLoader ??

I'm trying to retrieve that event but no success. I create a :

_videoLoader.netStream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

 

To listen to all netstatus withing the netStream but I never get the invalid.Seektime.

 

To test this, what I do is to play a long video and try to seek on a time that is not yet loaded like this:

 

_videoLoader.gotoVideoTime( 80 );

 

And I need to retrieve the NetStream.Seek.InvalidTime because it returns the maximun time that has been loaded witch I will use later to do Scrubbing. The only event that I get is the NetStream.Seek.Notify.

 

Does any body knows how can I do this ???

 

TIA

Link to comment
Share on other sites

Nope, actually VideoLoader is smart enough to automatically check and not let you seek to a place beyond the end of the video. It corrects the value internally. But if you just want to know how much has loaded, you shouldn't need to try to generate errors, etc. - why not just use the bufferProgress value? Multiply the NetStream's bufferTime and the bufferProgress and you'll have what you need (I think). Or am I missing something?

Link to comment
Share on other sites

Hi thanks for the answer, I'll try to explain what I what to do.

The use case is that a user starts to play a long video so internally I retrieve a video from a URL from my CDN like this

http://cdn.example.com/video.mp4?start=0

Now the user click on seek bar but the time that he whants to view is not yet loaded so I sould get a seek.invalidtime. With that info I know that I have to load the same video with the new time that I get from the seekbar so I send a new request to my CDN like this.

http://cdn.example.com/video.mp4?start=80

Whit these technique what I get is that for user is transparent and it looks like I'm doing video streaming but in reality I'm doing progresive download.

This can be achieved if on your CDN you have set up Flash media Server with srubbing option on.

 

So that is why I need to know if the user clicks on a time beyond the loaded time.

 

I guess you are right and maybe I can do some work arround with the bufferprogress but I was wondering if there was any way to listen to all the netstatus events (specially the invalidTime). I even try to acces directly to the netstream class like this:

_videoLoader.netStream.seek(80)

 

but with no results :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...