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

Mediakeys not working for TuneIn #348

Open
riclucio opened this issue Jun 19, 2020 · 0 comments
Open

Mediakeys not working for TuneIn #348

riclucio opened this issue Jun 19, 2020 · 0 comments

Comments

@riclucio
Copy link

The click triggered against the play/pause button is triggering a refresh on the page.
Possibly because the element receiving the event is an svg, which simply bubbles up to the parent <a/> element.
For reference, I'm trying on this page: https://tunein.com/radioalphafm/
In my tests, this click worked:

$('[data-testid=profilePlayerActionButton]').parentElement.click()

Triggering the event this way forces the refresh:

$('[data-testid=profilePlayerActionButton]').parentElement.dispatchEvent(new MouseEvent('click', {bubbles:true,defaultPrevented:true}))
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