You didn’t answer to this: Spatial layers has lower resolution - #2 by ibc
I repeat: call consumer.setPreferredLayers({ spatial: 0 })
and check received video resolution. Yes, I say 0
, so the lowest one.
Then, rewrite your code with just 2 encodings instead of 3 and ese how it behaves.
PS: There are many factors that make Chrome generate less spatial layers (simulcast streams) than requested: resolution of video input, resolution of captured video, network conditions, system/CPU status, etc.