Skip to content

roomOptions changes are not applied to room #730

@mpnri

Description

@mpnri

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

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions