语音通话简易流程
This commit is contained in:
@@ -105,7 +105,8 @@ const addListeners = () => {
|
||||
console.log("Engine:OnCallReceived=>" + "监听通话呼入, 目标id=>", res.data.targetId);
|
||||
console.log('RES', res);
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/private/call?targetId=' + res.data.targetId,
|
||||
url: '/pages/im/private/call?targetId=' + res.data.targetId + '&mediaType=' +
|
||||
res.data.mediaType,
|
||||
success: (err) => {
|
||||
console.log('跳转视频通话成功');
|
||||
},
|
||||
@@ -114,21 +115,6 @@ const addListeners = () => {
|
||||
}
|
||||
})
|
||||
})
|
||||
CallLib.onCallOutgoing((res) => {
|
||||
console.log("主叫端拨出电话后,通过回调 onCallOutgoing,通知当前 call 的详细信息", res)
|
||||
})
|
||||
CallLib.onCallConnected((res) => {
|
||||
console.log("Engine:OnCallConnected=>" + "通话接通时,通过回调 onCallConnected 通知当前 call 的详细信息", res)
|
||||
});
|
||||
CallLib.onRemoteUserJoined((res) => {
|
||||
console.log("Engine:OnRemoteUserJoined=>" + "主叫端拨出电话,被叫端收到请求后,加入通话,被叫端Id为=>", res.data.userId);
|
||||
})
|
||||
CallLib.onCallDisconnected((res) => {
|
||||
console.log("Engine:OnCallDisconnected=>" + "挂断成功, 挂断原因=>", res.data.reason)
|
||||
})
|
||||
CallLib.onRemoteUserLeft((res) => {
|
||||
console.log("Engine:OnRemoteUserLeft=>" + "远端用户挂断,远端Id为=>", res.data.reason)
|
||||
})
|
||||
}
|
||||
|
||||
// 维护消息列表
|
||||
|
||||
Reference in New Issue
Block a user