config.ts 1.17 KB
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { SingleCameraConfig } from './index'
import cloneDeep from 'lodash/cloneDeep'

export enum sourceTypeEnum {
  CUSTOM = 'custom',
  PLATFORM = 'platform'
}

export enum VideoPlayerTypeEnum {
  m3u8 = 'application/x-mpegURL',
  mp4 = 'video/mp4',
  webm = 'video/webm',
  flv = 'video/x-flv'
}

export interface videoListInterface {
  name: string
  accessMode: number
  id: string
  videoUrl: string
  label: string
  value: string
  sn: string
  channelId: string
  deviceId: string
  params: GBT28181Params
}

export interface GBT28181Params {
  channelNo: string
  deviceId: string
  deviceName: string
}

export enum AccessMode {
  ManuallyEnter = 0, //手动输入
  Streaming = 1, //流媒体
  GBT28181 = 2 //GBT28181
}

export const option = {
  dataset: '',
  autoplay: true,
  poster: '',
  sourceType: 'custom',
  organization: '',
  videoId: ''
}

export default class Config extends PublicConfigClass implements CreateComponentType {
  public key = SingleCameraConfig.key
  public chartConfig = cloneDeep(SingleCameraConfig)
  public option = cloneDeep(option)
}