|
@@ -24,6 +24,9 @@ import { isRtspProtocol } from '/@/components/Video/src/utils'; |
|
@@ -24,6 +24,9 @@ import { isRtspProtocol } from '/@/components/Video/src/utils'; |
24
|
import { useFingerprint } from '/@/utils/useFingerprint';
|
24
|
import { useFingerprint } from '/@/utils/useFingerprint';
|
25
|
import { getVideoControlStart } from '/@/api/device/videoChannel';
|
25
|
import { getVideoControlStart } from '/@/api/device/videoChannel';
|
26
|
import { StreamType as PlayerStreamType } from '/@/components/Video/src/types';
|
26
|
import { StreamType as PlayerStreamType } from '/@/components/Video/src/types';
|
|
|
27
|
+import { useGlobSetting } from '/@/hooks/setting';
|
|
|
28
|
+import { BooleanStringEnum } from '/@/enums/toolEnum';
|
|
|
29
|
+import { isBoolean } from '/@/utils/is';
|
27
|
|
30
|
|
28
|
interface FileItem {
|
31
|
interface FileItem {
|
29
|
uid: string;
|
32
|
uid: string;
|
|
@@ -642,7 +645,13 @@ export async function getPlayUrl( |
|
@@ -642,7 +645,13 @@ export async function getPlayUrl( |
642
|
} else if (accessMode === AccessMode.GBT28181) {
|
645
|
} else if (accessMode === AccessMode.GBT28181) {
|
643
|
const { deviceId, channelNo } = params?.params || {};
|
646
|
const { deviceId, channelNo } = params?.params || {};
|
644
|
const result = await getVideoControlStart({ channelId: channelNo!, deviceId: deviceId! });
|
647
|
const result = await getVideoControlStart({ channelId: channelNo!, deviceId: deviceId! });
|
645
|
- return { url: result.data.flv, type: 'flv' };
|
648
|
+ const { securityPolicy } = useGlobSetting();
|
|
|
649
|
+ return {
|
|
|
650
|
+ url: (isBoolean(securityPolicy) ? securityPolicy : securityPolicy === BooleanStringEnum.TRUE)
|
|
|
651
|
+ ? result.data.https_flv
|
|
|
652
|
+ : result.data.flv,
|
|
|
653
|
+ type: 'flv',
|
|
|
654
|
+ };
|
646
|
} else {
|
655
|
} else {
|
647
|
const { id, playProtocol } = params;
|
656
|
const { id, playProtocol } = params;
|
648
|
const result = await getStreamingPlayUrl(id);
|
657
|
const result = await getStreamingPlayUrl(id);
|