ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

How can i implement audio calling functionality with library #160

Closed DevPurveshThakkar closed 3 years ago

DevPurveshThakkar commented 3 years ago

I have implemented the connectycube video calling functionality but i also want to implement audio calling functionality and i found one thing in code when video call gone connected at that time i am able to mute video but i want audio calling when i start calling to another user. Also I didn't found any specific code for audio chat stream. Can you help on this part.

DaveLomber commented 3 years ago

If you need an audio only call , you can remove video: true here

https://developers.connectycube.com/js/videocalling?id=access-local-media-stream

If you want to be able to enable video during a call, then use video: true here as well, and once a stream is obtained, you can disable video track:

stream.getVideoTracks()[0].enabled = false

and then unmute later while on a call