Commit 2e4967ef by qlintonger xeno

多人通话中完成

parent 938f107d
......@@ -100,10 +100,6 @@ export class AgoraHandle {
}
case "CmdCall": {
console.log('主动呼叫他人的反馈', msgData);
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
handleCommonCall(msgData, toID, fromID)
toID.split(',').forEach(function(a) {
if (!chatChannelState.value.currentChatters.includes(a)) {
......@@ -115,17 +111,16 @@ export class AgoraHandle {
chatChannelState.value.currentChatters.push(a)
}
})
chatChannelState.value.channelInitiator = toID;
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
chatChannelState.value.currentState = CallState.callOut
break
}
case "Call" : {
console.log('被别人呼叫的反馈', msgData)
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
handleCommonCall(msgData)
fromID.split(',').forEach(function(a) {
if (!chatChannelState.value.currentChatters.includes(a)) {
......@@ -139,6 +134,10 @@ export class AgoraHandle {
chatChannelState.value.currentChatters.push(id)
}
});
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
if (fromID !== currentId) {
chatChannelState.value.currentState = CallState.callIn
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment