A
A
AlexanderY2017-02-14 07:31:56
JavaScript
AlexanderY, 2017-02-14 07:31:56

Is it possible to determine if a WebRTC stream is currently playing correctly?

Good afternoon.
Any person can easily determine that the stream is being played - just hear the sound and / or see the video. Is there a way to find out on the browser side, programmatically, that playback is in progress?
The context of the problem is this. There are several participants in the WebRTC room. Some streams are sometimes not played by some people, although according to all the formal signs, the stream is running (the events "new stream", "stream started playing", the MediaStream contains audioTracks and videoTracks are triggered). But there is no visual stream until the user refreshes the page.
I would like to programmatically catch and log such jambs. And also somehow inform the user that there are problems with playback, or even try to solve these problems automatically. If at all possible.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
strcpy, 2017-04-19
@strcpy

Firstly, it has some attribute that describes that it is being played, look at f12 in the debugger.
Plus, you can try to take a picture of the video and make sure that, say, not all pixels are black.

H
hbruser, 2017-05-05
@hbruser

Here are examples of how to collect WebRTC statistics in Chrome and Firefox.
If you take several measurements of statistics, you can determine whether video traffic is coming, what bitrate, whether there are losses, etc. But even if the traffic arrives and is normally decoded, the user may see a black screen. This needs to be recognized separately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question