spreed icon indicating copy to clipboard operation
spreed copied to clipboard

Use a lower simulcast quality for slow clients

Open danxuliu opened this issue 4 years ago • 0 comments

Extracted from #5535

The stats reported by the received peer connections are updated at irregular intervals, so it is difficult to calculate things like number of packets per second or the ratio of lost packets, and thus the connection analyzers do not work for received streams. However, it might be possible to use an approach similar to the one from #5885 to handle that.

Once the analyzers work for the received streams it could be possible to react to connection issues by lowering the simulcast quality used.

An alternative approach (and maybe a better one) could be to rely on the automatic resolution adjustment of the browser/codec. If the video quality is too high for the current connection the video will be automatically adjusted and its resolution will be lowered (while keeping the same simulcast stream). Therefore it could be possible to periodically check the resolution of the received video and, if it is below certain threshold, select a lower simulcast quality than the current one.

As far as I know Firefox does not provide the resolution in the settings of a received track, so checking the resolution of the received video would need to be done directly in the videoWidth and videoHeight properties of the video element.

danxuliu avatar Jul 02 '21 09:07 danxuliu