Implement Chromecast frontend and DLNA AVTransport casting

Frontend:
- Add castStore for managing cast state (connect, disconnect, play, pause, etc)
- Update CastPicker to use castStore, show connected device banner with disconnect
- Wire isCastConnected to NowPlayingBar and ExpandedPlayer for visual indicator
- Modify playbackService to cast when connected instead of local playback

DLNA Backend:
- Implement full AVTransport SOAP client with:
  - SetAVTransportURI with DIDL-Lite metadata
  - Play, Pause, Stop, Seek actions
  - RenderingControl SetVolume
- Add dlna_play_track command that fetches stream, downloads audio, and serves via media server
- Share media server between Chromecast and DLNA
This commit is contained in:
vicrodh committed 2026-01-12 10:11:09 -06:00
1 parent a4c09041a4
commit 1ac6d15551
8 files changed
+1025 -143

No files matched your search

+18 -1
View File
@@ -37,6 +37,7 @@
onOpenQueue?: () => void;
onOpenFocusMode?: () => void;
onCast?: () => void;
isCastConnected?: boolean;
// Lyrics props
lyricsLines?: LyricsLine[];
lyricsActiveIndex?: number;
@@ -75,6 +76,7 @@
onOpenQueue,
onOpenFocusMode,
onCast,
isCastConnected = false,
lyricsLines = [],
lyricsActiveIndex = -1,
lyricsActiveProgress = 0,
@@ -285,7 +287,12 @@
<button class="action-btn" onclick={onOpenFocusMode} title="Focus Mode">
<Maximize2 size={22} />
</button>
<button class="action-btn" onclick={onCast} title="Cast to device">
<button
class="action-btn"
class:cast-active={isCastConnected}
onclick={onCast}
title={isCastConnected ? 'Casting - Click to manage' : 'Cast to device'}
>
<Cast size={22} />
</button>
<button
@@ -659,6 +666,16 @@
color: var(--accent-primary);
}
.action-btn.cast-active {
color: #22c55e;
animation: cast-pulse 2s ease-in-out infinite;
}
@keyframes cast-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.6; }
}
/* Right Section: Lyrics */
.right-section {
flex: 1;