-
Notifications
You must be signed in to change notification settings - Fork 36
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
Playback events are not triggered by media session API #37
Comments
+1, lmk if I can help with this @E-Kuerschner |
@joeyiny sorry for the delay! I still have a branch open for this but i ran into some difficulties with the global version of the hook. Will keep posting updates here |
@E-Kuerschner got it, let me know if i can help |
hey @joeyiny, @humbkr are you able to use the media session if you create the sound with
After doing some research it appears that the media notification will only be set if an audio or video element is present on the page. |
pausing work on this for the time being since the Media Session Notification feature will not work with the Web Audio Api which is the default mode of operation for Howler. In order to integrate with the MediaSession the Howl needs to be created with the html5 option set to true. |
Describe the bug
Chrome and other browsers now ship with a feature to control media directly from the browser using the media session API:
https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API
https://techcrunch.com/2020/01/16/chrome-gets-global-media-controls
Problem: when using the Chrome media controls, the playback events like play, pause, ... are not triggered, ie isPlaying is not updated, resulting in an out of sync UI.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The useAudioPlayer() state reflects the state of the audio playback.
Environment (please complete the following information):
Related issue: goldfire/howler.js#1262
The text was updated successfully, but these errors were encountered: