Use navigator.mediaSession inside nightbot's song request dashboard page

Hello, I am trying to provide a way for streamers to have a music overlay while using nighbot’s sont requests.

However, it’s near impossible to get reliable playback state and metadata from the website alone due to limited access to iframe data and optimizations when the page is not visible.

Would it be possible to implement the use of navigator.mediaSession ?

It would be great if the following data was exposed and updated even when the page is not visible:

  • Song title
  • Song author
  • Song artwork link
  • Song url
  • Duration
  • Elapsed time
  • playback state (paused ect)

Thanks in advance