feat 杀死直播进程
This commit is contained in:
@@ -22,8 +22,8 @@ export const listDemo = (deviceId?: string | number) => {
|
||||
*/
|
||||
export const addDemo = (data: any) => {
|
||||
return request({
|
||||
url: '/haikang/isup/stream/live/stop',
|
||||
method: 'get',
|
||||
params: data
|
||||
url: `/haikang/isup/stream/live/stop?id=${data}`,
|
||||
method: 'get'
|
||||
// params: data
|
||||
});
|
||||
};
|
||||
|
||||
@@ -254,12 +254,12 @@
|
||||
<script setup name="Demo" lang="ts">
|
||||
import { addEquipment, getDevicetList, getDeviceInfo, delDevice, actDevice, updateDeviceInfo, drawInfo } from '@/api/equipmentList/index';
|
||||
import { EquipmentList, DeviceInfoForm, AlarmAreaData } from '@/api/equipmentList/types';
|
||||
import { listDemo, getDemo, delDemo, addDemo, updateDemo } from '@/api/demo/demo';
|
||||
import { DemoVO, DemoQuery, DemoForm } from '@/api/demo/demo/types';
|
||||
import { log } from 'node:console';
|
||||
import { initHls, destroyHls } from '@/utils/video';
|
||||
import { nextTick } from 'vue';
|
||||
import { useVideosStore } from '@/store/modules/video';
|
||||
import { addDemo } from '@/api/video/index';
|
||||
|
||||
const videosStore = useVideosStore();
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@@ -604,6 +604,15 @@ const cleanupVisibilityChange = () => {
|
||||
};
|
||||
|
||||
const handleMonitorDialogClose = (done: () => void) => {
|
||||
console.log('idddddddddddd', form.value.id);
|
||||
|
||||
try {
|
||||
addDemo(form.value.id).then(() => {
|
||||
console.log('关闭视频111111');
|
||||
});
|
||||
} catch (error) {
|
||||
console.log('关闭视频22222222', error);
|
||||
}
|
||||
// 卸载 Hls 与清理 video
|
||||
destroyHls(monitorVideoRef);
|
||||
monitorVideoUrl.value = '';
|
||||
|
||||
Reference in New Issue
Block a user