Commit 8ab764f658a8908099cfe57f7173ed0442047d5d

Authored by xp.Huang
2 parents 024e1fab a3b912d2

Merge branch 'feat/camera-manage' into 'main_dev'

feat: 视频配置,萤石云新增播放协议选择

See merge request yunteng/thingskit-front!1158
@@ -119,7 +119,10 @@ @@ -119,7 +119,10 @@
119 record?.accessMode === AccessMode.Streaming && 119 record?.accessMode === AccessMode.Streaming &&
120 record.videoPlatformDTO?.type === VideoPlatformEnum.FLUORITE 120 record.videoPlatformDTO?.type === VideoPlatformEnum.FLUORITE
121 ) { 121 ) {
122 - Object.assign(record, { articulation: record.streamType }); 122 + Object.assign(record, {
  123 + articulation: record.streamType,
  124 + videoFormat: record.playProtocol,
  125 + });
123 } 126 }
124 127
125 setFieldsValue({ ...record, videoType: record.videoPlatformDTO?.type }); 128 setFieldsValue({ ...record, videoType: record.videoPlatformDTO?.type });
@@ -153,6 +156,7 @@ @@ -153,6 +156,7 @@
153 values.videoType === VideoPlatformEnum.FLUORITE 156 values.videoType === VideoPlatformEnum.FLUORITE
154 ) { 157 ) {
155 values.streamType = values.articulation; 158 values.streamType = values.articulation;
  159 + values.playProtocol = values.videoFormat;
156 } 160 }
157 161
158 await createOrEditCameraManage(values); 162 await createOrEditCameraManage(values);
@@ -48,6 +48,11 @@ export enum MediaType { @@ -48,6 +48,11 @@ export enum MediaType {
48 M3U8 = 'm3u8', 48 M3U8 = 'm3u8',
49 } 49 }
50 50
  51 +export enum FluoriteMideaProtocolEnum {
  52 + HLS = 2,
  53 + FLV = 4,
  54 +}
  55 +
51 export enum ArticulationEnumType { 56 export enum ArticulationEnumType {
52 HIGH_DEFINITION = 1, 57 HIGH_DEFINITION = 1,
53 SMOOTH = 2, 58 SMOOTH = 2,
@@ -308,6 +313,22 @@ export const formSchema: QFormSchema[] = [ @@ -308,6 +313,22 @@ export const formSchema: QFormSchema[] = [
308 }, 313 },
309 }, 314 },
310 { 315 {
  316 + field: 'videoFormat',
  317 + label: '视频格式',
  318 + component: 'Select',
  319 + ifShow: ({ model }) =>
  320 + model.accessMode === AccessMode.Streaming && model.videoType === VideoPlatformEnum.FLUORITE,
  321 + defaultValue: FluoriteMideaProtocolEnum.FLV,
  322 + required: true,
  323 + componentProps: {
  324 + options: [
  325 + { label: 'FLV', value: FluoriteMideaProtocolEnum.FLV },
  326 + { label: 'HLS', value: FluoriteMideaProtocolEnum.HLS },
  327 + ],
  328 + allowClear: false,
  329 + },
  330 + },
  331 + {
311 field: 'playProtocol', 332 field: 'playProtocol',
312 label: '播放协议', 333 label: '播放协议',
313 component: 'RadioGroup', 334 component: 'RadioGroup',