(Safari only) Cannot play external audio url via .load(url), but works via .getMediaElement().src = url #3457
-
Hi all, I am running into an issue on Safari only (works on Chrome and Brave at least). I am using React/NextJS and this is the code snippet I am working with:
I have put comments in the code to point out what it does and where/how it breaks. I do not like having to set the source on the actual audio element to make it work, I think that this approach also interferes with the normal function of wavesurfer, which is why the behaviour thereafter seems less stable. Lastly, I find that if I load a local file on the component render, using just .load(localurl) works ok. I would like to figure out why .load(url) does not work for the external URL even though setting via getMediaElement().src = url is working. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
Could be a CORS issue? Are there any errors in the console? |
Beta Was this translation helpful? Give feedback.
You could also try using Web Audio for playback. It gives a smoother playback at the cost of consuming more resources: