tjhrulz / WebNowPlaying-BrowserExtension

The extension to go along with the WebNowPlaying plugin for Rainmeter
74 stars 35 forks source link

Found Out A Simple Way to Support Many Websites #82

Closed MostOriginalIGN closed 1 year ago

MostOriginalIGN commented 2 years ago

Hi! I was using WebNowPlaying but I realized that it wasn't working for some sites. So, as a developer, I looked for better ways to get the now playing status. Which is when I remembered Chrome has a built in media controller that shows the song name, artist, and cover art.

Global Media Controls

So I looked on how I could pull data from that. I found a way that is surprisingly easy! navigator.mediaSession Tidal

Playing Industry Baby by LilNasX Example

Soundcloud

image

Spotify

image

I hope that this can help make this extension better by supporting a lot more media websites.

DarkCeptor44 commented 1 year ago

Since you're a developer you could at the very least make a PR so that it's easier for the owner of this repo to merge (and maybe see it?). PS. I'm new here so I don't know how well maintained this is.

keifufu commented 1 year ago

This is a decent idea, however a lot of websites don't support it. It's barely supported by big players like spotify even, as you see it never ends up setting the 'playbackState', and it also doesn't provide us with functions to pause/play/set volume, etc. Future development of the browser extension will continue here, where mediaSessions are already made use of where ever it made sense.