Add external bus protocol for the native WebRTC camera player#7140
Draft
TimoPtr wants to merge 2 commits into
claude/webrtc-phase2-compose-rendererhome-assistant/android:claude/webrtc-phase2-compose-rendererfrom
claude/webrtc-external-bushome-assistant/android:claude/webrtc-external-busCopy head branch name to clipboard
Draft
Add external bus protocol for the native WebRTC camera player#7140TimoPtr wants to merge 2 commits intoclaude/webrtc-phase2-compose-rendererhome-assistant/android:claude/webrtc-phase2-compose-rendererfrom claude/webrtc-external-bushome-assistant/android:claude/webrtc-external-busCopy head branch name to clipboard
TimoPtr wants to merge 2 commits into
claude/webrtc-phase2-compose-rendererhome-assistant/android:claude/webrtc-phase2-compose-rendererfrom
claude/webrtc-external-bushome-assistant/android:claude/webrtc-external-busCopy head branch name to clipboard
Conversation
TimoPtr
force-pushed
the
claude/webrtc-external-bus
branch
from
July 8, 2026 10:09
f16895a to
b93318e
Compare
Mirrors the existing exoplayer HLS delegation: when the new developer setting is enabled the app reports hasNativeWebRTC in the external config, and the frontend can delegate camera WebRTC playback through webrtc/play_camera, webrtc/resize (getBoundingClientRect semantics) and webrtc/stop. The native player renders in an overlay above the WebView at the reported rect, and failures are forwarded to the frontend as a webrtc/error command so it can fall back to in-WebView playback. The capability is off by default (Settings > Developer tools > Native WebRTC player) while the paired frontend change lands and the camera compatibility matrix is validated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
TimoPtr
force-pushed
the
claude/webrtc-external-bus
branch
from
July 8, 2026 10:54
fb48dd7 to
32422d2
Compare
4 tasks
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
Third slice of the native WebRTC camera streaming plan (
docs/adr/0001-native-webrtc-session-library.md), stacked on #7139 (which stacks on #7137). This adds the dashboard entry point: the external bus protocol that lets the frontend delegate camera WebRTC playback to the native player, paired with a frontend change (branchnative-webrtc-external-bus, developed againsthome-assistant/frontenddev).The protocol mirrors the existing ExoPlayer HLS delegation one-to-one:
webrtc/play_camera {entity_id, muted},webrtc/resize {left, top, right, bottom}(getBoundingClientRectsemantics, likeexoplayer/resize),webrtc/stop.webrtc/error {entity_id, code?, message?}command when the native session fails, soha-web-rtc-playerfalls back to in-WebView playback for the rest of the session.hasNativeWebRTCin the external config response, gated by a new developer setting (Settings → Developer tools → "Native WebRTC player (beta)", off by default) so the rollout is opt-in while the camera/codec matrix is validated.Implementation notes:
WebRtcSessionis owned byWebViewActivitylike the ExoPlayer instance, rendered byWebRtcVideoin an overlay above the WebView at the reported rect (setZOrderMediaOverlayso the video surface composites above the WebView, like the HLS player).StateFlow; the session is released on stop, on a new play request, and inonDestroy.Frontend counterpart (in review separately):
ha-web-rtc-playerhides its video element and delegates whenhasNativeWebRTCis set, exactly like_renderHLSExoPlayer; type-checked, eslint/prettier/lit-analyzer clean.Checklist
Any other notes
:app(1353) and:common(656) unit test suites,:applint (no new issues), ktlint, and compilation across all touched modules.falseand the frontend keeps its current in-WebView WebRTC path.🤖 Generated with Claude Code
https://claude.ai/code/session_01TxHn9ySi8aRFvvmfcPRgVu
Generated by Claude Code