Don't destroy the player when the node is disconnected (temporarily).
This commit is contained in:
@@ -202,15 +202,6 @@ export class FrigateCardViewerJSMPEG extends LitElement {
|
||||
return url.replace(/^http/i, 'ws');
|
||||
}
|
||||
|
||||
disconnectedCallback(): void {
|
||||
if (this._jsmpegVideoPlayer) {
|
||||
this._jsmpegVideoPlayer.destroy();
|
||||
this._jsmpegVideoPlayer = null;
|
||||
}
|
||||
this._jsmpegCanvasElement = null;
|
||||
super.disconnectedCallback();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
return html`${until(this._render(), renderProgressIndicator())}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user