Commit 2e4967ef by qlintonger xeno

多人通话中完成

parent 938f107d
...@@ -100,10 +100,6 @@ export class AgoraHandle { ...@@ -100,10 +100,6 @@ export class AgoraHandle {
} }
case "CmdCall": { case "CmdCall": {
console.log('主动呼叫他人的反馈', msgData); console.log('主动呼叫他人的反馈', msgData);
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
handleCommonCall(msgData, toID, fromID) handleCommonCall(msgData, toID, fromID)
toID.split(',').forEach(function(a) { toID.split(',').forEach(function(a) {
if (!chatChannelState.value.currentChatters.includes(a)) { if (!chatChannelState.value.currentChatters.includes(a)) {
...@@ -115,17 +111,16 @@ export class AgoraHandle { ...@@ -115,17 +111,16 @@ export class AgoraHandle {
chatChannelState.value.currentChatters.push(a) chatChannelState.value.currentChatters.push(a)
} }
}) })
chatChannelState.value.channelInitiator = toID; chatChannelState.value.channelInitiator = toID;
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
chatChannelState.value.currentState = CallState.callOut chatChannelState.value.currentState = CallState.callOut
break break
} }
case "Call" : { case "Call" : {
console.log('被别人呼叫的反馈', msgData) console.log('被别人呼叫的反馈', msgData)
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
handleCommonCall(msgData) handleCommonCall(msgData)
fromID.split(',').forEach(function(a) { fromID.split(',').forEach(function(a) {
if (!chatChannelState.value.currentChatters.includes(a)) { if (!chatChannelState.value.currentChatters.includes(a)) {
...@@ -139,6 +134,10 @@ export class AgoraHandle { ...@@ -139,6 +134,10 @@ export class AgoraHandle {
chatChannelState.value.currentChatters.push(id) chatChannelState.value.currentChatters.push(id)
} }
}); });
if (chatChannelState.value.currentState === CallState.calling) {
console.log('正在通话中,无须改变状态')
break;
}
if (fromID !== currentId) { if (fromID !== currentId) {
chatChannelState.value.currentState = CallState.callIn chatChannelState.value.currentState = CallState.callIn
} else { } 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