flutter-webrtc / flutter-webrtc-demo

Demo for flutter-webrtc
MIT License
1.15k stars 417 forks source link

Issues when call started from Androind device to Web service #166

Closed ghost closed 2 years ago

ghost commented 2 years ago

I'm facing issues establishing a video call between an Android device and the web service. The Android device and the web browser are both showing their local video correctly, but the remote video is not shown. This issue is faced only when the call is initiated from the Android device. The other way around, starting the call from the Web service works fine. Checked issue 118 but it didn't help me. Also tried with working TURN servers. Any help would be appreciated! Thanks!

cloudwebrtc commented 2 years ago

You have tried to rotate the phone screen after it is connected? This may be another rendering issue.

ghost commented 2 years ago

Let me check

ghost commented 2 years ago

Not working. Only a black screen showing.

cloudwebrtc commented 2 years ago

Please check the console log to see if there is an RTCIceConnectionStateConnected message. maybe it’s an ice candidate timing issue, I’m not sure

rob_ @.***> 于2021年11月5日周五 下午11:08写道:

Not working. Only a black screen showing.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/flutter-webrtc/flutter-webrtc-demo/issues/166#issuecomment-961974581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEHJQ4U5WXEB3NUHHJYNP4TUKPXNPANCNFSM5HOANXIA .

ghost commented 2 years ago

No I don't get this message RTCIceConnectionStateConnected, neither on Android and web console.

cloudwebrtc commented 2 years ago

It seems that the network layer is not connected, you should check the ice connectivity

ghost commented 2 years ago

Do you mean the TURN server? I don't get the RTCIceConnectionStateConnected message even when starting the call from the browser but the video streams in this case are shown correctly.

cloudwebrtc commented 2 years ago

You can add a log print here to know if ice is connected https://github.com/flutter-webrtc/flutter-webrtc-demo/blob/master/lib/src/call_sample/signaling.dart#L410

ghost commented 2 years ago

I get this log when the call is started from the web browser:

I/flutter (23697): ****************
I/flutter (23697): RTCIceConnectionState.RTCIceConnectionStateConnected
I/flutter (23697): ****************

But when starting the call from an Android device towards the web browser, RTCIceConnectionState is stuck here:

I/flutter (23697): ****************
I/flutter (23697): RTCIceConnectionState.RTCIceConnectionStateChecking
I/flutter (23697): ****************
ghost commented 2 years ago

And after some seconds I got this:

I/flutter (23697): ****************
I/flutter (23697): RTCIceConnectionState.RTCIceConnectionStateFailed
I/flutter (23697): ****************
ghost commented 2 years ago

@cloudwebrtc Do you think I have an issue with the TURN server?

ghost commented 2 years ago

Sorry for wasting your time guys. Everything is working fine. My TURN server was having issues. Thanks for the support!

Notebrains commented 2 years ago

Do I have to create my own turn server to solve this issue?