DEV Community

Cover image for How to Build a WebRTC React Native App Free

How to Build a WebRTC React Native App Free

Ahmed Bhesaniya on January 23, 2023

In this tutorial, we will learn the fundamentals of WebRTC to build a React Native video calling application that can be implemented on iOS & A...
Collapse
 
jadhav_6409 profile image
Vaibhav Jadhav

Hi
i create this app an run device will be connected each other but *remoteStream * is getting null thats why other users video will be not showing πŸ˜ΆπŸ˜•

Collapse
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

Do u have any solution ?

Collapse
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

I get same output i only see my screen
Image description

Thread Thread
 
vishnu_maurya_de3c66a24a6 profile image
vishnu maurya

make sure you are passing the correct callerID to the backend and check once and will work fine.
I have setup all the things and working fine.

Thread Thread
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

Did you change anything on the Client application? or u just change on the server side?

Thread Thread
 
vishnu_maurya_de3c66a24a6 profile image
vishnu maurya

changes in client side may be your ref is not containing the callerID. and check are you getting the callerId on backend side?

Thread Thread
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

Image description

This is the logs of my back end server. And still i only see camera

Image description

Thread Thread
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

Image description

also this is the log of my client side app when the callee answered the call

Thread Thread
 
vishnu_maurya_de3c66a24a6 profile image
vishnu maurya

Hey, After accepting the call from caller you have to check whether you are getting the callerID in "ICEcandidate"
something like this
{
** calleeId: '928449',**
rtcMessage: {
label: 0,
id: '0',
candidate: 'candidate:2628580718 1 udp 1685987071 145.58.15.120 39111 typ srflx raddr rport 39111 generation 0 ufrag 1tIz network-id 4 network-cost 10'
}
}
on backend if yes then check are you getting the remoteStream or remoteStream?.toURL() on client side.

Thread Thread
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

this is the log of my back end
Image description

and this is the log of my client app. But i cant still stream

Image description

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

Do u have any social accounts sir? cause i cant direct message u in linked in. It need to subscribe

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

I already followed you sir.

Thread Thread
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

my name is its_m26 (Marlon Tingson Lee)

Collapse
 
vishnu_maurya_de3c66a24a6 profile image
vishnu maurya

make sure you are passing the correct callerID to the backend and check once and will work fine.
I have setup all the things and working fine.

Collapse
 
testbhai profile image
Test

Same problem, I also face it.

Collapse
 
corasphinx profile image
corasphinx

Hi.
I have same issue. remoteStream is null. In addition, I can't hear sound.
Did you solve this problem?

Collapse
 
vishnu_maurya_de3c66a24a6 profile image
vishnu maurya

make sure you are passing the correct callerID to the backend and check once and will work fine.
I have setup all the things and working fine.

Collapse
 
victor_mongi_030f8f6cfe5b profile image
Victor Mongi

Hello thank you for sharing, I follow this tutorial works on iphone but when try to android,
call iphone there is no sound, the camera/video is running well except the audio (ios->android),
but when use ios->ios it works. is there any settings in android side? anw, all permission are granted.
Thank you

Collapse
 
vishnu_maurya_de3c66a24a6 profile image
vishnu maurya

this is the same problem i am facing but some time i am getting both audio but most of the time only one audio but video is fine.
If you get anything related to this please let me know.

Collapse
 
usamawizard profile image
USAMA

I have also being using a media server called Ant Media which provide me an easy way of building a SFU and MCU type conference they also have very easy to integrate SDKs for Flutter ,IOS, Android ,React Native as well.

Collapse
 
justlyjustice profile image
Justice Johnson

Hi.
I tried mine but after answering the call the device from whence I initiated the call does not join the WebRTCRoom.

Image description

Collapse
 
blitsdoe_b101b26c48bee3b5 profile image
blitsdoe

Image description

i only see my screen can somebody help

Collapse
 
testbhai profile image
Test

This is showing only user side screen, not the remote stream, and also the remote stream is come null, brother Can you please help me out of this situation?

Collapse
 
corasphinx profile image
corasphinx

I have clone and run but remoteStream is null.
It's just only BLACK screen.

Collapse
 
kadirprog profile image
Kadir-prog

hi kindly please share git repo with us

Collapse
 
wxrhead profile image
Maheep Singh

Hi , can you please provide the repository ? It will be very very helpful.