4

When i wrote the code 6-7 months back everything was working, with no issues what so ever. But recently when i tested it, In Chrome specifically video freezes after some time. Calling from Android implementation.

Call is working fine in firefox, safari. If both devices are on same broadband, the issue happens about 1-2 minutes later, if anyone on 4G or cellular it happens instantly. My best guess is that chrome skips one frame to encode, and the drops all coming frames.

chrome://webrtc-internals video sending graph

Here is a screenshot of webRTC internals sending video graph, after it dropped, you can clearly see the drop in 'sending bytes' and 'constant line' in encoded frames.

I don't even have any idea about how to debug this, any help is very appreciated. Thanks

Praveen Kumar
  • 125
  • 1
  • 11
  • were you able to figure this out? We are also facing similar issues, and are trying few things including setting the bitrate provided in this link - https://github.com/twilio/twilio-video.js/issues/216, but no luck so far. – Vasan Nov 26 '18 at 15:47
  • no, we couldn't. so we assumed it is a chrome issue and moved forward, right now we are using video call in webView for android. Using webView also trimmed app size since we no-longer need ejabberd libraries on android end. – Praveen Kumar Dec 12 '18 at 03:57
  • Check your turn server, I also got the same issue, which was resolved by changing the turn server. – Zee May 04 '23 at 08:50

2 Answers2

0

How does the peerconnections iceconnectionstate look like? Does it go to disconnected and (after some time) to failed? See https://testrtc.com/webrtc-api-trace/ for an explanation for that part of webrtc-internals.

Philipp Hancke
  • 15,855
  • 2
  • 23
  • 31
  • Hi Phillip, so after reading your link, i added somequick handlers to print the changed states on every state change. `pc.onsignalingstatechange = function() { console.log("New Signalign State: ", pc.signalingState); }; pc.onicegatheringstatechange = function() { console.log("New IceGathering State: ", pc.iceGatheringState); }; pc.oniceconnectionstatechange = function() { console.log("New IceCandidate State: ", pc.iceConnectionState); };` – Praveen Kumar Apr 20 '18 at 05:50
  • And this is the output: `11:14:50.041 (index):734 New Signalign State: have-remote-offer 11:14:50.041 (index):734 New Signalign State: stable 11:14:50.049 (index):744 New IceCandidate State: checking 11:14:50.060 (index):738 New IceGathering State: gathering 11:14:50.167 (index):738 New IceGathering State: complete 11:14:51.223 (index):744 New IceCandidate State: connected` once video started, it is the states, you can see the final states, afte 40 seconds video freezed, and i didn't saw any more logs. – Praveen Kumar Apr 20 '18 at 05:50
  • Final states were: stable (signaling), complete (ice-gathering) and connected (ice Candidate) – Praveen Kumar Apr 20 '18 at 05:52
0

I faced the same issue and as far as I know, this is a bug in Google Chrome version 56 and above. You can try downloading Google Chrome version below 56 it will work on the downgraded version. There are numerous bug reports filed with this bug and the interesting part is it is reproducible on Android's Google Chrome Application with version 61 and above.

Check out the following bug reports.

video Freezes on Google Chrome

Android Chrome 61, video freezes after connecting

Chrome 61 on Android 6.01 or 7.0 Received Video Freezes

Video freezing issues

Somesh Kumar
  • 8,088
  • 4
  • 33
  • 49