WebsiteBeaver / CordovaCall

Cordova CallKit & ConnectionService plugin for iOS/Android that displays the native call UI for VOIP apps
MIT License
196 stars 91 forks source link

Need endcall before join webrtc video conference #103

Open takyeyu opened 4 years ago

takyeyu commented 4 years ago

I just use this plugin and jitsi meet in my project, when I receive call, a in-call UI will be shown. I am listen to the onAnswer event, and want to join the webrtc vc if the call accept.

Fail, a message is shown, "There's another call is progress..." cordova.plugins.CordovaCall.on('answer', function(){ cordova.plugins.jitsiplugin.join("room_abc"); });

If I call endCall first, I can go to the vc successfully, but there is a endcall beep sound, if there is any way i can do if I want to go to webrtc video conference when user answer call, or if there is any way to disable beep sound when calling endCall, thanks cordova.plugins.CordovaCall.on('answer', function(){ cordova.plugins.CordovaCall.endCall(function(){ cordova.plugins.jitsiplugin.join("room_abc"); }); });

mattkhaw commented 4 years ago

Well, I'm no expert in any of this but from what you've described, I think the jitsi plugin that you are using is using ConnectionService instance to handle the state of the VC call, hence that error is shown, since there can only be one call at one time.

If that's the case, you have to somehow combine these 2 plugins together to make it work. But if the jitsi plugin has that particular instance, I do think that you don't even need this plugin at all. Just go in and modify the plugin to have a receiveCall function and handle everything accordingly.

That's my take on this. Hope it helps.

danielehrhardt commented 4 years ago

Did you found a solution?