fix: Zoom/pan support for WebRTC Card (#1624)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user