Open Tomalak opened 8 months ago
@Tomalak Hi Martin, I seek to commit to open source contribution in 2024 more than I have in a while. Do you still need this issue resolved?
@jeveloper Since there was no other option at the time, I've worked around the issue by using WebAudio instead of html5, but it does still seem like a genuine bug worth fixing.
The Problem
Erroneous playback duplication from a single Howl using HTML5 audio when the page audio is still locked, and the Howl is set to retry playback on unlock.
Reproducible Example
No response
Reproduction Steps
On a page where audio is not allowed by default, the following runs into the expected issues with locked audio:
At this point, the log already shows that the AudioContext has been created/initialized twice:
When calling
howl.play()
, theplayerror
event occurs twice for the same ID:Once the page receives user interaction, the
unlock
event occurs, and the sound starts playing duplicated, with split-second delay. The console output at that point:This does not occur on a page where the audio is allowed or has already been unlocked, or when using WebAudio.
Possible Solution
No response
Context
No response
Howler.js Version
v2.2.4
Affected Browser(s)/Versiuon(s)
Firefox 119.0