Add Compose WebRTC renderer and developer debug screen#7139
Draft
TimoPtr wants to merge 4 commits into
claude/home-assistant-companion-android-khve93home-assistant/android:claude/home-assistant-companion-android-khve93from
claude/webrtc-phase2-compose-rendererhome-assistant/android:claude/webrtc-phase2-compose-rendererCopy head branch name to clipboard
Draft
Add Compose WebRTC renderer and developer debug screen#7139TimoPtr wants to merge 4 commits intoclaude/home-assistant-companion-android-khve93home-assistant/android:claude/home-assistant-companion-android-khve93from claude/webrtc-phase2-compose-rendererhome-assistant/android:claude/webrtc-phase2-compose-rendererCopy head branch name to clipboard
TimoPtr wants to merge 4 commits into
claude/home-assistant-companion-android-khve93home-assistant/android:claude/home-assistant-companion-android-khve93from
claude/webrtc-phase2-compose-rendererhome-assistant/android:claude/webrtc-phase2-compose-rendererCopy head branch name to clipboard
Conversation
Phase 2 first slice of the native WebRTC plan (see docs/adr/0001-native-webrtc-session-library.md): - :webrtc-compose: WebRtcVideo composable rendering a CameraPlayer through a SurfaceViewRenderer sharing the peer connection factory EGL context. It only binds the sink to the lifecycle (attach on START, detach on STOP/dispose) so the session, owned above the composition, survives configuration changes and rotation does not renegotiate. Overlay slots for connecting and failed states, with the renderer injectable for JVM tests. - :app: WebRTC camera player debug screen under developer settings to exercise the native player against a camera entity before any dashboard integration, plus the Hilt wiring for the shared libwebrtc factory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
libwebrtc is BSD-3-Clause but the POM declares the non-SPDX license name "The 3-Clause BSD License" which aboutlibraries cannot map to an allowed license id, like the existing Chromium exception. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
4 tasks
The libwebrtc dependency added a large dex payload and the D8 dex merger started hitting OutOfMemoryError at 4g when the app variants build in parallel in one daemon (flaky :automotive:mergeExtDexFullDebug failures in CI). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
6g fixed the D8 dex merging OutOfMemoryError but two CI jobs that run memory-heavy siblings next to the daemon (screenshot test worker, emulator) were killed by the runner afterwards. 5g keeps headroom over the 4g the dex merger overflowed while lowering the total host memory pressure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
4 tasks
TimoPtr
marked this pull request as draft
July 15, 2026 06:15
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.
Summary
Second slice of the native WebRTC camera streaming plan (
docs/adr/0001-native-webrtc-session-library.md), stacked on #7137 — the base branch is the foundation PR and will be retargeted tomainonce it merges. The diff here is only the renderer and the debug entry point.:webrtc-compose(new module):WebRtcVideocomposable rendering aCameraPlayerthrough aSurfaceViewRendererthat shares the peer connection factory's EGL context, so the hardware decoder and the view use the same context. The composable only binds the sink to the lifecycle (attach on START, detach on STOP/dispose); starting and stopping the session stays with its owner (a ViewModel), which is what lets the session survive configuration changes — rotation rebinds the renderer without renegotiating. Overlay slot API for the connecting state (shown until the first rendered frame, driven byRendererEvents) and the failed state (for a later HLS-fallback UI). The renderer is injectable internally, so the sink lifecycle and overlay logic are covered by JVM unit tests without native libwebrtc.:app: a developer-settings debug screen (Settings → Developer tools → WebRTC camera player) to exercise the native player against a camera entity of the active server before any dashboard integration exists — this is the manual test harness for the camera/codec matrix, in particular two-way-audio-capable cameras on plain-HTTP LANs later. The session is owned by the ViewModel (released inonCleared). A Hilt module provides the process-wide libwebrtc factory.Next slices per the ADR: the external-bus protocol (
webrtc/play/webrtc/state/webrtc/stopwith a capability flag in the external auth handshake, paired with a frontend PR), then capability gating + HLS fallback through the sharedCameraPlayerseam.Checklist
Any other notes
:webrtc-composeunit tests,:appcompilation,lint(no new issues),ktlintCheck, and lockfiles regenerated via./gradlew alldependencies --write-locks.🤖 Generated with Claude Code
https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
Generated by Claude Code