Share Posted January 3, 2015 I have a situation where I need to play a video from a URL - sometimes that URL will work fine (most of the time...) but sometimes there could be a loss of connectivity. In the case where there's a connection problem, I want to play the last video that was loaded successfully. Is this something LoaderMax will handle already or do I need to implement it myself? Link to comment Share on other sites More sharing options...
Share Posted January 3, 2015 Hi and welcome to the GreenSock forums. The only convenience that is built into the API for this scenario is that you can specify an alternateURL for each VideoLoader alternateURL : String - If you define an alternateURL, the loader will initially try to load from its original url and if it fails, it will automatically (and permanently) change the loader's url to the alternateURL and try again. Think of it as a fallback or backup url. It is perfectly acceptable to use the same alternateURL for multiple loaders (maybe a default image for various ImageLoaders for example). http://greensock.com/asdocs/com/greensock/loading/VideoLoader.html If you want to default to the last video that you loaded, then you would have to use some custom code when you detect the load failure. Link to comment Share on other sites More sharing options...
Author Share Posted January 4, 2015 Thanks! Can the alternateURL point to a local file? Link to comment Share on other sites More sharing options...
Share Posted January 5, 2015 Most likely no, unless your swf and html file are both running locally and you know the path from your html page to the video. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now