This message was deleted.
# announcements
s
This message was deleted.
p
hi, currently setting video simulcastlayers is only supported within
RoomOptions
Copy code
const roomOpts: RoomOptions = {
      publishDefaults: {
        simulcast,
        videoSimulcastLayers: [
          VideoPresets.h90,
          VideoPresets.h216,
        ],
      },
All local (camera) tracks will then be published with those simulcast layers. If this isn’t sufficient for your usecase, could you elaborate a bit on what your usecase looks like?
i
O thanks. I did see the example, but I am using the livekit-react to connect to the room. Eg:
Copy code
const {connect} = useRoom();

...

await connect(url, token, {...roomOpts})
But I don't think we can change pass the videoSimulcastLayers in the ConnectOptions so incase of using the connect from livekit-react how can we use the simulcast?
p
ah, got it. in this case `const {connect} = useRoom(roomOpts)`` should work
i
With this, I can see 2 video streams in the chrome://web-internals but the stats are incorrect, the streams are not respecting the set constraints of width, height, fps, and bandwidth... I am publishing with
const track = createLocalVideoTrack({deviceId: id})
room.localParticipant.publishTrack(track)
When creating the track I don't need to specify any resolution right, for the simulcast?(I did use the useRoom(roomOpts) and called const room = await connect())
Note: I am using livekit-react v0.7.1 and I see these are the RoomOptions where the publishDefaults and many other params are missing.
p
my bad, these are currently two different kinds of RoomOptions. Looks like this warrants a fix within livekit-react. I opened an issue for it https://github.com/livekit/livekit-react/issues/37 thanks for tracking this down!
1
🙌 1