Unable to use Pre-signed URL with audio path
Simoneth opened this issue · 3 comments
Infinite love for this script!
From https://github.com/soulwire/sketch.js/issues/87 example
I tried to use as MP3_PATH a pre-signed url but it's not working. This error occured only using this script:
Uncaught (in promise) DOMException: Failed to load because no supported source was found.
Is there any way to solve it? Thanks!
I just start a bounty on SO http://stackoverflow.com/questions/43657794/sketch-js-how-to-use-aws-pre-signed-url-on-audio-tag related to this issue
Are you able to load the audio as a byte array via fetch api / xmlhttprequest? If so you could use AudioBufferSourceNode instead of MediaElementAudioSourceNode
Going to close this because it's not directly related to Sketch. But I've updated the codepen demo to use SoundCloud to play tracks, since their CORS setup works. Maybe that's useful? https://codepen.io/soulwire/pen/Dscga