You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prepare a web page with a <video>element and its video source, and programmatically add an Howler.js HTML5 player with its audio source. Make sure the audio is longer than the video
Programmatically, when video ends force it to start playing again. Seeking time to 0 is optional.
Start playing both the video and audio, e.g. from a button
When video ends and is forced to play again, the audio is automatically paused by the system.
During some tests we were able to inspect the paused state of inner HTMLAudioElement created by Howler.js, having set an interval timer. When the system pauses audio, the paused state actually becomes true.
We have not tried adding an event listener on the inner HTMLAudioElement, but from other distinct tests performed without Howler.js we could confirm that a plain HTML audio element on its own emits the event.
So apparently there's something within HTML5 Howler player that prevents the event from being emitted.
Howler.js Version
v2.2.4
Affected Browser(s)/Version(s)
Safari on iOS
Side note
The template for composing this issue had a typo in the last section. It spelled "Versiuon(s)".
The text was updated successfully, but these errors were encountered:
The Problem
On iOS (iPhone or iPad) the following behaviour happens:
then the system will automatically pause the audio.
Apart from this system behaviour being kind of unexpected and/or unwanted, the actual issue with Howler.js is the following:
pause
event is correctly emitted by the elementpause
event is emitted by the Howler.js playerWhen a Web Audio API Howler.js player is used to play audio, the issue is not reproducible, as the system will not pause the audio.
Reproducible Example
https://stackblitz.com/edit/howlerjs-ios-pause-not-emitted?file=README.md
Reproduction Steps
<video>
element and its video source, and programmatically add an Howler.js HTML5 player with its audio source. Make sure the audio is longer than the videoWhen video ends and is forced to play again, the audio is automatically paused by the system.
Attached is the downloaded Stackblitz project.
howlerjs-ios-pause-not-emitted.zip
Possible Solution
No response
Context
During some tests we were able to inspect the
paused
state of inner HTMLAudioElement created by Howler.js, having set an interval timer. When the system pauses audio, thepaused
state actually becomes true.We have not tried adding an event listener on the inner HTMLAudioElement, but from other distinct tests performed without Howler.js we could confirm that a plain HTML audio element on its own emits the event.
So apparently there's something within HTML5 Howler player that prevents the event from being emitted.
Howler.js Version
v2.2.4
Affected Browser(s)/Version(s)
Safari on iOS
Side note
The template for composing this issue had a typo in the last section. It spelled "Versiuon(s)".
The text was updated successfully, but these errors were encountered: