fix: Zoom/pan support for WebRTC Card (#1624)

This commit is contained in:
Dermot Duffy
2024-10-07 07:31:56 -07:00
committed by GitHub
parent 323d1ff7c4
commit 78e4eedf85
2 changed files with 12 additions and 1 deletions
@@ -74,6 +74,8 @@ WebRTC Card support blends the use of the ultra-realtime [WebRTC card live
view](https://github.com/AlexxIT/WebRTC) with convenient access to Frigate
events/snapshots/UI. AlexxIT's WebRTC Integration/Card must be installed and configured separately (see [details](https://github.com/AlexxIT/WebRTC)) before it can be used with this card.
?> The `webrtc_card` default configuration disables the WebRTC card's `intersection` parameter (which auto-stops the media when a certain fraction of the video is no longer visible), since it interferes with the card pan & zoom. Instead, see the [`auto_pause`](../live.md) parameter.
```yaml
cameras:
- camera_entity: camera.office
+10 -1
View File
@@ -136,7 +136,16 @@ export class FrigateCardLiveWebRTCCard
hass: HomeAssistant;
setConfig: (config: Record<string, unknown>) => void;
};
const config = { ...this.cameraConfig.webrtc_card };
const config = {
// By default, webrtc-card will stop the video when 50% of the video is
// hidden. This is incompatible with the card zoom support, since the
// video will easily stop if the user zooms in too much. Disable this
// feature by default.
// See: https://github.com/dermotduffy/frigate-hass-card/issues/1614
intersection: 0,
...this.cameraConfig.webrtc_card,
};
if (!config.url && !config.entity && this.cameraEndpoints?.webrtcCard) {
// This will never need to be signed, it is just used internally by the
// card as a stream name lookup.