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