-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
added roomName in createdPeer event #405
base: master
Are you sure you want to change the base?
Conversation
that looks useful. Can you revert the changes to package.json and the bundle (we do that after merging) and squash your commits into a single one please? |
done |
@csturiale it doesn't look like you updated. Maybe you forgot to push? |
sorry I think it is ok now |
looked at it again. Adding it in just one of the three events would be very inconsistent. And I don't understand the use-case. One of the underlying assumptions is that you're not in more than a single room. |
Has this been merged to master? To me, the roomName is always "simplewebrtc". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal was so that 'createdPeer' event emits the roomName in addition to the peer info. However the emit on line 350 doesn't include the roomName.
@@ -346,7 +348,7 @@ SimpleWebRTC.prototype.joinRoom = function (name, cb) { | |||
} | |||
}); | |||
self.emit('createdPeer', peer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.emit('createdPeer', peer, roomName);
In this issue (https://github.com/andyet/SimpleWebRTC/issues/692) I reported that |
createdPeer is an event called for each joined room then I suppose that is better to have roomName as parameter in the callback to manage presence or autosend message in the room channel better.