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

This line seems to break media button functionality #211

Open
MarkusFroemerth opened this issue Jan 9, 2025 · 0 comments
Open

This line seems to break media button functionality #211

MarkusFroemerth opened this issue Jan 9, 2025 · 0 comments

Comments

@MarkusFroemerth
Copy link

p.get(this)[playerFactory].player.enablePlayButton();

I am currently writing my own little media player app and try to get the media buttons working. For a plain HTML audio element, it works perfectly, but not with the IcyMetadataPlayer.

I finally could trace the issue back to this line. The called method completely clears any context from the current mediaSession by nulling the attributes of the audio element. Apparently, that disconnects the mediaSession from that specific audio element.

So, for a playing audio stream...
... the expected behavior is: Media buttons pressed in any order trigger their respective action
... the current behavior is: Media buttons work until I press pause. After that, media buttons don't work anymore until I restart the stream manually

I could also reproduce the issue your Bare HTML Demo (didn't try the others).
Browser: Opera 99

PS: I also checked older versions of IcyPlayer - Media Buttons worked until 1.17.5

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

1 participant