mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-07 18:02:09 -04:00
Merge pull request #4967 from IgorA100/patch-225403
Clear mseSourceBuffer only if the number of buffers is greater than zero. (MonitorStream.js)
This commit is contained in:
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user