From 141023dd986503c5e64befeab94f7c3865012502 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Sun, 5 Jul 2026 17:41:45 +0300 Subject: [PATCH] Clear mseSourceBuffer only if the number of buffers is greater than zero. (MonitorStream.js) --- web/js/MonitorStream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index 865a53bc4..28787e60f 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -782,7 +782,7 @@ function MonitorStream(monitorData) { Very, very rarely, on the MONTAGE PAGE THERE MAY BE AN ERROR OF THE TYPE: TypeError: Failed to execute 'remove' on 'SourceBuffer': The start provided (0) is outside the range (0, 0). Possibly due to high CPU load, the browser does not have time to process or the "src" attribute was removed from the object. */ - this.mseSourceBuffer.remove(0, Infinity); + if (this.mse.sourceBuffers.length > 0) this.mseSourceBuffer.remove(0, Infinity); } catch (e) { console.warn(`${dateTimeToISOLocal(new Date())} An error occurred while cleaning Source Buffer for ID=${this.id}`, e); reject(e);