sknob/music v5.3.1 Release Notes, mediaSession Edition!

#blogpost #music #coding

So, thanks to @limebar@mastodon.social and @scy@chaos.social who implemented this feature for TIBR and TIBtv, I discovered how to send metadata to the system media player when you play my music on my site (using the Media Session API).

What this means is that you can now see the title, artist and artwork in your system player when you play a song on sknob.fr/music.

It could have ended there, but that’s when things got out of hand...

In the following image, you’ll notice you can’t skip to the previous or next track.

Screen capture of the full-screen music player on an old version of iOS which shows the song title, artist and cover image currently playing (in this case, Ukulele Bonk)

But it turns out you can handle these actions with the mediaSession API, provided you have your own functions to do the actual work.

This revealed a different paradigm between what I had implemented on the site, and how a system media player works.

Which means that in the end, I had to:

Phew... I told you things got out of hand! All this probably deserves more than a 0.0.1 version bump...

Hopefully, it’s all sorted out now. But before you complain, according to the spec, this is supported pretty much everywhere except in the Android WebView!

Media player on the Mac: Mosaic of the Mac system player, showing the 4 tracks of my Cities EP with previous & next buttons, which are grayed out for the first and last track.)

Greyed-out buttons in my UI and in the iPhone 7 media player:

Mosaic of the same album in my UI, with the grayed out previous and next buttons, successively, plus a capture of the system media player on my old iPhone 7 showing the last track of the album, with a greyed out next button.