fix(radio): show ICY track in OS media controls (#816) (#924)

* fix(radio): show ICY track in OS media controls (#816)

Internet radio streams through the WebView <audio> element, for which
WebKitGTK registers its own MPRIS player — the one Linux desktops show.
souvlaki metadata pushes were overridden by it, so the OS overlay only
ever showed the app name. Feed the resolved ICY/AzuraCast metadata to
that player via navigator.mediaSession (and mirror to souvlaki), so the
overlay updates per track. Falls back to the station name when a stream
sends no metadata.

* docs(changelog): radio track info in OS media controls (#924)
This commit is contained in:
Frank Stellmacher
2026-05-30 02:19:06 +02:00
committed by GitHub
parent a0980379fa
commit b8fee84cd5
4 changed files with 174 additions and 0 deletions
+4
View File
@@ -22,6 +22,7 @@ import { useLyricsStore } from '../store/lyricsStore';
import MarqueeText from './MarqueeText';
import LastfmIcon from './LastfmIcon';
import { useRadioMetadata } from '../hooks/useRadioMetadata';
import { useRadioMprisSync } from '../hooks/useRadioMprisSync';
import { usePlaybackDelayPress } from '../hooks/usePlaybackDelayPress';
import PlaybackDelayModal from './PlaybackDelayModal';
import PlaybackScheduleBadge from './PlaybackScheduleBadge';
@@ -125,6 +126,9 @@ export default function PlayerBar() {
// Radio metadata (ICY or AzuraCast) — only active while a radio station is playing.
const radioMeta = useRadioMetadata(currentRadio ?? null);
// Mirror resolved radio track metadata to the OS media controls (issue #816).
// PlayerBar is the single always-mounted consumer, so push from here only.
useRadioMprisSync(radioMeta, currentRadio);
const isStarred = currentTrack