From 65b0ed987e4345cd5c79780cea0a94a399387c41 Mon Sep 17 00:00:00 2001 From: Dermot Duffy Date: Mon, 7 Feb 2022 20:58:01 -0800 Subject: [PATCH] Fixes for native WebRTC support. --- src/components/viewer.ts | 1 + src/patches/ha-camera-stream.ts | 3 +++ src/patches/ha-hls-player.ts | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/viewer.ts b/src/components/viewer.ts index 151b634f..7feb2c50 100644 --- a/src/components/viewer.ts +++ b/src/components/viewer.ts @@ -701,6 +701,7 @@ export class FrigateCardViewerCarousel extends FrigateCardMediaCarousel { ? html` { return this._url ? html` { } if (this.stateObj.attributes.frontend_stream_type === STREAM_TYPE_WEB_RTC) { return html` { @customElement('frigate-card-ha-hls-player') @@ -53,9 +53,15 @@ customElements.whenDefined('ha-hls-player').then(() => { // - https://github.com/home-assistant/frontend/blob/dev/src/components/ha-hls-player.ts // ===================================================================================== protected render(): TemplateResult { + if (this._error) { + // Use native Frigate card error handling, and attach the entityid to + // clarify which camera the error refers to. + return dispatchErrorMessageEvent(this, this._error); + } return html`