Fixes for when player is left in the background.

This commit is contained in:
Dermot Duffy
2021-10-23 10:05:27 -07:00
parent 9e543dbb5a
commit 2ed6b98278
+5
View File
@@ -219,6 +219,7 @@ export class FrigateCardLiveJSMPEG extends LitElement {
},
},
{
pauseWhenHidden: false,
protocols: [],
audio: false,
videoBufferSize: 1024 * 1024 * 4,
@@ -253,11 +254,15 @@ export class FrigateCardLiveJSMPEG extends LitElement {
connectedCallback(): void {
super.connectedCallback();
if (this.isConnected) {
this.requestUpdate();
}
}
disconnectedCallback(): void {
if (!this.isConnected) {
this._resetPlayer();
}
super.disconnectedCallback();
}