Taro.setEnable1v1Chat(option)
开启双人通话
支持情况:

类型
(option: Option) => Promise<TaroGeneral.CallbackResult>
参数
| 参数 | 类型 |
|---|---|
| option | Option |
Option
| 参数 | 类型 | 默认值 | 必填 | 说明 |
|---|---|---|---|---|
| enable | boolean | 是 | 是否开启 | |
| backgroundType | keyof ColorType | 0 | 否 | 窗口背景色 |
| minWindowType | keyof ColorType | 1 | 否 | 小窗样式 |
| complete | (res: TaroGeneral.CallbackResult) => void | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) | |
| fail | (res: TaroGeneral.CallbackResult) => void | 否 | 接口调用失败的回调函数 | |
| success | (res: TaroGeneral.CallbackResult) => void | 否 | 接口调用成功的回调函数 |
ColorType
音频通话背景以及小窗模式背景
| 参数 | 说明 |
|---|---|
| 0 | #262930 |
| 1 | #FA5151 |
| 2 | #FA9D3B |
| 3 | #3D7257 |
| 4 | #1485EE |
| 5 | #6467F0 |