自定义配置
说明:
在初始化或入会前,可以设置 SDK 的一些通用参数和自定义 UI。
setParams
设置 SDK 参数。
const config = {
option: {
autoOpenMic: true, // 是否入会自动打开麦克风
autoOpenCam: false, // 是否入会自动打开摄像头
language: "zh", // 语言: "zh" | "en"
showDuration: true, // 是否显示会议时长
uiStyle, // UI界面风格(0:会议模式;1:1v1通话模式;2:多人通话模式)
},
custom: [ // uiStyle为非会议模式时,custom参数将不生效
{
name: "custom_button",
hidden: false,
text: "自定义按钮"
}
]
};
try {
await RTCMeetingSDK.setParams(config);
console.log('参数设置成功');
} catch (error) {
console.error('参数设置失败', error);
}