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

detecting the order of users added into the room #35

Open
mudcube opened this issue Apr 3, 2013 · 3 comments
Open

detecting the order of users added into the room #35

mudcube opened this issue Apr 3, 2013 · 3 comments

Comments

@mudcube
Copy link
Contributor

mudcube commented Apr 3, 2013

I made some tweaks to my local copy that allow dev's to retrieve the index of a user added to the room. My project requires only the first users camera to be used, but this could be used for other purposes as well, I would imagine.

Basically, you end up with (on the client side):

rtc.users[socket.id] = userIndex;

This requires some small updates to the server branch, sending "roomList" and "you" from within new_peer_connected and get_peers.

Would this be something you'd like to include?

@mudcube
Copy link
Contributor Author

mudcube commented Apr 3, 2013

Also, is this the best place to discuss these things? I haven't done much collaborative work on Github yet.

@sarenji
Copy link
Member

sarenji commented Apr 3, 2013

This sounds great. I'd prefer that userIndex be a hash, e.g.

rtc.users[socket.id] = { index: userIndex};

So we can add other things later as needed.

And yes, this was the right place to discuss :)

@mudcube
Copy link
Contributor Author

mudcube commented Apr 6, 2013

Ok, that sounds great.

In the same vain, what do you think about changing rtc._me to:

rtc._me = { index: n, id: userId }?

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