@@ -399,8 +399,18 @@ const handleSee = async (row?: any) => {
|
||||
Object.assign(form.value, res.data);
|
||||
dialog1.visible = true;
|
||||
dialog1.title = '修改设备';
|
||||
|
||||
destroyHls();
|
||||
monitorVideoUrl.value = '';
|
||||
await videosStore.getVideos(row.id);
|
||||
monitorVideoUrl.value = videosStore.hisUrl;
|
||||
monitorVideoUrl.value = videosStore.hisUrl || '';
|
||||
|
||||
if (!monitorVideoUrl.value) {
|
||||
proxy?.$modal.msgWarning('该设备未登录或无法获取直播地址,已停止播放旧画面');
|
||||
initVideoResizeObserver();
|
||||
return;
|
||||
}
|
||||
|
||||
// 等待 DOM 更新后初始化 Hls
|
||||
await nextTick();
|
||||
initHls();
|
||||
@@ -517,6 +527,7 @@ const destroyVideoResizeObserver = () => {
|
||||
const handleMonitorDialogClose = (done: () => void) => {
|
||||
// 卸载 Hls 与清理 video
|
||||
destroyHls();
|
||||
monitorVideoUrl.value = '';
|
||||
destroyVideoResizeObserver();
|
||||
resetMonitorDraw();
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user