From 0df9080bbb57c992860810458843e3eb3c39f5a9 Mon Sep 17 00:00:00 2001 From: uvjustin <46082645+uvjustin@users.noreply.github.com> Date: Tue, 13 Oct 2020 18:15:30 +0800 Subject: [PATCH] Check if video el still exists before exoplayer resize in ha-hls-player (#7317) Co-authored-by: Bram Kragten --- src/components/ha-hls-player.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/ha-hls-player.ts b/src/components/ha-hls-player.ts index 124fb2fdf2..53e95ebd3f 100644 --- a/src/components/ha-hls-player.ts +++ b/src/components/ha-hls-player.ts @@ -154,6 +154,9 @@ class HaHLSPlayer extends LitElement { } private _resizeExoPlayer = () => { + if (!this._videoEl) { + return; + } const rect = this._videoEl.getBoundingClientRect(); this.hass!.auth.external!.fireMessage({ type: "exoplayer/resize",