Media 2.0 - #45
Open
PabloMartin97 wants to merge 12 commits into
Open
Conversation
Add a dedicated CarPlay media state for storing track metadata, playback information, and album artwork received from node-carplay. Merge partial media and artwork messages without clearing previously received values, reset media state when the phone disconnects, and add tests covering metadata and artwork updates. Document AudioMediaStart and AudioMediaStop as a future secondary source for determining playback status.
Adds a Music page with NowPlaying component (styles, utils, and music SVG) and registers it in Content and NavBar. Introduces a carplay media command event helper (mediaCommands.ts) and wires Carplay to forward/handle media commands and log media metadata. Adjusts Socket.IO namespace autoConnect for preview mode. Enhances vlink-preview to render Carplay, keep window/carplay sizes in sync, and handle resize. Adds vlink-preview.py to launch a standalone Vite preview.
- Introduce ProjectionSource tracking and improve CarPlay media handling. - Worker now emits projectionSource and diagnostic messages; - playbackStatus is derived from audio commands. - Store includes carplay.source and is reset on disconnects. - UI: NowPlaying receives source, shows better fallbacks/empty state and conditionally renders progress. - Music and NavBar updated. - Settings renders dashboard setting. *** corrections: Add test for playback status derivation. Also exclude pcm-ringbuf-player in vite optimizeDeps to avoid worklet URL issues.
This change adds support for playing music stored locally on the device. It introduces a LocalMediaProvider with folder selection, shuffle/repeat controls, and native audio playback, plus a USB/local media browser UI and a native player view that integrates with the existing music page. It also updates the music empty state to offer a Local Media option and wraps the app/preview with the new provider so local tracks can be selected and played without CarPlay or Android Auto.
Add dongle/key stroke navigation and focused state visuals across the Music pages. Prevent view-cycling when already in Music (Content.tsx). NativePlayer: read APP keyStroke/bindings, manage focused control, handle left/right/select/back strokes and apply $focused prop to control buttons. NowPlaying: open USB browser on selectDown when appropriate and mark the USB option focused. UsbMediaBrowser: keyboard navigation (up/down/select/back), maintain selectedTrack and refs, scroll into view and apply $focused/$active styles. styles.ts: increase control sizes and add outline styles for focused controls, USB option and track buttons.
- Introduce local USB media browsing and playback - Persist chosen folder and last track. - Shuffle, repeat, restore position, native and backend tracks are restored after rebooting. - UsbMediaBrowser integration for server-backed files. - Add Audio Settings UI and state (ducking, navigation/call volumes, mic gain + test). *** Update CarPlay audio handling to support ducking, media-player volume gating and microphone gain processing.
- Improve CarPlay audio handling and ducking behavior. - Ensure local playback pauses projected CarPlay audio and set system.audioSource properly. - Add more explicit media command types and route handling for navigation, phone, Siri/alerts and media start/stop.
Add comprehensive Media module documentation. Improve frontend logging in frontend/src/carplay/Carplay.tsx to capture a media metadata snapshot: log previous title, payload, and next title before applying merged media state for clearer diagnostics.
Allow vlink-preview to install frontend deps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR expands V-Link’s media system with local playback support alongside CarPlay and Android Auto.
Changes