Showing
1 changed file
with
10 additions
and
1 deletions
| @@ -26,7 +26,12 @@ | @@ -26,7 +26,12 @@ | ||
| 26 | import { BasicModal, useModalInner } from '/@/components/Modal'; | 26 | import { BasicModal, useModalInner } from '/@/components/Modal'; |
| 27 | import type { StreamingManageRecord, CameraModel } from '/@/api/camera/model/cameraModel'; | 27 | import type { StreamingManageRecord, CameraModel } from '/@/api/camera/model/cameraModel'; |
| 28 | import { getVideoTypeByUrl } from '/@/components/Video'; | 28 | import { getVideoTypeByUrl } from '/@/components/Video'; |
| 29 | - import { closeFlvPlay, getFlvPlayUrl, getStreamingPlayUrl } from '/@/api/camera/cameraManager'; | 29 | + import { |
| 30 | + closeFlvPlay, | ||
| 31 | + getFlvPlayUrl, | ||
| 32 | + getStreamingPlayUrl, | ||
| 33 | + outVideo, | ||
| 34 | + } from '/@/api/camera/cameraManager'; | ||
| 30 | import { isRtspProtocol } from '/@/components/Video/src/utils'; | 35 | import { isRtspProtocol } from '/@/components/Video/src/utils'; |
| 31 | import { VideoJsPlayerOptions } from 'video.js'; | 36 | import { VideoJsPlayerOptions } from 'video.js'; |
| 32 | import { useFingerprint } from '/@/utils/useFingerprint'; | 37 | import { useFingerprint } from '/@/utils/useFingerprint'; |
| @@ -39,6 +44,8 @@ | @@ -39,6 +44,8 @@ | ||
| 39 | 44 | ||
| 40 | const playUrl = ref(''); | 45 | const playUrl = ref(''); |
| 41 | 46 | ||
| 47 | + const videoId = ref<string>(); | ||
| 48 | + | ||
| 42 | const withToken = ref(false); | 49 | const withToken = ref(false); |
| 43 | 50 | ||
| 44 | const fingerprintResult = ref<Nullable<GetResult>>(null); | 51 | const fingerprintResult = ref<Nullable<GetResult>>(null); |
| @@ -64,6 +71,7 @@ | @@ -64,6 +71,7 @@ | ||
| 64 | const [register] = useModalInner( | 71 | const [register] = useModalInner( |
| 65 | async (data: { record: CameraModel | StreamingManageRecord }) => { | 72 | async (data: { record: CameraModel | StreamingManageRecord }) => { |
| 66 | const { record } = data; | 73 | const { record } = data; |
| 74 | + videoId.value = record.id || ''; | ||
| 67 | const result = await getResult(); | 75 | const result = await getResult(); |
| 68 | fingerprintResult.value = result; | 76 | fingerprintResult.value = result; |
| 69 | if (record.accessMode === AccessMode.ManuallyEnter) { | 77 | if (record.accessMode === AccessMode.ManuallyEnter) { |
| @@ -94,6 +102,7 @@ | @@ -94,6 +102,7 @@ | ||
| 94 | const handleCancel = () => { | 102 | const handleCancel = () => { |
| 95 | showVideo.value = false; | 103 | showVideo.value = false; |
| 96 | withToken.value = false; | 104 | withToken.value = false; |
| 105 | + outVideo(videoId.value); | ||
| 97 | }; | 106 | }; |
| 98 | </script> | 107 | </script> |
| 99 | 108 |