Skip to content

Media 2.0 - #45

Open
PabloMartin97 wants to merge 12 commits into
BoostedMoose:devfrom
PabloMartin97:Media_2.0-
Open

Media 2.0 #45
PabloMartin97 wants to merge 12 commits into
BoostedMoose:devfrom
PabloMartin97:Media_2.0-

Conversation

@PabloMartin97

Copy link
Copy Markdown
Contributor

This PR expands V-Link’s media system with local playback support alongside CarPlay and Android Auto.

Changes

  • Added local media browsing and playback from folders and USB devices.
  • Added an integrated V-Link file browser for Raspberry Pi.
  • Local media remains accessible while phone projection is connected.
  • Selecting local media pauses projected music and transfers media controls to the local player.
  • Starting projected music returns audio focus and Now Playing metadata to CarPlay.
  • Added persistent folder, track, shuffle and repeat selection.
  • Added optional autoplay after startup when no dongle is connected.
  • Improved shuffle history so Previous returns to the track that actually played before.
  • Added navigation ducking for local and projected media.
  • Added separate navigation and phone-call volume controls.
  • Added configurable microphone input gain and a microphone level test.
  • Added audio-route diagnostics for media and navigation channels.
  • Changed the default projection frame rate to 30 FPS for improved stability.
  • Added safer backend endpoints for browsing and streaming media from approved locations.
  • Added an audio and media roadmap.

PabloMartin97 and others added 12 commits August 17, 2026 23:51
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants