Skip to the content.

Media module: linking YouTube Music and Spotify

The Media module works with any player Windows knows about (Spotify, YouTube Music, a browser tab, VLC…). Two players can also be linked to the hub. Then:

A player that is not linked shows a small chip with an orange dot next to the volume bar. Tap it to see what to do. Until then, the bar controls the PC’s volume.

YouTube Music (desktop app by th-ch)

  1. In YouTube Music, open the Plugins menu and turn on API Server. Keep its default settings: port 26538, “Authorize at first request”.
  2. On the Edge, tap the YouTube Music chip, then Link.
  3. YouTube Music asks on the PC whether to allow raidtech-edge-hub. Accept.

The hub keeps the access it was given in %APPDATA%\RaidtechEdge\modules-data\media\youtube-music.json. Delete that file to unlink.

Volume: what the Edge shows

The Edge shows the number of YouTube Music’s volume bar and moves that bar. Two things make that less simple than it looks:

Precise volume does not know YouTube Music’s curve: once the bar moves (by hand or from the Edge), its mouse wheel and arrow keys start again from the player’s number (bar at 65, one notch down: 33). The Edge can only move the bar, so it cannot avoid this. Turning off Precise volume avoids it (YouTube Music’s own wheel then moves the bar 10 at a time), at the cost of the API’s less reliable number.

The Exponential volume plugin cubes the sound under every number, on top of YouTube Music’s own curve: bar 65 → player 34 → sound about 4 %. The numbers stay the same, so nothing in the API can undo it, and the sound no longer follows the bar.

So when Precise volume (with the curve) or Exponential volume is on, the Edge shows an orange dot on the volume bar; tapping it says which to turn off: in YouTube Music, Plugins menu, untick them, then restart YouTube Music.

The hub follows what YouTube Music has (the gear at the top right of the Media module shows the warning and the volume read).

Spotify

Spotify only lets an app change its volume through its Web API. That takes a free “developer app” of your own, made once.

  1. Go to https://developer.spotify.com/dashboard, sign in, then click Create app.
    • Name and description: anything (e.g. “Raidtech Edge”).
    • Redirect URI: http://127.0.0.1:47821/m/media/spotify/callback, then click Add.
    • APIs used: Web API.
  2. Open the app’s Settings and copy its Client ID. You do not need the Client secret.
  3. On the PC, right-click the Raidtech Edge Hub icon in the taskbar, then Spotify settings…. Paste the Client ID between the quotes of "clientId": "" and save.
  4. On the Edge, tap the Spotify chip, then Link. Spotify’s sign-in page opens in the PC’s browser. Accept, then close the page.

Changing the volume needs Spotify Premium. That is a rule of Spotify’s API. Without Premium, the Edge says so when you move the bar. Use the volume mixer panel instead.

The tokens are kept in %APPDATA%\RaidtechEdge\modules-data\media\spotify-tokens.json. Delete that file to unlink.

Queue and playlists

Once a player is linked, the queue button (a list with a play mark) under the player shows what comes next.

YouTube Music’s API Server does not give your playlists.

Artwork

Windows only hands out small thumbnails. The hub looks for the full-size artwork of the current track:

  1. from the player itself, when it is linked (YouTube Music, Spotify);
  2. otherwise from a Deezer search with the title, the artist and the length. Only the same track is used.

The hub sends the title and the artist of each new track to Deezer. Videos and tracks that Deezer does not know keep Windows’ thumbnail.