Commit 024e1fabcff18806cb500fcb931a4ccc8ec0e500

Authored by xp.Huang
2 parents 16e21722 02d1c849

Merge branch 'fix/camera-manage-delete-outplay' into 'main_dev'

fix: 视频流删除退出视频接口调取

See merge request yunteng/thingskit-front!1157
... ... @@ -19,7 +19,6 @@ enum CameraManagerApi {
19 19 STREAMING_POST_URL = '/video/platform',
20 20 STREAMING_DELETE_URL = '/video/platform',
21 21 STREAMING_PLAY_GET_URL = '/video/url',
22   - OUT_VIDEO = '/video/outVideo',
23 22 }
24 23
25 24 export const cameraPage = (params: CameraQueryParam) => {
... ... @@ -128,13 +127,3 @@ export const controlling = (params: any) => {
128 127 params,
129 128 });
130 129 };
131   -
132   -/**
133   - * @description 退出视频流播放
134   - * @param entityId
135   - */
136   -export const outVideo = (entityId) => {
137   - return defHttp.get({
138   - url: `${CameraManagerApi.OUT_VIDEO}/${entityId}`,
139   - });
140   -};
... ...
... ... @@ -29,12 +29,7 @@
29 29 import type { StreamingManageRecord, CameraModel } from '/@/api/camera/model/cameraModel';
30 30 import { BasicVideoPlay, getVideoTypeByUrl } from '/@/components/Video';
31 31 import { AccessMode } from './config.data';
32   - import {
33   - closeFlvPlay,
34   - getFlvPlayUrl,
35   - getStreamingPlayUrl,
36   - outVideo,
37   - } from '/@/api/camera/cameraManager';
  32 + import { closeFlvPlay, getFlvPlayUrl, getStreamingPlayUrl } from '/@/api/camera/cameraManager';
38 33 import { isRtspProtocol } from '/@/components/Video/src/utils';
39 34 import { VideoJsPlayerOptions } from 'video.js';
40 35 import { useFingerprint } from '/@/utils/useFingerprint';
... ... @@ -102,7 +97,6 @@
102 97 const handleCancel = () => {
103 98 showVideo.value = false;
104 99 withToken.value = false;
105   - outVideo(videoId.value);
106 100 };
107 101 </script>
108 102
... ...
1 1 <script setup lang="ts">
2 2 import { PageWrapper } from '/@/components/Page';
3 3 import OrganizationIdTree from '../../common/organizationIdTree/src/OrganizationIdTree.vue';
4   - import { onMounted, onUnmounted, reactive, Ref, ref, unref, watch } from 'vue';
  4 + import { onMounted, reactive, Ref, ref, unref, watch } from 'vue';
5 5 import { Spin, Button, Pagination, Space, List } from 'ant-design-vue';
6 6 import { cameraPage, closeFlvPlay, getFlvPlayUrl } from '/@/api/camera/cameraManager';
7 7 import { CameraRecord } from '/@/api/camera/model/cameraModel';
... ... @@ -10,7 +10,7 @@
10 10 import { useDrawer } from '/@/components/Drawer';
11 11 import { AccessMode, CameraPermission, PageMode } from './config.data';
12 12 import SvgIcon from '/@/components/Icon/src/SvgIcon.vue';
13   - import { getStreamingPlayUrl, outVideo } from '/@/api/camera/cameraManager';
  13 + import { getStreamingPlayUrl } from '/@/api/camera/cameraManager';
14 14 import { buildUUID } from '/@/utils/uuid';
15 15 import { BasicVideoPlay, getVideoTypeByUrl } from '/@/components/Video';
16 16 import { VideoJsPlayerOptions } from 'video.js';
... ... @@ -192,25 +192,9 @@
192 192 }
193 193 };
194 194
195   - const handleVideoOut = () => {
196   - if (unref(cameraList).length) {
197   - unref(cameraList).forEach((item) => {
198   - if (item.accessMode === 1) {
199   - outVideo(item.id);
200   - }
201   - });
202   - }
203   - };
204   -
205 195 onMounted(() => {
206 196 getCameraList();
207 197 });
208   - onUnmounted(() => {
209   - handleVideoOut();
210   - });
211   - window.addEventListener('beforeunload', function () {
212   - handleVideoOut();
213   - });
214 198
215 199 const listEl = ref();
216 200 onMounted(() => {
... ...
... ... @@ -26,12 +26,7 @@
26 26 import { BasicModal, useModalInner } from '/@/components/Modal';
27 27 import type { StreamingManageRecord, CameraModel } from '/@/api/camera/model/cameraModel';
28 28 import { getVideoTypeByUrl } from '/@/components/Video';
29   - import {
30   - closeFlvPlay,
31   - getFlvPlayUrl,
32   - getStreamingPlayUrl,
33   - outVideo,
34   - } from '/@/api/camera/cameraManager';
  29 + import { closeFlvPlay, getFlvPlayUrl, getStreamingPlayUrl } from '/@/api/camera/cameraManager';
35 30 import { isRtspProtocol } from '/@/components/Video/src/utils';
36 31 import { VideoJsPlayerOptions } from 'video.js';
37 32 import { useFingerprint } from '/@/utils/useFingerprint';
... ... @@ -102,7 +97,6 @@
102 97 const handleCancel = () => {
103 98 showVideo.value = false;
104 99 withToken.value = false;
105   - outVideo(videoId.value);
106 100 };
107 101 </script>
108 102
... ...