Change between simulcast streams

I’m don’t have experience with webrtc . I need to create a options depending on subscription to switch between resolution and frame rate. I did a lot of research but mostly the solutions is to abstract for me . I found here that is possible to make multiple simulcast streams (Mediasoup v2: what are the settings for "hi", "med" and "low" profile?) but i don’t get it how to change and where to change, the needed stream. Is it possible to get a sample?
Thank you for your help!

I highly recommend to spend some time digging into mediasoup demo. Just check it out, build and run locally, then play with it.

It is hard to understand all this stuff without it.

The part you are looking for is somewhere here: mediasoup-demo/RoomClient.js at v3 · versatica/mediasoup-demo · GitHub

There are several ways you can send video: no simulcast, simulcast and svc.
This is all webrtc stuff, not mediasoup, but on mediasoup side you control it by specifying parameters to transport,produce.

Once you start sending video you can only change things like priority and preferrred layers for simulcast, i.e. you can prioritize one streams over the others and you can say that this particular simulcast layer is preferred one.

If you want to change codecs or encodings after you started sending it then you need to create another producer and stop using the old one.

Just to reiterate there is no shortcut if you are a beginner (like I was half a year ago), need to get your hands dirty.