-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
AudioLoader: Use fetch instead of FileLoader #14073
Conversation
I think this impl has the same issue as |
Plus, just in case can you confirm that there is no error with Audio + https://threejs.org/docs/#manual/introduction/How-to-run-things-locally http-server has an issue that it returns wrong mime type for binary file jfhbrook/node-ecstatic#220 (comment) (Requesting to fix) Because of it, FireFox |
I've tested with latest Chrome, FF and Safari and with a local HTTP server. The only problem was that Safari does not support the newer Promise-based syntax of |
Yes, but this is a tradeoff I would accept for now. I'm in general not sure if the current implementation in |
Thanks for testing. About multiple concurrent requests, agreed that we could improve the implementation but I think the inconsistency that some loaders will avoid them but others won't isn't good. And I remember that many users seemed to be confused by the concurrent requests before we updated |
Even if we accept, I think we need comment at least. |
That's a valid point. We definitely need a solution for this.
Good idea. I'll update the docs with a note. |
One more thing: I want to highlight that the current implementation of |
We should also keep in mind that the progress of a |
I think you need to update this line in the doc, too |
I'm closing the PR for now since I'm not happy with the consequences of this change. A different approach is needed to solve the problems in context of loading audio buffer files. Cloning the audio buffer like suggested in #13710 is still better than introducing new limitations. Even #13725 is a more consistent solution. |
@takahirox Thanks for your feedback in this PR 😊 |
It looks like https://javascript.info/fetch-progress And it seems it's been supported in all major browsers for a bit now. Maybe this can be revisited? |
This PR uses a different approach compared to #13725. The implementation solves #13710 and #10706.
fetch
should be supported in all Browsers which support Web Audio as well.https://caniuse.com/#feat=fetch
https://caniuse.com/#feat=audio-api