Don't start the timer until the last moment.

This commit is contained in:
Dermot Duffy committed 2021-10-22 22:15:06 -07:00
1 parent a6cc7d43d6
commit 9e543dbb5a
1 file changed
+2 -2
+2 -2
View File
@@ -269,11 +269,11 @@ export class FrigateCardLiveJSMPEG extends LitElement {
this._jsmpegURL = await this._getURL();
if (this._jsmpegURL) {
this._jsmpegVideoPlayer = this._createJSMPEGPlayer();
this._refreshPlayerTimerID = window.setTimeout(() => {
this._refreshPlayer();
}, (URL_SIGN_EXPIRY_SECONDS - URL_SIGN_REFRESH_THRESHOLD_SECONDS) * 1000);
this._jsmpegVideoPlayer = this._createJSMPEGPlayer();
}
this.requestUpdate();
}