Fix hls player (#7362)

This commit is contained in:
Bram Kragten 2020-10-17 23:43:00 +02:00 committed by GitHub
parent 3277a4e8c3
commit a7998b30c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,8 @@ class HaHLSPlayer extends LitElement {
@property({ type: Boolean, attribute: "allow-exoplayer" })
public allowExoPlayer = false;
@query("video", true) private _videoEl!: HTMLVideoElement;
// don't cache this, as we remove it on disconnects
@query("video") private _videoEl!: HTMLVideoElement;
@internalProperty() private _attached = false;
@ -155,7 +156,7 @@ class HaHLSPlayer extends LitElement {
private _resizeExoPlayer = () => {
if (!this._videoEl) {
return;
return;
}
const rect = this._videoEl.getBoundingClientRect();
this.hass!.auth.external!.fireMessage({