-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught SyntaxError: Unexpected token < #33
Comments
Probably due to you running it from disk instead of a web server |
Not the case. Thank you for the prompt response, and I apologize for the lack of detail. Was writing this very late at night and exhausted. See here: http://vincentrubinetti.com/apps/test/Gyrographer.html Press "Export Animated GIF" and look in the console. Here's my set up:
It might have something to do with the htaccess... I'll fool around with that. |
You need to set the workerScript url if it's not in the same dir as the page |
I did: encoder = new GIF({width: Canvas.width, height: Canvas.height, workers: 2, quality: 10, workerScript: 'App/gif'}); Does it have to be an absolute path? |
it needs to be a url to the actual script, not the directory it resides in |
Very good, got it working. Thank you! Perhaps you should make that clear in the workerScript description in the readme to avoid future confusion. |
It's pretty clear already IMHO |
@jnordberg Is there any suggestion to use it in a webpack project(like vuejs), since it is a one-js-file project. |
@ionull No, not really. The worker script is loaded through the browsers loading system, maybe that can be monkeypatched to do something but i doubt it. |
@jnordberg I found something like worker-loader workerjs project which will load worker from file. But in gif.js project we must use a file path instead of worker instance. |
See #58, #47; @ZigGreen was able to load the worker with a blob URL. |
@1j01 thanks a lot, I used file loader minutes ago, it is now working well :) Blob is not compatible well with some IE browser |
Can anyone think of any reason I would be getting such output from gif.js?
The text was updated successfully, but these errors were encountered: