raitonoberu / sptlrx

Synchronized lyrics in your terminal
MIT License
354 stars 14 forks source link

Browser extension #28

Closed raitonoberu closed 8 months ago

raitonoberu commented 10 months ago

Le problem

Le solution

We can create a browser extension to pass the currently playing track to sptlrx. I see two ways to achieve this:

  1. The extension creates an HTTP server. sptlrx sends a GET request to it every X seconds to get the currently playing track. But I'm not sure if it's possible to create one.
  2. sptlrx creates an HTTP server. The extension sends the currently playing track every X seconds via a POST request.

Also, there is a thing called Native messaging, but this requires additional research.

raitonoberu commented 9 months ago

I came across WebNowPlaying-Redux extension and immediately started integrating in into sptlrx. You can check it out in the browser branch.