keysocket icon indicating copy to clipboard operation
keysocket copied to clipboard

Mediakeys not working for TuneIn

Open riclucio opened this issue 5 years ago • 0 comments

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}))

riclucio avatar Jun 19 '20 16:06 riclucio