File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -383,12 +383,14 @@ export class TPCUtils {
383383 // requested resolution. This can happen when camera is captured at high resolutions like 4k
384384 // but the requested resolution is 180. Since getParameters doesn't give us information about
385385 // the resolutions of the simulcast encodings, we have to rely on our initial config for the
386- // simulcast streams.
387- || videoStreamEncodings [ idx ] ?. scaleResolutionDownBy === SIM_LAYERS [ 0 ] . scaleFactor ;
386+ // simulcast streams. We check for the lowest quality scale factor (4.0) regardless of array
387+ // position since the encoding order may be reversed for Firefox or low-res Chromium VP8.
388+ || videoStreamEncodings [ idx ] ?. scaleResolutionDownBy === 4.0 ;
388389 } else {
389390 // For screenshare, keep the HD layer enabled always and the lower layers only for high fps
390- // screensharing.
391- activeState = videoStreamEncodings [ idx ] . scaleResolutionDownBy === SIM_LAYERS [ 2 ] . scaleFactor
391+ // screensharing. We check for the highest quality scale factor (1.0) regardless of array position
392+ // since the encoding order may be reversed for Firefox.
393+ activeState = videoStreamEncodings [ idx ] . scaleResolutionDownBy === 1.0
392394 || ! this . _isScreenshareBitrateCapped ( localVideoTrack ) ;
393395 }
394396 }
You can’t perform that action at this time.
0 commit comments