feat 杀死报警后直播进程
This commit is contained in:
@@ -53,6 +53,7 @@ import { initHls, destroyHls } from '@/utils/video';
|
|||||||
import { onBeforeRouteLeave } from 'vue-router';
|
import { onBeforeRouteLeave } from 'vue-router';
|
||||||
import { useWarningListStore } from '@/store/modules/warnningList';
|
import { useWarningListStore } from '@/store/modules/warnningList';
|
||||||
import type { WarningListResult } from '@/api/WarningList/types';
|
import type { WarningListResult } from '@/api/WarningList/types';
|
||||||
|
import { addDemo } from '@/api/video/index';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -109,7 +110,9 @@ const parseNoticeItem = (notice: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//查看画面
|
//查看画面
|
||||||
|
const currentDeviceId = ref<string | number>();
|
||||||
const handleSee = async (row: any) => {
|
const handleSee = async (row: any) => {
|
||||||
|
currentDeviceId.value = row?.deviceId;
|
||||||
const videoId = row?.deviceId;
|
const videoId = row?.deviceId;
|
||||||
console.log('查看画面', row, 'deviceId', videoId);
|
console.log('查看画面', row, 'deviceId', videoId);
|
||||||
if (!videoId) {
|
if (!videoId) {
|
||||||
@@ -127,6 +130,13 @@ const handleSee = async (row: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleMonitorDialogClose = async (done: () => void) => {
|
const handleMonitorDialogClose = async (done: () => void) => {
|
||||||
|
try {
|
||||||
|
addDemo(currentDeviceId.value as string).then(() => {
|
||||||
|
console.log('关闭视频111111');
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log('关闭视频22222222', error);
|
||||||
|
}
|
||||||
// 卸载 Hls 与清理 video
|
// 卸载 Hls 与清理 video
|
||||||
destroyHls(monitorVideoRef);
|
destroyHls(monitorVideoRef);
|
||||||
done();
|
done();
|
||||||
|
|||||||
@@ -604,8 +604,6 @@ const cleanupVisibilityChange = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleMonitorDialogClose = (done: () => void) => {
|
const handleMonitorDialogClose = (done: () => void) => {
|
||||||
console.log('idddddddddddd', form.value.id);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
addDemo(form.value.id).then(() => {
|
addDemo(form.value.id).then(() => {
|
||||||
console.log('关闭视频111111');
|
console.log('关闭视频111111');
|
||||||
|
|||||||
Reference in New Issue
Block a user