peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

Remote audio takes 10 to 15 seconds to arrive

Open SujithManjavana opened this issue 2 years ago • 5 comments

Remote audio takes 10 to 15 seconds to arrive after call.on('stream', function(stream) is triggered. I tried to call without custom iceServers, tried on wifi and mobile data but the results are the same. There is also a lag in the audio/video, sometimes it is more than acceptable (more than 5 Seconds). When both devices are on the same wifi, the lag is less than 1 second. Is it because of the TURN server delay? How can I minimize it?

Platform: Android 11 WebView.

SujithManjavana avatar Jul 17 '22 07:07 SujithManjavana

Hi, There Is A Jitter Between Every Device And The Ice Server, If You Use Devices That Connected To Same WIFI Network, The Both Devices Near To Each Other, So There Is No Jitter Between The Devices And The Ice Server, If You Use Your Own Peerjs Server You Can Increase Your Hardware On Your Server Such As CPU, Ram It Will Decrease Jitter

Thankyou R (2) u

devthisath avatar Aug 06 '22 03:08 devthisath

Did you mean, to use my own TURN server?

SujithManjavana avatar Aug 06 '22 05:08 SujithManjavana

Yes, If You Want To Deploy Your Peerjs Application As A Production You Should Use Your Own Peerjs Server. It's Faster Than The Peerjs Cloud Because Many Developers Use Peerjs Cloud, So The Connection Between The Server And Your Application Is Very Slow. If You Want A Peerjs Server With High Resource Let Me Know.

devthisath avatar Aug 06 '22 05:08 devthisath

I don’t think the TURN server alone is causing the delay. How’s the video/audio quality? Bad when delayed or still good? Can you give a traceroute/ping to eu-0.turn.peerjs.com from your local network? Does the same delay happen when simulated on a desktop machine?

We use Coturn for the cloud TURN server. It’s reasonably simple to set up, so maybe just give it a try to see if it works.

jonasgloning avatar Aug 08 '22 12:08 jonasgloning

Yes, We can try that one.

But also note that , the turn server and the stun server cause jitter between the client and the server. If we improve the server hardware, the jitter will decrease. Do you agree with me?

Thank you.

On Mon, 8 Aug 2022, 17:49 Jonas Gloning, @.***> wrote:

I don’t think the TURN server alone is causing the delay. How’s the video/audio quality? Bad when delayed or still good? Can you give a traceroute/ping to eu-0.turn.peerjs.com from your local network? Does the same delay happen when simulated on a desktop machine?

We use Coturn https://github.com/coturn/coturn for the cloud TURN server. It’s reasonably simple to set up, so maybe just give it a try to see if it works.

— Reply to this email directly, view it on GitHub https://github.com/peers/peerjs/issues/983#issuecomment-1208054026, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATSMARDBTAOHG2XAUZRIF2DVYD3MFANCNFSM53ZJVXAA . You are receiving this because you commented.Message ID: @.***>

devthisath avatar Aug 08 '22 13:08 devthisath