Jump to content
GreenSock

pault

(Video)Loader restarts loading

Recommended Posts

I'm here again with possibly an other issue I came across.

I've got a loader with multiple video sub loaders. Some loaders load non existing URL's, or empty string urls.

_loader.append(new VideoLoader("path/to/file.f4v"))
_loader.append(new VideoLoader(""))
_loader.append(new VideoLoader(""))
_loader.append(new VideoLoader("path/to/another/file.f4v"))

All video's are part of a sequence, so I first play the first defined video loader, then the empty one, etc... In case the loader has a failed status, I'll continue playing the next url. In case I need to play a given URL, I'll prioritize the loader. In case we come across the empty url's I get a trace message:

Loading error on VideoLoader 'loader2' (): NetStream.Play.StreamNotFound

This is as expected. Now here's what happens. When I monitor the progress of "path/to/another/file.f4v" i notice that it is increasing, but sometimes will be set back to 0. It looks like this happens only after multiple non existing URL's are played.

 

So far in my case it is only playing empty string urls. So what I can do in my case as a workaround is not getting the loader and prioritize it at all when I want to play an empty string file. Then the progress of currently loading files will not be reset.

Link to comment
Share on other sites

This sounds like expected behavior (if I understand your description correctly). Whenever you prioritize() a loader, the other loaders in that LoaderMax queue will be canceled so that all available bandwidth can be allocated to the prioritized loader (otherwise it wouldn't be much of a prioritization). Files cannot truly be partially loaded and maintain their state, so the other loaders that are in progress at the time you prioritize your new loader will be reset to 0 progress. That actually has nothing to do with a LoaderMax limitation - it's just how Flash (and the browser) works.

 

So yes, my advice would be to not prioritize a failed loader (or one that has an empty/faulty url). I'm a little confused as to why you'd waste resources like that by adding loaders with blank URLs.

 

Oh, and by the way, you could getChildren() on the LoaderMax and loop through them and dispose() ones that have bad urls or have failed. That way you'd have a clean queue. Just a thought.

Link to comment
Share on other sites

You are absolutely right. off course the loaders can not be really paused, they can only be disposed. So yes, I would go ahead and at least not prioritize the loaders of which I know the can not load.

 

Thanks for your feedback!

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