{"action":"closed","issue":{"url":"https://api.github.com/repos/muaz-khan/RTCMultiConnection/issues/345","repository_url":"https://api.github.com/repos/muaz-khan/RTCMultiConnection","labels_url":"https://api.github.com/repos/muaz-khan/RTCMultiConnection/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/muaz-khan/RTCMultiConnection/issues/345/comments","events_url":"https://api.github.com/repos/muaz-khan/RTCMultiConnection/issues/345/events","html_url":"https://github.com/muaz-khan/RTCMultiConnection/issues/345","id":212144713,"number":345,"title":"room-id is getting instead of  userid  -  connection.onstream = function (event) ","user":{"login":"manurajmr1","id":10207080,"avatar_url":"https://avatars1.githubusercontent.com/u/10207080?v=3","gravatar_id":"","url":"https://api.github.com/users/manurajmr1","html_url":"https://github.com/manurajmr1","followers_url":"https://api.github.com/users/manurajmr1/followers","following_url":"https://api.github.com/users/manurajmr1/following{/other_user}","gists_url":"https://api.github.com/users/manurajmr1/gists{/gist_id}","starred_url":"https://api.github.com/users/manurajmr1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manurajmr1/subscriptions","organizations_url":"https://api.github.com/users/manurajmr1/orgs","repos_url":"https://api.github.com/users/manurajmr1/repos","events_url":"https://api.github.com/users/manurajmr1/events{/privacy}","received_events_url":"https://api.github.com/users/manurajmr1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-06T14:50:58Z","updated_at":"2017-03-06T18:09:40Z","closed_at":"2017-03-06T18:09:40Z","body":"var connection = new RTCMultiConnection();\r\n\r\nconnection.socketURL = 'https://localhost:9001/';\r\n\r\n    // all below lines are optional; however recommended.\r\n\r\n        connection.session = {\r\n            audio: 'many-to-many',\r\n            video: 'many-to-many'\r\n        };\r\n\r\n        connection.userid = '1234';\r\n\r\n        connection.sdpConstraints.mandatory = {\r\n            OfferToReceiveAudio: true,\r\n            OfferToReceiveVideo: true\r\n        };\r\n\r\n        connection.extra = {\r\n            name: 'custom name',\r\n            joinedAt: (new Date).toISOString()\r\n        };\r\n        \r\n        \r\n        connection.onstream = function (event) {\r\n            **console.log(event);**\r\n            document.getElementById('container').appendChild(event.mediaElement);\r\n            connection.onUserStatusChanged = function (status) {\r\n\r\n                **console.log(status);**\r\n                if (status.status === 'online') {\r\n\r\n\r\n                    if (!document.getElementById(status.userid))\r\n                    {\r\n                        document.getElementById(\"statusDiv\").insertAdjacentHTML('beforeend', '<div id=\"' + status.userid + '\" style=\"width:100%;padding:2px;\">' + event.extra.name + '</div>');\r\n                    }\r\n\r\n                } else {\r\n                    document.getElementById(status.userid).remove();\r\n                }\r\n            };\r\n        };\r\n\r\n\r\nvar predefinedRoomId = prompt('Please enter room-id', 'xyzxyzxyz');\r\n\r\n    //connection.openOrJoin(predefinedRoomId);\r\n\r\n        document.getElementById('btn-open-room').onclick = function () {\r\n            this.disabled = true;\r\n            connection.open(predefinedRoomId);\r\n        };\r\n\r\n        document.getElementById('btn-join-room').onclick = function () {\r\n            this.disabled = true;\r\n            connection.join(predefinedRoomId);\r\n        };\r\n\r\n\r\n\r\n\r\nIn the above code when i console console.log(event); i get room id as the user-id  but when i put console.log(status); i get the random generated user-id. Is there a way to create a custom userid or why is it showing room-id instead of user-id  in console.log(event); What i need is to create a list of users who joins into a room and leave. And also after adding more than two users in a session am getting undefined list of users in the list. Please help"}}
{"actor":{"display_login":"muaz-khan"}}