Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
How to detect a frozen video stream in WebRTC

Unfortunately, from time to time when making a one-on-one video call using react-native-webrtc one of the two video streams freezes or becomes black. Is there a way to detect when that happens programmatically? Thx in advance!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It looks like each video track has a listener that fires as soon as the stream freezes.

In react native it's the onmute listener:

stream.getVideoTracks().forEach(videoTrack => {
    videoTrack.onmute = () => {
        console.log("Frozen video stream detected!");
    };
});

Note that in React Native detecting frozen streams with this method only seems to work for remote tracks!

To detect if a stream is currently frozen I use ​the muted property on the video track:

console.log(videoTrack.muted); // true when frozen

Another way I've found but haven't explored further is the getStats() method on the RTCPeerConnection. It returns a promise with a huge amount of data that can be used to detect frozen video streams and a lot more I suppose.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!