Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new onRoomUnmpount property #1059

Open
jemokbass opened this issue Dec 24, 2024 · 2 comments
Open

Add new onRoomUnmpount property #1059

jemokbass opened this issue Dec 24, 2024 · 2 comments

Comments

@jemokbass
Copy link

Describe the problem

My team releases connections for two rooms in our app because we release subrooms in the main room.
We need additional props for onmount LiveKitRoom instead of disconnecting from the room.

Describe the proposed solution

Add onUnmountRoom props in LiveKitRoom.tsx and conditional function in useLiveKitRoom.ts
Example:

      if (onUnmountRoom) {
        onUnmountRoom()
      } else {
        log.info('disconnecting on onmount');
        room.disconnect();
      }

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

@lukasIO
Copy link
Contributor

lukasIO commented Jan 6, 2025

couldn't you simply hide the second instance instead of unmounting it?

@jemokbass
Copy link
Author

What do you mean? I use the room as a single room in LiveKitRoom component, but when the ref on the room changes, the room is unmounted. I want to handle this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants