Closed szokeptr closed 4 years ago
Hello,
It also may depend on the <audio\>
element. What attributes of the audio element do you use?
Also, does it works without v-show
condition?
My audio tag looks like this:
<audio
ref="player"
:src="audioSource"
:title="radio.now_playing.song.title"
crossorigin="anonymous"
></audio>
audioSource
is a streaming mp3 file, title
is a plain string with the song title.
Also, it's not working without the v-show
condition either (I removed the directive entirely).
Quick note: I tried pulling the canvas contents with the toDataURL
method and it appears to be a static un-styled blue circle all the time.
I can not find the way to fix it for safari. Spent whole day playing with different parameters and re-writing code trying to fix it. I am sorry but I have to leave it like this until I find any other way to fix it or may be Apple will do something with Safari. May be someone will contribute a fix.
Would you mind replacing the wontfix
label with help wanted
?
(I think that) the wontfix
label sends a signal that you have no intention of fixing this and it works as expected, whereas help wanted
shows you're willing to have this fixed, but don't have the resources for it yourself atm.
Would you mind replacing the
wontfix
label withhelp wanted
? (I think that) thewontfix
label sends a signal that you have no intention of fixing this and it works as expected, whereashelp wanted
shows you're willing to have this fixed, but don't have the resources for it yourself atm.
good point. changed. thanks
For macOS Safari at least, the AudioContext
needs to be created on "user interaction" i.e. inside the context of a click
event. This would require some significant refactoring. Both the audio
element that gets created and the one attached via refLink
need an onclick
listener, and setAnalyser
needs to be called inside that listener, not in mount()
.
I'll play around and see if I can fix this and open a PR.
@andreipopovici thank you. Your patch works great with my tests (macOS/Safari 13.1). Just merged. Will be released in ver 2.0.1
After spending way too many hours, I realized why the fix in https://github.com/staskobzar/vue-audio-visual/pull/33 was not working on mobile Safari. It's a bug that has ben acknowledged but not fixed yet: https://bugs.webkit.org/show_bug.cgi?id=203435
Nothing more to do here 🤷♂️
Good, thank you @andreasvirkus This one took me many hours too but I could not find it. I do appreciate your contribution.
I'm closing this ticket. Have a good week-end!
It looks like that bug was fixed via https://bugs.webkit.org/show_bug.cgi?id=211394 in iOS 13.6 upward, but I didn't have a chance to test and see if it's fixed this particular issue. Hopefully it did!
Good! hopefully it does. Thank you
I am attaching the circle visualizer to an existing player that has a streaming mp3 as its source. The visualization is appearing perfectly on Google Chrome and Firefox (both on macOS), but it fails to render on desktop (Version 13.0.3 (15608.3.10.1.4)) or iOS (13.3) Safari and there are no error messages logged.
Please let me know if there is any other info I can provide.
Code sample: