STPref change to 0 0

We have a implementation of mediasoup.
When the video window size gets smaller, or on mobile devices, I want to set Spatial and Temporal layers to be 0 0
However, when I set it using following code, in the video stats, it still is 1 2
await consumer.setPreferredLayers({ spatialLayer: 0, temporalLayer:0 });

What am I missing here? Do I need to pause video stream before setting preferred layers ?

I am new to mediasoup and if my question is very basic, please forgive me.

Thanks and Regards,

I don’t know which video stats you mean, but if you mean Consumer stats in server side you must look at the array entry with type “outbound-rtp”.

I think I am looking at correct place.
This is implementation of Multiparty-meet ( edumeet ) which in advanced mode, has consumer stats overlayed to each peer video.

Also, the video quality does not go down / stay down after

await consumer.setPreferredLayers({ spatialLayer: 0, temporalLayer:0 });

You are not answering my question, sorry. And I don’t know how that application is implemented. The API to set preferred layers does work.

Sorry for not being clear - I will dig more and reply more tomorrow. Hopefully will get this working before that.