I am using howler.js to play audio and declaring instance as
sound = new Howl({
src: ['../assets/test.mp3'],
html5: true,
onpause: () => {
this.playButton = true;
} });
All works fine but when audio is played , chrome android shows notification of song playing, and when we pause audio through notification it is not detected by howler.js.
Please let me know how to detect it in our code.
Sounds like a bug, I guess you could open an issue on the project's tracker.
For an ugly workaround, you can access the original HTMLAudioElement through
This element will receive the DOM events appropriately, so you can hook on it directly: