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 119 record?.accessMode === AccessMode.Streaming &&
120 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 128 setFieldsValue({ ...record, videoType: record.videoPlatformDTO?.type });
... ... @@ -153,6 +156,7 @@
153 156 values.videoType === VideoPlatformEnum.FLUORITE
154 157 ) {
155 158 values.streamType = values.articulation;
  159 + values.playProtocol = values.videoFormat;
156 160 }
157 161
158 162 await createOrEditCameraManage(values);
... ...
... ... @@ -48,6 +48,11 @@ export enum MediaType {
48 48 M3U8 = 'm3u8',
49 49 }
50 50
  51 +export enum FluoriteMideaProtocolEnum {
  52 + HLS = 2,
  53 + FLV = 4,
  54 +}
  55 +
51 56 export enum ArticulationEnumType {
52 57 HIGH_DEFINITION = 1,
53 58 SMOOTH = 2,
... ... @@ -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 332 field: 'playProtocol',
312 333 label: '播放协议',
313 334 component: 'RadioGroup',
... ...