更新時(shí)間:2019-11-19
在使用SDK業(yè)務(wù)組件時(shí),需要先完成SDK的基礎(chǔ)組件的初始化。
"use strict"; (function(root) { var options = { domain: "localhost.cloudec.huaweicloud.com", isWSS: 1, confCtrlProtocol: 1, isTlsSupport: 0, uiPluginAppDisplayName : "eSDK-Desktop", IsSupportSvcConference:1, uiPluginlLanguage : 0, uiPluginResourcesPath: "", uiPluginUserFilesPath:"", uiPluginHasFrameInfo:0, uiPluginFrameInfoX:0, uiPluginFrameInfoY:0, uiPluginFrameInfoWidth:1280, uiPluginFrameInfoHeight:720, uiPluginHasParentInfo:0, uiPluginParentInfoIsNeedAttach:0, uiPluginParentInfoXOffsetRate:0, uiPluginParentInfoYOffsetRate:0, uiPluginHideTopToolBar:0, uiPluginHideBottomToolBar:0, uiPluginHideInviteButton:1, uiPluginHideAttendeesButton:1, uiPluginHideShareButton:1, uiPluginDataHideInviteButton:1, uiPluginDataHideAttendeesButton:1, uiPluginDataHideRequestRemotecontrolButton:1, } cloudEC.configure(options); })(this); |
參考文件:\usage\config.js。
代碼示例:
"use strict"; (function (root) { var listeners = { onForceUnReg: (ret) => { alert("you have be kickouted") document.getElementById("login").style.display = "block"; document.getElementById("main").style.display = "none"; }, onConfIncoming: (ret) => { let con_ret = confirm("you have a incoming conference, accept?"); if (con_ret === true) { ret.info.answerConference(true) } else { ret.info.answerConference(false) } }, onConfConnected: (ret) => { alert("the conference is connected") }, onError: (ret) => { alert("wowo,error is coming!" + ret) }, } root.client = cloudEC.createClient(listeners); })(this); |
參考文件:\usage\event_process.js。