keysocket
keysocket copied to clipboard
Mediakeys not working for TuneIn
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}))