{"action":"created","comment":{"url":"https://api.github.com/repos/webrtc/samples/pulls/comments/35436900","id":35436900,"diff_hunk":"@@ -12,8 +12,17 @@ var videoElement = document.querySelector('video');\n var audioInputSelect = document.querySelector('select#audioSource');\n var audioOutputSelect = document.querySelector('select#audioOutput');\n var videoSelect = document.querySelector('select#videoSource');\n+var selectors = [audioInputSelect, audioOutputSelect, videoSelect];\n \n function gotDevices(deviceInfos) {\n+  // Handles being called several times to update labels. Preserve values.\n+  var values = selectors.map(function(select) { return select.value; });","path":"src/content/devices/input-output/js/main.js","position":8,"original_position":8,"commit_id":"279fce3df2e3d6382b4fe4b06afc33940458dcde","original_commit_id":"279fce3df2e3d6382b4fe4b06afc33940458dcde","user":{"login":"samdutton","id":205226,"avatar_url":"https://avatars.githubusercontent.com/u/205226?v=3","gravatar_id":"","url":"https://api.github.com/users/samdutton","html_url":"https://github.com/samdutton","followers_url":"https://api.github.com/users/samdutton/followers","following_url":"https://api.github.com/users/samdutton/following{/other_user}","gists_url":"https://api.github.com/users/samdutton/gists{/gist_id}","starred_url":"https://api.github.com/users/samdutton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdutton/subscriptions","organizations_url":"https://api.github.com/users/samdutton/orgs","repos_url":"https://api.github.com/users/samdutton/repos","events_url":"https://api.github.com/users/samdutton/events{/privacy}","received_events_url":"https://api.github.com/users/samdutton/received_events","type":"User","site_admin":false},"body":"Google style nit: \r\n\r\n    var values = selectors.map(function(select) { \r\n        return select.value; \r\n    });","created_at":"2015-07-24T16:00:56Z","updated_at":"2015-07-24T16:00:56Z","html_url":"https://github.com/webrtc/samples/pull/590#discussion_r35436900","pull_request_url":"https://api.github.com/repos/webrtc/samples/pulls/590","_links":{"self":{"href":"https://api.github.com/repos/webrtc/samples/pulls/comments/35436900"},"html":{"href":"https://github.com/webrtc/samples/pull/590#discussion_r35436900"},"pull_request":{"href":"https://api.github.com/repos/webrtc/samples/pulls/590"}}},"pull_request":{"url":"https://api.github.com/repos/webrtc/samples/pulls/590","id":40786630,"html_url":"https://github.com/webrtc/samples/pull/590","diff_url":"https://github.com/webrtc/samples/pull/590.diff","patch_url":"https://github.com/webrtc/samples/pull/590.patch","issue_url":"https://api.github.com/repos/webrtc/samples/issues/590","number":590,"state":"open","locked":false,"title":"Refresh device labels after gUM grant (makes them show in HTTP in Firefox)","user":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"body":"Makes camera and mic labels appear\r\n* instantly on first use without requiring user to refresh the page in Chrome and Firefox.\r\n* in Firefox in normal flow (wo/requiring user to be on HTTPS *and* explicitly choosing \"Always Allow\").\r\n","created_at":"2015-07-24T15:29:37Z","updated_at":"2015-07-24T16:00:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18887567bcc1163ce192bd2312535c150fd8726a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/webrtc/samples/pulls/590/commits","review_comments_url":"https://api.github.com/repos/webrtc/samples/pulls/590/comments","review_comment_url":"https://api.github.com/repos/webrtc/samples/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webrtc/samples/issues/590/comments","statuses_url":"https://api.github.com/repos/webrtc/samples/statuses/279fce3df2e3d6382b4fe4b06afc33940458dcde","head":{"label":"jan-ivar:labels","ref":"labels","sha":"279fce3df2e3d6382b4fe4b06afc33940458dcde","user":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"repo":{"id":32081003,"name":"samples","full_name":"jan-ivar/samples","owner":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jan-ivar/samples","description":"WebRTC demos and samples","fork":true,"url":"https://api.github.com/repos/jan-ivar/samples","forks_url":"https://api.github.com/repos/jan-ivar/samples/forks","keys_url":"https://api.github.com/repos/jan-ivar/samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jan-ivar/samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jan-ivar/samples/teams","hooks_url":"https://api.github.com/repos/jan-ivar/samples/hooks","issue_events_url":"https://api.github.com/repos/jan-ivar/samples/issues/events{/number}","events_url":"https://api.github.com/repos/jan-ivar/samples/events","assignees_url":"https://api.github.com/repos/jan-ivar/samples/assignees{/user}","branches_url":"https://api.github.com/repos/jan-ivar/samples/branches{/branch}","tags_url":"https://api.github.com/repos/jan-ivar/samples/tags","blobs_url":"https://api.github.com/repos/jan-ivar/samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jan-ivar/samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jan-ivar/samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/jan-ivar/samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jan-ivar/samples/statuses/{sha}","languages_url":"https://api.github.com/repos/jan-ivar/samples/languages","stargazers_url":"https://api.github.com/repos/jan-ivar/samples/stargazers","contributors_url":"https://api.github.com/repos/jan-ivar/samples/contributors","subscribers_url":"https://api.github.com/repos/jan-ivar/samples/subscribers","subscription_url":"https://api.github.com/repos/jan-ivar/samples/subscription","commits_url":"https://api.github.com/repos/jan-ivar/samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/jan-ivar/samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/jan-ivar/samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/jan-ivar/samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/jan-ivar/samples/contents/{+path}","compare_url":"https://api.github.com/repos/jan-ivar/samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jan-ivar/samples/merges","archive_url":"https://api.github.com/repos/jan-ivar/samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jan-ivar/samples/downloads","issues_url":"https://api.github.com/repos/jan-ivar/samples/issues{/number}","pulls_url":"https://api.github.com/repos/jan-ivar/samples/pulls{/number}","milestones_url":"https://api.github.com/repos/jan-ivar/samples/milestones{/number}","notifications_url":"https://api.github.com/repos/jan-ivar/samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jan-ivar/samples/labels{/name}","releases_url":"https://api.github.com/repos/jan-ivar/samples/releases{/id}","created_at":"2015-03-12T14:21:53Z","updated_at":"2015-03-12T14:21:53Z","pushed_at":"2015-07-24T15:11:12Z","git_url":"git://github.com/jan-ivar/samples.git","ssh_url":"git@github.com:jan-ivar/samples.git","clone_url":"https://github.com/jan-ivar/samples.git","svn_url":"https://github.com/jan-ivar/samples","homepage":"https://webrtc.github.io/samples/","size":3259,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"webrtc:master","ref":"master","sha":"e4dbe3a42fa64e7049631cdab21a587a154a1464","user":{"login":"webrtc","id":10526312,"avatar_url":"https://avatars.githubusercontent.com/u/10526312?v=3","gravatar_id":"","url":"https://api.github.com/users/webrtc","html_url":"https://github.com/webrtc","followers_url":"https://api.github.com/users/webrtc/followers","following_url":"https://api.github.com/users/webrtc/following{/other_user}","gists_url":"https://api.github.com/users/webrtc/gists{/gist_id}","starred_url":"https://api.github.com/users/webrtc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webrtc/subscriptions","organizations_url":"https://api.github.com/users/webrtc/orgs","repos_url":"https://api.github.com/users/webrtc/repos","events_url":"https://api.github.com/users/webrtc/events{/privacy}","received_events_url":"https://api.github.com/users/webrtc/received_events","type":"Organization","site_admin":false},"repo":{"id":12970971,"name":"samples","full_name":"webrtc/samples","owner":{"login":"webrtc","id":10526312,"avatar_url":"https://avatars.githubusercontent.com/u/10526312?v=3","gravatar_id":"","url":"https://api.github.com/users/webrtc","html_url":"https://github.com/webrtc","followers_url":"https://api.github.com/users/webrtc/followers","following_url":"https://api.github.com/users/webrtc/following{/other_user}","gists_url":"https://api.github.com/users/webrtc/gists{/gist_id}","starred_url":"https://api.github.com/users/webrtc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webrtc/subscriptions","organizations_url":"https://api.github.com/users/webrtc/orgs","repos_url":"https://api.github.com/users/webrtc/repos","events_url":"https://api.github.com/users/webrtc/events{/privacy}","received_events_url":"https://api.github.com/users/webrtc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webrtc/samples","description":"WebRTC demos and samples","fork":false,"url":"https://api.github.com/repos/webrtc/samples","forks_url":"https://api.github.com/repos/webrtc/samples/forks","keys_url":"https://api.github.com/repos/webrtc/samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webrtc/samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webrtc/samples/teams","hooks_url":"https://api.github.com/repos/webrtc/samples/hooks","issue_events_url":"https://api.github.com/repos/webrtc/samples/issues/events{/number}","events_url":"https://api.github.com/repos/webrtc/samples/events","assignees_url":"https://api.github.com/repos/webrtc/samples/assignees{/user}","branches_url":"https://api.github.com/repos/webrtc/samples/branches{/branch}","tags_url":"https://api.github.com/repos/webrtc/samples/tags","blobs_url":"https://api.github.com/repos/webrtc/samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webrtc/samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webrtc/samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/webrtc/samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webrtc/samples/statuses/{sha}","languages_url":"https://api.github.com/repos/webrtc/samples/languages","stargazers_url":"https://api.github.com/repos/webrtc/samples/stargazers","contributors_url":"https://api.github.com/repos/webrtc/samples/contributors","subscribers_url":"https://api.github.com/repos/webrtc/samples/subscribers","subscription_url":"https://api.github.com/repos/webrtc/samples/subscription","commits_url":"https://api.github.com/repos/webrtc/samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/webrtc/samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/webrtc/samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/webrtc/samples/issues/comments{/number}","contents_url":"https://api.github.com/repos/webrtc/samples/contents/{+path}","compare_url":"https://api.github.com/repos/webrtc/samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webrtc/samples/merges","archive_url":"https://api.github.com/repos/webrtc/samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webrtc/samples/downloads","issues_url":"https://api.github.com/repos/webrtc/samples/issues{/number}","pulls_url":"https://api.github.com/repos/webrtc/samples/pulls{/number}","milestones_url":"https://api.github.com/repos/webrtc/samples/milestones{/number}","notifications_url":"https://api.github.com/repos/webrtc/samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webrtc/samples/labels{/name}","releases_url":"https://api.github.com/repos/webrtc/samples/releases{/id}","created_at":"2013-09-20T10:40:23Z","updated_at":"2015-07-24T07:44:05Z","pushed_at":"2015-07-24T15:29:37Z","git_url":"git://github.com/webrtc/samples.git","ssh_url":"git@github.com:webrtc/samples.git","clone_url":"https://github.com/webrtc/samples.git","svn_url":"https://github.com/webrtc/samples","homepage":"https://webrtc.github.io/samples/","size":19395,"stargazers_count":1432,"watchers_count":1432,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":637,"mirror_url":null,"open_issues_count":12,"forks":637,"open_issues":12,"watchers":1432,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webrtc/samples/pulls/590"},"html":{"href":"https://github.com/webrtc/samples/pull/590"},"issue":{"href":"https://api.github.com/repos/webrtc/samples/issues/590"},"comments":{"href":"https://api.github.com/repos/webrtc/samples/issues/590/comments"},"review_comments":{"href":"https://api.github.com/repos/webrtc/samples/pulls/590/comments"},"review_comment":{"href":"https://api.github.com/repos/webrtc/samples/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webrtc/samples/pulls/590/commits"},"statuses":{"href":"https://api.github.com/repos/webrtc/samples/statuses/279fce3df2e3d6382b4fe4b06afc33940458dcde"}}}}