Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2016af9

Browse files
committed
[ADD]添加模块选择配置项
1 parent d564ea3 commit 2016af9

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

demos/base-demo/ezuikit.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
// 对讲插件依赖
7676
isReliesReady: false,
7777
template: 'simple',
78-
audio: 0,// 声音id -1-不开启 0-第一路 1-第二路
78+
uikitModule: ["video"],
79+
audio: 0,// 声音id -1-不开启 0-第一路 1-第二路
7980
},
8081
state: {
8182
countTimer: undefined,// countTime 计时器
@@ -111,6 +112,9 @@
111112
if (params.template) {
112113
EZUIKit.opt.template = params.template;
113114
}
115+
if(params.uikitModule){
116+
EZUIKit.opt.uikitModule = params.uikitModule;
117+
}
114118

115119
let id = EZUIKit.opt.id;
116120
var domElement = document.getElementById(id);
@@ -340,7 +344,7 @@
340344
}
341345
return result;
342346
}
343-
if (matchFooterOpt().footerContainer) {
347+
if (matchFooterOpt().footerContainer || EZUIKit.opt.uikitModule.indexOf('talk') !== -1) {
344348
var recoderCSS = EZUIKit.opt.filePath + '/npm/css/recoder.css';
345349
var recoderJs = EZUIKit.opt.filePath + '/npm/js/recoder.js';
346350
var recorderJs = EZUIKit.opt.filePath + '/recorder.js';

demos/base-demo/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ <h2>视频模式使用示例:</h2>
3333
header: ['capturePicture','save','zoom'], // 如果templete参数不为simple,该字段将被覆盖
3434
// 视频下方底部控件
3535
footer: ['talk','broadcast','hd','fullScreen'], // 如果template参数不为simple,该字段将被覆盖
36+
uikitModule: ['video','talk'], // 子模块,默认为视频模块["video"] video-视频;talk-对讲
3637
openSoundCallBack: (data) => console.log("开启声音回调",data),
3738
closeSoundCallBack: (data) => console.log("关闭声音回调",data),
3839
startSaveCallBack: (data) => console.log("开始录像回调",data),

ezuikit.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
// 对讲插件依赖
7676
isReliesReady: false,
7777
template: 'simple',
78-
audio: 0,// 声音id -1-不开启 0-第一路 1-第二路
78+
uikitModule: ["video"],
79+
audio: 0,// 声音id -1-不开启 0-第一路 1-第二路
7980
},
8081
state: {
8182
countTimer: undefined,// countTime 计时器
@@ -111,6 +112,9 @@
111112
if (params.template) {
112113
EZUIKit.opt.template = params.template;
113114
}
115+
if(params.uikitModule){
116+
EZUIKit.opt.uikitModule = params.uikitModule;
117+
}
114118

115119
let id = EZUIKit.opt.id;
116120
var domElement = document.getElementById(id);
@@ -340,7 +344,7 @@
340344
}
341345
return result;
342346
}
343-
if (matchFooterOpt().footerContainer) {
347+
if (matchFooterOpt().footerContainer || EZUIKit.opt.uikitModule.indexOf('talk') !== -1) {
344348
var recoderCSS = EZUIKit.opt.filePath + '/npm/css/recoder.css';
345349
var recoderJs = EZUIKit.opt.filePath + '/npm/js/recoder.js';
346350
var recorderJs = EZUIKit.opt.filePath + '/recorder.js';

0 commit comments

Comments
 (0)