I have never tried webrtc before. I have an application made using Firebase. Now I'm trying to add voice call feature in it.
So tried searching for some tutorials, Most are using PubNub or most tutorials are based on web app.
I saw this stackoverflow thread and knew that it's possible to use webrtc using Firebase.
Voice calls over a Chat app using Firebase
After trying some tutorials, I wrote this code,
PeerConnectionFactory.initializeAndroidGlobals(this,false,true,true);
PeerConnectionFactory peerConnectionFactory = new PeerConnectionFactory();
AudioSource audioSource = peerConnectionFactory.createAudioSource(new MediaConstraints());
AudioTrack audioTrack = peerConnectionFactory.createAudioTrack("4444",audioSource);
audioTrack.setEnabled(true);
MediaStream mediaStream = peerConnectionFactory.createLocalMediaStream("4444");
mediaStream.addTrack(audioTrack);
But then I'm confused how to share the stream with other devices using Firebase. Need Help :(