{"action":"created","comment":{"url":"https://api.github.com/repos/twilio/twilio-video.js/pulls/comments/192681235","pull_request_review_id":125500253,"id":192681235,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjY4MTIzNQ==","diff_hunk":"@@ -0,0 +1,61 @@\n+'use strict';\n+\n+const { EventEmitter } = require('events');\n+\n+/**\n+ * @property {?Track.SID} loudestParticipantSid\n+ * @emits ActiveSpeakerSignaling#updated\n+ */\n+class ActiveSpeakerSignaling extends EventEmitter {","path":"lib/signaling/v2/activespeakersignaling.js","position":9,"original_position":9,"commit_id":"863587873d97f419a340447f3cb807f5230462eb","original_commit_id":"863587873d97f419a340447f3cb807f5230462eb","user":{"login":"markandrus","id":359154,"node_id":"MDQ6VXNlcjM1OTE1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/359154?v=4","gravatar_id":"","url":"https://api.github.com/users/markandrus","html_url":"https://github.com/markandrus","followers_url":"https://api.github.com/users/markandrus/followers","following_url":"https://api.github.com/users/markandrus/following{/other_user}","gists_url":"https://api.github.com/users/markandrus/gists{/gist_id}","starred_url":"https://api.github.com/users/markandrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markandrus/subscriptions","organizations_url":"https://api.github.com/users/markandrus/orgs","repos_url":"https://api.github.com/users/markandrus/repos","events_url":"https://api.github.com/users/markandrus/events{/privacy}","received_events_url":"https://api.github.com/users/markandrus/received_events","type":"User","site_admin":false},"body":"The more I write classes like these—EventEmitters with a single event, e.g. \"updated\"—the more I'm feeling like we should go ahead and adopt Observable. The [zen-observable](https://github.com/zenparsing/zen-observable) is lightweight and pretty solid.","created_at":"2018-06-04T09:39:21Z","updated_at":"2018-06-04T09:39:21Z","html_url":"https://github.com/twilio/twilio-video.js/pull/315#discussion_r192681235","pull_request_url":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/twilio/twilio-video.js/pulls/comments/192681235"},"html":{"href":"https://github.com/twilio/twilio-video.js/pull/315#discussion_r192681235"},"pull_request":{"href":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315"}}},"pull_request":{"url":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315","id":192350452,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMzUwNDUy","html_url":"https://github.com/twilio/twilio-video.js/pull/315","diff_url":"https://github.com/twilio/twilio-video.js/pull/315.diff","patch_url":"https://github.com/twilio/twilio-video.js/pull/315.patch","issue_url":"https://api.github.com/repos/twilio/twilio-video.js/issues/315","number":315,"state":"open","locked":false,"title":"Add Active Speaker detection for Group Rooms","user":{"login":"markandrus","id":359154,"node_id":"MDQ6VXNlcjM1OTE1NA==","avatar_url":"https://avatars3.githubusercontent.com/u/359154?v=4","gravatar_id":"","url":"https://api.github.com/users/markandrus","html_url":"https://github.com/markandrus","followers_url":"https://api.github.com/users/markandrus/followers","following_url":"https://api.github.com/users/markandrus/following{/other_user}","gists_url":"https://api.github.com/users/markandrus/gists{/gist_id}","starred_url":"https://api.github.com/users/markandrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markandrus/subscriptions","organizations_url":"https://api.github.com/users/markandrus/orgs","repos_url":"https://api.github.com/users/markandrus/repos","events_url":"https://api.github.com/users/markandrus/events{/privacy}","received_events_url":"https://api.github.com/users/markandrus/received_events","type":"User","site_admin":false},"body":"This PR contains changes to support Active Speaker detection in Group Rooms. Like #313, the necessary Media Server changes are current in our dev environment, so if you test this PR out now, you'll see that `activeSpeaker` is always `null`. Once the server-side changes are deployed to prod (and once we enable this feature by default), `activeSpeaker` will be set to the RemoteParticipant that represents the dominant speaker in the Room, if any. The \"activeSpeakerChanged\" event will signal changes to this property.\r\n\r\nExample\r\n\r\n```js\r\n// activeSpeaker is initially null\r\nassert.strictEqual(room.activeSpeaker, null);\r\n\r\n// activeSpeaker will never be set to the LocalParticipant\r\nassert.notEqual(room.activeSpeaker, room.localParticipant);\r\n\r\n// If set, activeSpeaker is always a RemoteParticipant\r\nif (room.activeSpeaker) {\r\n  assert.equal(room.activeSpeaker, room.participants.get(room.activeSpeaker.sid));\r\n}\r\n\r\nroom.on('activeSpeakerChanged', activeSpeaker => {\r\n  if (activeSpeaker) {\r\n    // There is a new Active Speaker; update the UI to display their video prominently\r\n  } else {\r\n    // There is no longer an Active Speaker\r\n  }\r\n});\r\n```\r\n\r\nTODO\r\n\r\n- [ ] Need to ensure `activeSpeaker` is null-ed out if the Active Speaker disconnects\r\n- [ ] Update CHANGELOG.md\r\n- [ ] Consider renaming this API to \"Dominant Speaker\", since there may be many Active Speakers but only one \"Dominant Speaker\" (`dominantSpeaker` & \"dominantSpeakerChanged\")","created_at":"2018-06-04T09:37:26Z","updated_at":"2018-06-04T09:39:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71506e6455238963f21e19ab39c4703fec813fca","assignee":null,"assignees":[],"requested_reviewers":[{"login":"manjeshbhargav","id":755797,"node_id":"MDQ6VXNlcjc1NTc5Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/755797?v=4","gravatar_id":"","url":"https://api.github.com/users/manjeshbhargav","html_url":"https://github.com/manjeshbhargav","followers_url":"https://api.github.com/users/manjeshbhargav/followers","following_url":"https://api.github.com/users/manjeshbhargav/following{/other_user}","gists_url":"https://api.github.com/users/manjeshbhargav/gists{/gist_id}","starred_url":"https://api.github.com/users/manjeshbhargav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manjeshbhargav/subscriptions","organizations_url":"https://api.github.com/users/manjeshbhargav/orgs","repos_url":"https://api.github.com/users/manjeshbhargav/repos","events_url":"https://api.github.com/users/manjeshbhargav/events{/privacy}","received_events_url":"https://api.github.com/users/manjeshbhargav/received_events","type":"User","site_admin":false},{"login":"ryan-rowland","id":5798408,"node_id":"MDQ6VXNlcjU3OTg0MDg=","avatar_url":"https://avatars0.githubusercontent.com/u/5798408?v=4","gravatar_id":"","url":"https://api.github.com/users/ryan-rowland","html_url":"https://github.com/ryan-rowland","followers_url":"https://api.github.com/users/ryan-rowland/followers","following_url":"https://api.github.com/users/ryan-rowland/following{/other_user}","gists_url":"https://api.github.com/users/ryan-rowland/gists{/gist_id}","starred_url":"https://api.github.com/users/ryan-rowland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryan-rowland/subscriptions","organizations_url":"https://api.github.com/users/ryan-rowland/orgs","repos_url":"https://api.github.com/users/ryan-rowland/repos","events_url":"https://api.github.com/users/ryan-rowland/events{/privacy}","received_events_url":"https://api.github.com/users/ryan-rowland/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315/commits","review_comments_url":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315/comments","review_comment_url":"https://api.github.com/repos/twilio/twilio-video.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twilio/twilio-video.js/issues/315/comments","statuses_url":"https://api.github.com/repos/twilio/twilio-video.js/statuses/863587873d97f419a340447f3cb807f5230462eb","head":{"label":"twilio:VIDEO-1615","ref":"VIDEO-1615","sha":"863587873d97f419a340447f3cb807f5230462eb","user":{"login":"twilio","id":109142,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTE0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/109142?v=4","gravatar_id":"","url":"https://api.github.com/users/twilio","html_url":"https://github.com/twilio","followers_url":"https://api.github.com/users/twilio/followers","following_url":"https://api.github.com/users/twilio/following{/other_user}","gists_url":"https://api.github.com/users/twilio/gists{/gist_id}","starred_url":"https://api.github.com/users/twilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twilio/subscriptions","organizations_url":"https://api.github.com/users/twilio/orgs","repos_url":"https://api.github.com/users/twilio/repos","events_url":"https://api.github.com/users/twilio/events{/privacy}","received_events_url":"https://api.github.com/users/twilio/received_events","type":"Organization","site_admin":false},"repo":{"id":46595751,"node_id":"MDEwOlJlcG9zaXRvcnk0NjU5NTc1MQ==","name":"twilio-video.js","full_name":"twilio/twilio-video.js","owner":{"login":"twilio","id":109142,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTE0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/109142?v=4","gravatar_id":"","url":"https://api.github.com/users/twilio","html_url":"https://github.com/twilio","followers_url":"https://api.github.com/users/twilio/followers","following_url":"https://api.github.com/users/twilio/following{/other_user}","gists_url":"https://api.github.com/users/twilio/gists{/gist_id}","starred_url":"https://api.github.com/users/twilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twilio/subscriptions","organizations_url":"https://api.github.com/users/twilio/orgs","repos_url":"https://api.github.com/users/twilio/repos","events_url":"https://api.github.com/users/twilio/events{/privacy}","received_events_url":"https://api.github.com/users/twilio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twilio/twilio-video.js","description":"Twilio Video JavaScript library","fork":false,"url":"https://api.github.com/repos/twilio/twilio-video.js","forks_url":"https://api.github.com/repos/twilio/twilio-video.js/forks","keys_url":"https://api.github.com/repos/twilio/twilio-video.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twilio/twilio-video.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twilio/twilio-video.js/teams","hooks_url":"https://api.github.com/repos/twilio/twilio-video.js/hooks","issue_events_url":"https://api.github.com/repos/twilio/twilio-video.js/issues/events{/number}","events_url":"https://api.github.com/repos/twilio/twilio-video.js/events","assignees_url":"https://api.github.com/repos/twilio/twilio-video.js/assignees{/user}","branches_url":"https://api.github.com/repos/twilio/twilio-video.js/branches{/branch}","tags_url":"https://api.github.com/repos/twilio/twilio-video.js/tags","blobs_url":"https://api.github.com/repos/twilio/twilio-video.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twilio/twilio-video.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twilio/twilio-video.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/twilio/twilio-video.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twilio/twilio-video.js/statuses/{sha}","languages_url":"https://api.github.com/repos/twilio/twilio-video.js/languages","stargazers_url":"https://api.github.com/repos/twilio/twilio-video.js/stargazers","contributors_url":"https://api.github.com/repos/twilio/twilio-video.js/contributors","subscribers_url":"https://api.github.com/repos/twilio/twilio-video.js/subscribers","subscription_url":"https://api.github.com/repos/twilio/twilio-video.js/subscription","commits_url":"https://api.github.com/repos/twilio/twilio-video.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/twilio/twilio-video.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/twilio/twilio-video.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/twilio/twilio-video.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/twilio/twilio-video.js/contents/{+path}","compare_url":"https://api.github.com/repos/twilio/twilio-video.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twilio/twilio-video.js/merges","archive_url":"https://api.github.com/repos/twilio/twilio-video.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twilio/twilio-video.js/downloads","issues_url":"https://api.github.com/repos/twilio/twilio-video.js/issues{/number}","pulls_url":"https://api.github.com/repos/twilio/twilio-video.js/pulls{/number}","milestones_url":"https://api.github.com/repos/twilio/twilio-video.js/milestones{/number}","notifications_url":"https://api.github.com/repos/twilio/twilio-video.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twilio/twilio-video.js/labels{/name}","releases_url":"https://api.github.com/repos/twilio/twilio-video.js/releases{/id}","deployments_url":"https://api.github.com/repos/twilio/twilio-video.js/deployments","created_at":"2015-11-21T01:16:51Z","updated_at":"2018-06-02T05:33:09Z","pushed_at":"2018-06-04T09:37:27Z","git_url":"git://github.com/twilio/twilio-video.js.git","ssh_url":"git@github.com:twilio/twilio-video.js.git","clone_url":"https://github.com/twilio/twilio-video.js.git","svn_url":"https://github.com/twilio/twilio-video.js","homepage":"https://www.twilio.com/docs/api/video","size":9079,"stargazers_count":124,"watchers_count":124,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":62,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":55,"open_issues":62,"watchers":124,"default_branch":"master"}},"base":{"label":"twilio:master","ref":"master","sha":"16d35c0da7685d4934435e0fca8825f49e3f5d1c","user":{"login":"twilio","id":109142,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTE0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/109142?v=4","gravatar_id":"","url":"https://api.github.com/users/twilio","html_url":"https://github.com/twilio","followers_url":"https://api.github.com/users/twilio/followers","following_url":"https://api.github.com/users/twilio/following{/other_user}","gists_url":"https://api.github.com/users/twilio/gists{/gist_id}","starred_url":"https://api.github.com/users/twilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twilio/subscriptions","organizations_url":"https://api.github.com/users/twilio/orgs","repos_url":"https://api.github.com/users/twilio/repos","events_url":"https://api.github.com/users/twilio/events{/privacy}","received_events_url":"https://api.github.com/users/twilio/received_events","type":"Organization","site_admin":false},"repo":{"id":46595751,"node_id":"MDEwOlJlcG9zaXRvcnk0NjU5NTc1MQ==","name":"twilio-video.js","full_name":"twilio/twilio-video.js","owner":{"login":"twilio","id":109142,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTE0Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/109142?v=4","gravatar_id":"","url":"https://api.github.com/users/twilio","html_url":"https://github.com/twilio","followers_url":"https://api.github.com/users/twilio/followers","following_url":"https://api.github.com/users/twilio/following{/other_user}","gists_url":"https://api.github.com/users/twilio/gists{/gist_id}","starred_url":"https://api.github.com/users/twilio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twilio/subscriptions","organizations_url":"https://api.github.com/users/twilio/orgs","repos_url":"https://api.github.com/users/twilio/repos","events_url":"https://api.github.com/users/twilio/events{/privacy}","received_events_url":"https://api.github.com/users/twilio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twilio/twilio-video.js","description":"Twilio Video JavaScript library","fork":false,"url":"https://api.github.com/repos/twilio/twilio-video.js","forks_url":"https://api.github.com/repos/twilio/twilio-video.js/forks","keys_url":"https://api.github.com/repos/twilio/twilio-video.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twilio/twilio-video.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twilio/twilio-video.js/teams","hooks_url":"https://api.github.com/repos/twilio/twilio-video.js/hooks","issue_events_url":"https://api.github.com/repos/twilio/twilio-video.js/issues/events{/number}","events_url":"https://api.github.com/repos/twilio/twilio-video.js/events","assignees_url":"https://api.github.com/repos/twilio/twilio-video.js/assignees{/user}","branches_url":"https://api.github.com/repos/twilio/twilio-video.js/branches{/branch}","tags_url":"https://api.github.com/repos/twilio/twilio-video.js/tags","blobs_url":"https://api.github.com/repos/twilio/twilio-video.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twilio/twilio-video.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twilio/twilio-video.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/twilio/twilio-video.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twilio/twilio-video.js/statuses/{sha}","languages_url":"https://api.github.com/repos/twilio/twilio-video.js/languages","stargazers_url":"https://api.github.com/repos/twilio/twilio-video.js/stargazers","contributors_url":"https://api.github.com/repos/twilio/twilio-video.js/contributors","subscribers_url":"https://api.github.com/repos/twilio/twilio-video.js/subscribers","subscription_url":"https://api.github.com/repos/twilio/twilio-video.js/subscription","commits_url":"https://api.github.com/repos/twilio/twilio-video.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/twilio/twilio-video.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/twilio/twilio-video.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/twilio/twilio-video.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/twilio/twilio-video.js/contents/{+path}","compare_url":"https://api.github.com/repos/twilio/twilio-video.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twilio/twilio-video.js/merges","archive_url":"https://api.github.com/repos/twilio/twilio-video.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twilio/twilio-video.js/downloads","issues_url":"https://api.github.com/repos/twilio/twilio-video.js/issues{/number}","pulls_url":"https://api.github.com/repos/twilio/twilio-video.js/pulls{/number}","milestones_url":"https://api.github.com/repos/twilio/twilio-video.js/milestones{/number}","notifications_url":"https://api.github.com/repos/twilio/twilio-video.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twilio/twilio-video.js/labels{/name}","releases_url":"https://api.github.com/repos/twilio/twilio-video.js/releases{/id}","deployments_url":"https://api.github.com/repos/twilio/twilio-video.js/deployments","created_at":"2015-11-21T01:16:51Z","updated_at":"2018-06-02T05:33:09Z","pushed_at":"2018-06-04T09:37:27Z","git_url":"git://github.com/twilio/twilio-video.js.git","ssh_url":"git@github.com:twilio/twilio-video.js.git","clone_url":"https://github.com/twilio/twilio-video.js.git","svn_url":"https://github.com/twilio/twilio-video.js","homepage":"https://www.twilio.com/docs/api/video","size":9079,"stargazers_count":124,"watchers_count":124,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"archived":false,"open_issues_count":62,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":55,"open_issues":62,"watchers":124,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315"},"html":{"href":"https://github.com/twilio/twilio-video.js/pull/315"},"issue":{"href":"https://api.github.com/repos/twilio/twilio-video.js/issues/315"},"comments":{"href":"https://api.github.com/repos/twilio/twilio-video.js/issues/315/comments"},"review_comments":{"href":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315/comments"},"review_comment":{"href":"https://api.github.com/repos/twilio/twilio-video.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twilio/twilio-video.js/pulls/315/commits"},"statuses":{"href":"https://api.github.com/repos/twilio/twilio-video.js/statuses/863587873d97f419a340447f3cb807f5230462eb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"markandrus"}}