I am using Spotify's Web SDK to create a new autdio player in a website.
The SDK has support of the Play/Pause event but ignores previoustrack
and nexttrack
.
I want to grab those actions and do some logic with them. However, because the player is loaded in an Iframe the action handler does not work because in my website there is not actual audio being played.
// this will do nothing
navigator.mediaSession.setActionHandler('nexttrack', function() {});
Is there a workaround for this? Thank you!