Jump to content
Search Community

Monitor the video's entire download progress in bufferMode

breezzze test
Moderator Tag

Recommended Posts

Sorry for another thread about videoloader, Jack. I've read through your reply and really appreciate it. But again there still has something I didn't came up a better solution so far.

 

I'm building up a simple video player. By following your reply, now I can manipulate a video only except one thing. That is, I want to monitor the video's whole downloading progress both when it is playing and paused. I have a progress bar set up on the stage, but cannot find a way to get the values I need( something like videoTime/duration or bytesLoaded/bytesTotal ). The reason I give up tracking videoTime or videoProgress is because they only respond to the current virtual playhead which could be changed by user when the video is playing back. I think this problem might be a little bit tricky in bufferMode. However I have no idea where comes the two values I need( when bufferMode is set to true ).

 

I'm a designer and these problems might be a little silly... Great thanks for your help!

 

 

 

- breezzze

Link to comment
Share on other sites

Why would you set bufferMode to true if you want to track the overall loading progress of the entire file?

 

In any case, when bufferMode is true, the loader's "progress" property will reflect only the buffer whereas if bufferMode is false (the default), the "progress" property will reflect the overall loading progress of the entire file (which is what it sounds like you want). So when bufferMode is false, loader.progress would be the same as doing loader.netStream.bytesLoaded / loader.netStream.bytesTotal.

 

Does that clear things up?

Link to comment
Share on other sites

Sure. Thanks for the explanation. I set buffermode to true because this video loader is nested in a LoaderMax queue which contains a dataloader and a imageloader. And I have an onComplete event handler to fire as soon as the video starts to load( it is said the onComplete event will be fired after the entire video loading accomplished when buffermode is false, that isn't what I want cuz I have to manipulate the other nested loaders by onComplete event). If the result of netstream calculation is exactly what the progress property is, I won't bother to use the former. If there's any mistake please point em out.

 

Thanks again.

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...