components-js
components-js copied to clipboard
`roomOptions` changes are not applied to room
Select which package(s) are affected
@livekit/components-react
Describe the bug
In a running meet, if we want to make changes in the room options at the moment (such as changing the codec or changing the audio and video bitrate by using remote configs), those changes will not be applied. I searched through previous PRs and found that the following change in the useEffect dependencies in the useLiveKitRoom
hook caused this to happen:
The PR link
Describe the proposed solution
I think reverting this change can fix the problem.
Reproduction
Consider this code:
const meetOptions = useMeetOptions(); //* Getting options from server
const { room } = useLiveKitRoom({ ...someRoomOptions, options: meetOptions })
If meetOptions
changes due to a server update (or other methods of changing the options), the room will not change.
Logs
No response
System Info
Not needed
Severity
blocking an upgrade
Additional Information
No response