config.js
3.13 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
const operateBtns = {
fullscreen: true,
screenshot: false,
play: true,
audio: true,
ptz: true, // 云台
zoom: true,// 电子放大
performance: true, // 视频流信息展示
record: true, // 录制
scale: true, // 显示模式:拉伸、缩放、正常
quality: false, // 视频清晰度
};
const extendOperateBtns = [];
export function getPlayerConfig () {
return {
decoder: '/jessibuca-pro/decoder-pro.js',
text: '', // TODO: 功能暂不清楚
keepScreenOn: true, // 屏幕常亮
isResize: false,
isNotMute: false,
debug: false, // 是否开启控制台调试打印
// 播放相关
videoBuffer: 0.1, // 缓存时长
videoBufferDelay: 0.2, // 缓存延迟(延迟超过会触发丢帧)
// TODO: 是否通过浏览器API判断是否支持后,再赋值true或false
// useMSE: false,
// useWCS: checkSupportWCSHevc(),
// useWCS: false,
// useSIMD: checkSupportSIMD(),
// wcsUseVideoRender: checkSupportWCSHevc(),
useWebFullScreen: false, // ios可能不支持系统级别全屏,可能要使用此配置
timeout: 10, // 在连接成功之前(loading)和播放中途(heart),如果超过设定时长无数据返回,则回调timeout事件
// 按钮和界面
loadingText: '加载中...',
controlAutoHide: true,
supportDblclickFullscreen: false,
showBandwidth: true, // 显示网速
// angle fontSize fontFamily
fullscreenWatermarkConfig: {
opacity: 0.3,
text: '',
},
operateBtns,
extendOperateBtns: [],
showPerformance: false, // 显示性能
qualityConfig: ['标清', '高清'],
// 云台控制
ptzClickType: 'mouseDownAndUp', // click mouseDownAndUp
ptzZoomShow: true,
ptzMoreArrowShow: true,
// ptzApertureShow: true, // 光圈
ptzFocusShow: true,
}
}
export function getRotateConfig() {
return {
name: 'rotate',
index: 1,
icon: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3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