Skip to content
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

[Feature Request] Support Media Session to allow externalized control on Android and Chrome #19

Open
zerodivide1 opened this issue Mar 7, 2024 · 3 comments

Comments

@zerodivide1
Copy link

zerodivide1 commented Mar 7, 2024

Would it be possible to add support for Global Media Controls by using the Media Session API so that users can play/pause from any Chrome window or from the notification shade on Android?

More info: https://developer.chrome.com/blog/media-session

@zerodivide1 zerodivide1 changed the title Support Media Session to allow externalized control on Android and Chrome [Feature Request] Support Media Session to allow externalized control on Android and Chrome Mar 7, 2024
@darkj2k
Copy link

darkj2k commented Aug 25, 2024

I second this. It will be a great feature.

@arapl3y
Copy link
Contributor

arapl3y commented Aug 26, 2024

I would also like this feature.

@remvze, I started looking into an implementation for this, it's quite simple using the Media Session API, however from what I can see, it requires us to configure Howlerjs to use HTML Audio (html5: true) rather than Web Audio... Is there any specific reason we need Web Audio in this case or could HTML audio suffice? Let me know what you think.

@remvze
Copy link
Owner

remvze commented Oct 13, 2024

@arapl3y Hey there. The reason Moodist is using Web Audio instead of HTML Audio is that HTML Audio introduces a small pause between loops, which isn't ideal. The only solution was to use the Web Audio API instead. This brought several challenges, one of which is the difficulty of integrating it with Media Session. I actually tried implementing this feature multiple times, but with no success, so I’ve set it aside for now. However, I'm definitely open to any suggestions or contributions.

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

4 participants