Showing
3 changed files
with
5 additions
and
5 deletions
... | ... | @@ -5,7 +5,7 @@ import {StreamType} from "@/components/Video/src/types"; |
5 | 5 | import {getPlayUrl} from "@/packages/components/external/Informations/Mores/SingleCamera/config"; |
6 | 6 | import {CameraRecord} from "@/api/external/common/model"; |
7 | 7 | |
8 | -; | |
8 | + | |
9 | 9 | |
10 | 10 | const props = defineProps<{ |
11 | 11 | dataset?: any |
... | ... | @@ -41,7 +41,7 @@ const handleGetPlayUrl = async (dataset: Dataset) => { |
41 | 41 | deviceId: deviceId, |
42 | 42 | channelNo: channelId, |
43 | 43 | }, |
44 | - } as unknown as CameraRecord) | |
44 | + } as unknown as CameraRecord) || {} | |
45 | 45 | playUrl.value = url |
46 | 46 | playType.value = type |
47 | 47 | } finally { | ... | ... |
... | ... | @@ -90,7 +90,7 @@ export const isRtspProtocol = (url: string) => { |
90 | 90 | |
91 | 91 | export async function getPlayUrl( |
92 | 92 | params: CameraRecord |
93 | -): Promise<{ url: string; type: StreamType }> { | |
93 | +): Promise<{ url: string; type: StreamType } | undefined> { | |
94 | 94 | const { accessMode } = params; |
95 | 95 | if (accessMode === AccessMode.ManuallyEnter) { |
96 | 96 | const { videoUrl } = params; | ... | ... |
... | ... | @@ -53,8 +53,8 @@ async function getPlaySource(params: Dataset) { |
53 | 53 | deviceId: deviceId, |
54 | 54 | channelNo: channelId, |
55 | 55 | }, |
56 | - } as unknown as CameraRecord) | |
57 | - sourceUrl.value = url | |
56 | + } as unknown as CameraRecord) || {} | |
57 | + sourceUrl.value = url! | |
58 | 58 | playType.value = type |
59 | 59 | } finally { |
60 | 60 | showLoading.value = false | ... | ... |