-
Notifications
You must be signed in to change notification settings - Fork 833
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
The soundjs play failed when the source url is a RESTFUL api #306
Comments
This is mostly likely caused by the file path for your sound containing a query string (specifically "?"). This isn't incorrect, but PreloadJS/SoundJS doesn't accept it as a valid file path. Info for solving this:
Specifically, the _parsePath method returns false when it encounters this path.
A saved RegExr pattern is here: https://regexr.com/3t6d0 Just accepting the query string may cause issues with other parts of PreloadJS/SoundJS, so it will need to be tested thoroughly. |
I run into a similar problem, but the regexr link above takes me to the default page on regexr. |
Nothing has changed in the library (see discussion here) The RegExr pattern can be found here: https://regexr.com/343kr - not sure why the old one no longer works. |
Thank you, that regex patter doesn't work for me either, but removing the ? exclusion from the original pattern did the job. |
Issue Details
Latest SoundJS 1.0.2
https://cdnjs.cloudflare.com/ajax/libs/SoundJS/1.0.2/soundjs.min.js
Whats happening:
When playing a sound from a RESTFUL api, the instanse's playstate is null (sometimes it's failed)
Demo here:
https://codepen.io/d925529/pen/gjomKd
The text was updated successfully, but these errors were encountered: