home-assistant / home-assistant/android

WebRTC autoplay blocked in Frigate addon unless "Autoplay videos" is enabled

Open
#6,578 7 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
3.9k
Forks
1.1k
Avg merge
1d 12h
Merged PRs (30d)
81

Description

**Home Assistant Android app version(s):** 2026.3.2

**Android version(s):** 16

**Device model(s):** Pixel 8a

**Home Assistant version:** Core 2026.3.2 / Frontend 20260312.0

**Last working Home Assistant release (if known):** N/A

**Description of problem, include YAML if issue is related to notifications:**

The [Frigate app](https://github.com/blakeblackshear/frigate-hass-addons/) switches from MSE to WebRTC when the user enables the microphone for 2-way audio. This creates a new video element with a new PeerConnection. On the Android companion app, the video goes black while audio continues working. The same flow works on iOS, and on the same phone with Firefox mobile or Chrome.

The cause is `mediaPlaybackRequiresUserGesture`, which defaults to `true`. I believe Android WebView uses transient user activation, which expires before the async WebRTC setup completes (getUserMedia, SDP exchange, ICE). The new video element then fails unmuted autoplay.

Changing this setting ("Autoplay videos") works around the issue:

https://github.com/home-assistant/android/blob/251a662c7890d7121d77aa69f3cf09170583e133/app/src/main/kotlin/io/homeassistant/companion/android/webview/WebViewActivity.kt#L480

It's also possible to make this work by muting audio right after clicking the mic button: video starts muted so it plays properly.

I attempted to push a workaround that leveraged this behaviour to Frigate but they consider this an HA companion app issue:
https://github.com/blakeblackshear/frigate/pull/22494#issuecomment-4071214422

**Screenshot or video of problem:**

Image

**Additional information:**

Original Frigate issue: https://github.com/blakeblackshear/frigate-hass-addons/issues/274

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.