config.ts
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { CameraConfig } from './index'
import cloneDeep from 'lodash/cloneDeep'
export enum VideoPlayerType {
m3u8 = 'application/x-mpegURL',
mp4 = 'video/mp4',
webm = 'video/webm',
flv = 'video/x-flv',
}
export enum sourceTypeEnum {
CUSTOM = 'custom',
PLATFORM = 'platform'
}
export enum sourceTypeNameEnum {
CUSTOM = '自定义',
PLATFORM = '平台获取'
}
export interface datasetList {
url: string | null
sourceType: string
organization: string
autoPlay: boolean
className?: string[] & string,
sty?: Recordable
}
export enum AccessModeEnum {
ManuallyEnter = 0, //手动输入
Streaming = 1, //流媒体
GBT28181 = 2 //GBT28181
}
export interface GBT28181Params {
channelNo: string
deviceId: string
deviceName: string
}
export interface videoList {
name: string
accessMode: number
id: string
videoUrl: string
label: string
value: string
sn: string
channelId: string
deviceId: string
customUrl: string
params: GBT28181Params
}
export const option = {
autoSwitch: false, //开启切换
interval: 2000, // 自动播放的间隔(ms)
dataset: [
{
id: null,
url: null,
sourceType: sourceTypeEnum.CUSTOM,
organization: '',
autoPlay: true,
accessMode:'', channelId:'', deviceId:'', customUrl:''
}
],
}
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = CameraConfig.key
public chartConfig = cloneDeep(CameraConfig)
public option = cloneDeep(option)
}