webrtcangular8video-conferencing

apirtc - Leave or Stop a conversation


In my angular 7 application I have an option to have conference video call. I have used apirtc to create conference call.

I have used a button named 'Join Conference' using which any user can join the conference on clicking it. The joined users streaming is working, now I want to leave the conference using another button 'Leave Conference' or end the conference for all users using the button 'End Conference'. Could any one help on ending a conference.

Tried to end the conversation using below codes

// Method: 1
this.connectedConversation.destroy();
// Method: 2
this.connectedSession.hangUp();
// Method: 3
this.connectedConversation.hangUp();
// Method: 4
this.connectedConversation.stop();

but none of the above method works.

When I tried to remove the stream div using ID the div that contains the stream is removed but the camera is still running (displays light in laptop camera). How to stop streaming.

Please help on how to leave a conference and on how to end the conference.

I don't have option to accept call or hangup call using apiwebrtcclient class. I have used 'joinconference()' function for this.


Solution

  • You can check the tutorial : https://dev.apirtc.com/tutorials/conferencing/conf_join-leave

    It demonstrate how to join and then leave a conference on apiRTC