Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import Hls from 'hls.js';
|
import Hls from 'hls.js';
|
||||||
|
import { log } from 'node:console';
|
||||||
let hlsInstance: Hls | null = null;
|
let hlsInstance: Hls | null = null;
|
||||||
// let hlsRetryCount = 0;
|
// let hlsRetryCount = 0;
|
||||||
|
|
||||||
@@ -68,7 +69,9 @@ export const destroyHls = (monitorVideoRef) => {
|
|||||||
video.removeAttribute('src');
|
video.removeAttribute('src');
|
||||||
// 对某些浏览器,需要调用 load() 来重置 media element
|
// 对某些浏览器,需要调用 load() 来重置 media element
|
||||||
if (typeof video.load === 'function') video.load();
|
if (typeof video.load === 'function') video.load();
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
console.log('Error in destroyHls:', e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user