Unable to load images on Android while running the e-learning course on G-cube app
Gourichaudhari opened this issue · 5 comments
Hi Folks,
I have an e-learning course created in HTML5 in which the images are getting loaded via createJS. The course and loading behavior works proper when i launch the course on desktop and directly on Android. But if I upload it to the G-cube app and try to access from the app itself, the loading of images fails.
I have debugged it by adding some alerts and found that if I run the course through app it directly calls "on error" event of the creteJS library, instead "on fileload". And getting "File Load error".
Please help me with the proper solution.
Are there any error messages in the console?
@owendwyer: Got this work by replacingvar __queue = new createjs.LoadQueue(true);
with var __queue = new createjs.LoadQueue(false);
Thanks for your attention.
@Gourichaudhari Your change makes PreloadJS favour "tag" loading (ie, using SCRIPT, IMG, LINK tags in favour of downloading data using XMLHttpRequests). This makes some sense, as browsers can be finicky loading raw content from local filesystems and cross-domain. Glad you got it working!
@lannymcnie : What it actually means? Is it like, by doing this change, my content will not load on cross domains? If it does not, then what would be the solution to run it on cross domains?
When content is loaded cross-domain with XHR, the domain has to give permission with an Allow-Access header. Local filesystems often have the same limitation, but can't be worked around. Tag loading does help, but if you want to access pixels of your content (to do filters or mouse interaction), you may still need the server to provide the header.