Skip to content

How to listen for when track is paused by system #1384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
devskope opened this issue Aug 18, 2020 · 1 comment
Open

How to listen for when track is paused by system #1384

devskope opened this issue Aug 18, 2020 · 1 comment

Comments

@devskope
Copy link

devskope commented Aug 18, 2020

How do I detect when a playing sound is paused/resumed/stopped by the Operating System?

For instance say track.playing() === true and I hit the pause button on my keyboard (or pause from the operating system), does howler emit an event? As far as I know, onpause isn't fired.

I need to toggle certain states when a sound is paused or resumed by the operating system's media controls not only when I explicitly call play(), pause() or stop().

@bikubi
Copy link
Contributor

bikubi commented Sep 1, 2020

Howler does not pay attention to external/OS audio events, see my comment on #1262 for more information and a possible workaround.
Check #1383 for iOS specifics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants