Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
schwabencode

VideoLoader dispose / cancel

Recommended Posts

Hi,

I'm trying to find a solution for my loading concept:

 

I have several pages, each loading a video. When I leave a page I call dispose() on the VideoLoader to stop the loading process. The problem is, when I call dispose without "true" my network analyser shows that the video is still loading data from the server.

When I pass in true, the loading stops but also removes the video from cache.

 

Is it possible to really stop the loading and at the same time don't clear it from cache ?

 

Thanks,

Oliver

Link to post
Share on other sites

When you say "cache" are you talking about the local copy on the end user's hard drive (typically in the browser cache)? If so, no, disposing of a loader has no effect on that (regardless of whether or not you unload too). But that's actually up to the browser and/or Flash Player to handle, not LoaderMax. When you dipose(true), it stops loading the asset but the browser and/or Flash Player decide what they want to do with the partially-downloaded content in the cache. Particularly with NetStreams, that data may get flushed but there isn't anything that LoaderMax can do to prevent that (as far as I know at least).

Link to post
Share on other sites

yes it's about the local cache. I agree that point differs on every user's machine.

I thought it might be possible to pause a Videoloader (using pause() or cancel()) so it really stops downloading - but like a said there is still data beeing downloaded which slows down other loaders.

The only way to achieve this was to dispose(true) the VideoLoader and create a new one.

The drawback here is that the progress often starts at 0% - depending on browser's caching rules.

Link to post
Share on other sites

Right, it's impossible to pause() a NetStream that's loading (as far as I know at least). It's not a limitation of LoaderMax specifically - it's just a limitation of Flash. I wish I had a simple fix for ya.

Link to post
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.

×