frigate/web/src
Louis Sautier 66fefe5513
Temporarily mute WebRTC video at start to fix autoplay on mic toggle
Fixes 2-way audio on the Home Assistant Android companion app: toggling
the microphone causes the video feed to go black while audio continues
working.

When the mic is toggled, the player switches from MSE to WebRTC, which
creates a new PeerConnection and video stream. By the time the async
WebRTC setup completes, the user gesture from the mic button click has
expired under Android WebView's transient activation model, causing
unmuted autoplay to be blocked.

Fix this by introducing an `awaitingPlayback` state that forces the
video element to start muted (muted autoplay is always allowed). Once
the `playing` event fires, the flag is cleared and the muted prop falls
back to the normal `!audioEnabled` logic, preserving audio toggle
functionality.

Closes https://github.com/blakeblackshear/frigate-hass-addons/issues/274
2026-03-16 22:29:15 +01:00
..
api Debug replay (#22212) 2026-03-04 10:07:34 -06:00
components Temporarily mute WebRTC video at start to fix autoplay on mic toggle 2026-03-16 22:29:15 +01:00
context Update frontend to React 19 (#22275) 2026-03-05 07:42:38 -07:00
hooks Frontend fixes (#22309) 2026-03-07 06:43:00 -07:00
lib Support using GenAI for embeddings / semantic search (#22323) 2026-03-08 10:55:00 -05:00
pages Support using GenAI for embeddings / semantic search (#22323) 2026-03-08 10:55:00 -05:00
types Skip motion threshold configuration (#22255) 2026-03-05 18:20:03 -06:00
utils Frontend fixes (#22309) 2026-03-07 06:43:00 -07:00
views Add motion previews filter (#22347) 2026-03-09 14:14:13 -06:00
App.tsx Frontend fixes (#22309) 2026-03-07 06:43:00 -07:00
env.ts Fix linter and fix lint issues (#10141) 2024-02-28 16:23:56 -06:00
index.css Improve live streaming (#16447) 2025-02-10 09:42:35 -07:00
login.tsx Fix auth when serving Frigate at a subpath (#12815) 2024-08-09 07:26:26 -06:00
main.tsx feat: add i18n (translation/localization) (#16877) 2025-03-16 10:36:20 -05:00
vite-env.d.ts switch to vite 2022-03-11 07:49:06 -06:00