Android webrtc not working with 3g, 4g
Asked Answered
B

1

12

In android application i have user webrtc for video calling app.

If mobile is connected with wifi then app work perfectly.

When i change wifi to mobile data and start app then app not work and also not display video .

I have user webrtc in my app and server side kurento.

Below list of scenario with status :

  1. Browser Client + Mobile Client -> Both on same Wifi network(KMS Server on same wifi network) -> Working fine.
  2. Mobile Client + Mobile Client -> Both on same Wifi network(KMS Server on same wifi network) -> Working fine.
  3. Browser Client + Mobile Client -> One of them on wifi(KMS Server on same wifi network) and other on mobile data network -> Not working
  4. Mobile Client + Mobile Client -> One of them on wifi (KMS Server on same wifi network) and other on mobile data network -> Not working

We have check candidate generated for all this scenario and found they are same only difference seen is multiple candidate getting generated.

We have crate Turn server as well as Stun but video not display in android client with 3g connection.

Any one have solution then help me out.

Thanks in advance.

Barrelhouse answered 14/10, 2016 at 11:23 Comment(2)
Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.Toplevel
Can you find solution for your problem?Scyros
I
4

Theoretically the network type shouldn't influence if WebRTC works or not.

But, there are other factors influencing this. First of all if both devices are connected into the same Wi-fi network, then you don't need a TURN server. If connected through mobile data, this could not be the case, so you should have a STUN/TURN server configured. To test the server you can use https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/.

Secondly, the network quality could influence the connection. You should do a network speed test and remember that latency and jitter is even more important than download/upload speed. You could disable video and test only with audio which eats fewer bandwidth.

Importune answered 14/10, 2016 at 12:15 Comment(8)
I already set stun server. PeerConnection.IceServer("stun:74.125.200.127:19302")); In android application client socket communication working but only video not display in 3g/4g connection.Barrelhouse
By socket communication you mean that you have audio? If yes, then most probably the network bandwidth/latency is the problem. Have you done a speed test before/during/after?Importune
we have check with different wifi network but not working, it's only work with same wifi network we host server.Barrelhouse
Hi Adrian Ber, Below list of scenario with status : Browser Client + Mobile Client -> Both on same Wifi network(KMS Server on same wifi network) -> Working fine. Mobile Client + Mobile Client -> Both on same Wifi network(KMS Server on same wifi network) -> Working fine. Browser Client + Mobile Client -> One of them on wifi(KMS Server on same wifi network) and other on mobile data network -> Not working Mobile Client + Mobile Client -> One of them on wifi (KMS Server on same wifi network) and other on mobile data network -> Not workingBarrelhouse
Then you'll need to configure a TURN server. I updated my answer on how can you test if you configured correctly a TURN server.Importune
is it mandatory to use wss/https in webRTC turn server for video calling ?Barrelhouse
Because android client in ws with turn server not display video and audio in 3g.Barrelhouse
We have crate Turn server as well as Stun but video not display in android client with 3g connection. We have check candidate generated for all this scenario and found they are same only difference seen is multiple candidate getting generated. Thanks for your support and help. RegardsBarrelhouse

© 2022 - 2024 — McMap. All rights reserved.