Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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#7139
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

@TimoPtr

@TimoPtr TimoPtr commented Jul 8, 2026

Copy link
Copy Markdown
Member

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 to main once it merges. The diff here is only the renderer and the debug entry point.

  • :webrtc-compose (new module): WebRtcVideo composable rendering a CameraPlayer through a SurfaceViewRenderer that 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 by RendererEvents) 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 in onCleared). A Hilt module provides the process-wide libwebrtc factory.

Next slices per the ADR: the external-bus protocol (webrtc/play / webrtc/state / webrtc/stop with a capability flag in the external auth handshake, paired with a frontend PR), then capability gating + HLS fallback through the shared CameraPlayer seam.

Checklist

  • New or updated tests have been added to cover the changes following the testing guidelines.
  • The code follows the project's code style and best_practices.
  • The changes have been thoroughly tested, and edge cases have been considered.
  • Changes are backward compatible whenever feasible. Any breaking changes are documented in the changelog for users and/or in the code for developers depending on the relevance.

Any other notes

  • Stacked on Add native WebRTC session foundation (core engine + HA signaling) #7137; do not merge before it. The only user-visible surface is the developer-settings screen — no dashboard behavior changes.
  • Verified locally: :webrtc-compose unit tests, :app compilation, 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

claude added 2 commits July 8, 2026 09:21
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
claude added 2 commits July 8, 2026 10:08
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
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.