//发起语音通话
async oneToOne() {
let userinfo = wx.getStorageSync('userinfo')
let user_id = userinfo.id
const res = await api.$getuserInfo({ user_id: 37 })
let row = res.data.data
// 创建/加入通话
wx.join1v1Chat({
// 呼叫方信息
caller: row.caller,
// 接听方信息
listener: row.listener,
backgroundType: 0,
disableSwitchVoice: true, // 不允许切换到语音通话
roomType: 'video',
icon: 'success',
minWindowType: 0,
duration: 2000,
success(res) {
console.log(res);
},
fail(err) {
console.log(err);
},
})
},