Place the "readyState" check above (MonitorStream.js)

This commit is contained in:
IgorA100
2025-04-02 17:02:03 +03:00
committed by GitHub
parent 40a2ef82f9
commit b1fadf96c1

View File

@@ -1229,9 +1229,9 @@ function mseListenerSourceopen(context, videoEl, url) {
if (this.started) this.restart();
};
context.wsMSE.onmessage = function(event) {
if (context.mse.readyState !== "open") return;
const data = new Uint8Array(event.data);
if (data[0] === 9) {
if (context.mse.readyState !== "open") return;
let mimeCodec;
const decodedArr = data.slice(1);
if (window.TextDecoder) {