added roomName in createdPeer event#405
added roomName in createdPeer event#405csturiale wants to merge 16 commits intosimplewebrtc:masterfrom
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". |
Zythyr
left a comment
There was a problem hiding this comment.
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.
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.