Jump to content

question: can I mark the loading file to error state


scofieldly
 Share

Recommended Posts

Hi all, 

I want to ask that is there any way to operate the loading file.

what I want to do is when the file loading or waiting for the response more than 5 sec, I will stop this loading process and start a new loading from another url.

I tried to customize the addToFileList function in the loader to replace the file in the Loader._fileList. but it seems the xhr loading request is still on-going.

So, I wonder that can I just mark this loading as error to trigger the onError event in the loader, and stop the xhr request for this file.

thx

Link to comment
Share on other sites

14 hours ago, drhayes said:

It sure looks like there's no "cancel" method. I was going to say you could wire something up by subscribing to the onFileStart signal, but I don't see a way to cancel a file. Maybe start there?

yes, currently I am make a timer in the onfilestart event, after 2 seconds, if it not complete, I will try to load the local one. but it looks like that the CDN request did not stop or cancel.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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