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

In the examples, add a helper function to generate a random user identity #691

Merged
merged 5 commits into from
Nov 6, 2023

Conversation

Ocupe
Copy link
Contributor

@Ocupe Ocupe commented Nov 6, 2023

This PR is intended to improve the user experience when using the examples. It is the direct result of a user request that encountered this problem.

When running the examples and then navigating directly to localhost:3000/minimal with two tabs, you end up with two identical users kicking each other out of the room.
To prevent this from ever happening again, we now generate a random user id if no user id is set with the user query parameter.

Copy link

changeset-bot bot commented Nov 6, 2023

🦋 Changeset detected

Latest commit: c68155e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@livekit/component-example-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Ocupe Ocupe changed the title Add helper function to generate random user identity In the examples, add a helper function to generate a random user identity Nov 6, 2023
@Ocupe Ocupe requested a review from lukasIO November 6, 2023 15:28
Copy link
Contributor

github-actions bot commented Nov 6, 2023

size-limit report 📦

Path Size
LiveKitRoom only 1.87 KB (0%)
LiveKitRoom with VideoConference 30.58 KB (0%)
All exports 35.81 KB (0%)

@lukasIO
Copy link
Contributor

lukasIO commented Nov 6, 2023

nice, while we're at it, can we change it in a way that clicking the link in the overview menu also uses this function? so that opening the link multiple times generates a new user identity each time?

Copy link
Contributor

@lukasIO lukasIO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only the comment above as a potential improvement

@Ocupe
Copy link
Contributor Author

Ocupe commented Nov 6, 2023

nice, while we're at it, can we change it in a way that clicking the link in the overview menu also uses this function? so that opening the link multiple times generates a new user identity each time?

I have removed the Faker dependency and only use the new random user ID function.

@lukasIO
Copy link
Contributor

lukasIO commented Nov 6, 2023

huh, that's even better :)

@Ocupe Ocupe merged commit 99b6fda into main Nov 6, 2023
2 checks passed
@Ocupe Ocupe deleted the generate-random-user-id-by-default branch November 6, 2023 16:26
@github-actions github-actions bot mentioned this pull request Nov 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants