feat 优化直播链路
This commit is contained in:
@@ -75,7 +75,7 @@ export const initHls = (monitorVideoUrl, monitorVideoRef, isDialogVisible?: () =
|
||||
if (Hls.isSupported()) {
|
||||
const hls = new Hls({
|
||||
// ★ ZLM 注册流需要时间,配置自动重试
|
||||
manifestLoadingMaxRetry: 10,
|
||||
manifestLoadingMaxRetry: 20,
|
||||
manifestLoadingRetryDelay: 500,
|
||||
manifestLoadingTimeOut: 5000,
|
||||
levelLoadingMaxRetry: 5,
|
||||
@@ -123,11 +123,11 @@ export const initHls = (monitorVideoUrl, monitorVideoRef, isDialogVisible?: () =
|
||||
case Hls.ErrorTypes.NETWORK_ERROR:
|
||||
if (data.details === 'manifestLoadError' || data.details === 'manifestLoadTimeOut') {
|
||||
//console.error('网络错误');
|
||||
ElMessage.error('网络错误,请检查网络连接');
|
||||
ElMessage.error('网络错误,请检查网络连接, 并点击刷新');
|
||||
// if (onStall) {
|
||||
// onStall();
|
||||
// }
|
||||
hls.startLoad();
|
||||
onStall();
|
||||
} else {
|
||||
ElMessage.error('[HLS] 网络错误,自动恢复...');
|
||||
hls.startLoad();
|
||||
|
||||
Reference in New Issue
Block a user