{"action":"created","comment":{"url":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/comments/47456686","id":47456686,"diff_hunk":"@@ -428,7 +429,7 @@ SimpleWebRTC.prototype.stopScreenShare = function () {\n     // a hack to emit the event the removes the video\n     // element that we want\n     if (videoEl) this.emit('videoRemoved', videoEl);\n-    if (stream) stream.stop();\n+    if (stream && stream.stop) stream.stop();","path":"simplewebrtc.js","position":13,"original_position":13,"commit_id":"99b510e5b9f9642c9f07625dfbaa62d242a1a4e3","original_commit_id":"99b510e5b9f9642c9f07625dfbaa62d242a1a4e3","user":{"login":"xdumaine","id":833911,"avatar_url":"https://avatars.githubusercontent.com/u/833911?v=3","gravatar_id":"","url":"https://api.github.com/users/xdumaine","html_url":"https://github.com/xdumaine","followers_url":"https://api.github.com/users/xdumaine/followers","following_url":"https://api.github.com/users/xdumaine/following{/other_user}","gists_url":"https://api.github.com/users/xdumaine/gists{/gist_id}","starred_url":"https://api.github.com/users/xdumaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xdumaine/subscriptions","organizations_url":"https://api.github.com/users/xdumaine/orgs","repos_url":"https://api.github.com/users/xdumaine/repos","events_url":"https://api.github.com/users/xdumaine/events{/privacy}","received_events_url":"https://api.github.com/users/xdumaine/received_events","type":"User","site_admin":false},"body":"Resolved in #365 ","created_at":"2015-12-14T02:14:58Z","updated_at":"2015-12-14T02:14:58Z","html_url":"https://github.com/andyet/SimpleWebRTC/pull/366#discussion_r47456686","pull_request_url":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366","_links":{"self":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/comments/47456686"},"html":{"href":"https://github.com/andyet/SimpleWebRTC/pull/366#discussion_r47456686"},"pull_request":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366"}}},"pull_request":{"url":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366","id":53279064,"html_url":"https://github.com/andyet/SimpleWebRTC/pull/366","diff_url":"https://github.com/andyet/SimpleWebRTC/pull/366.diff","patch_url":"https://github.com/andyet/SimpleWebRTC/pull/366.patch","issue_url":"https://api.github.com/repos/andyet/SimpleWebRTC/issues/366","number":366,"state":"open","locked":false,"title":"Add `localScreenRemoved` event.  Check for stream.stop before calling.","user":{"login":"MichaelJCole","id":1504790,"avatar_url":"https://avatars.githubusercontent.com/u/1504790?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelJCole","html_url":"https://github.com/MichaelJCole","followers_url":"https://api.github.com/users/MichaelJCole/followers","following_url":"https://api.github.com/users/MichaelJCole/following{/other_user}","gists_url":"https://api.github.com/users/MichaelJCole/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelJCole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelJCole/subscriptions","organizations_url":"https://api.github.com/users/MichaelJCole/orgs","repos_url":"https://api.github.com/users/MichaelJCole/repos","events_url":"https://api.github.com/users/MichaelJCole/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelJCole/received_events","type":"User","site_admin":false},"body":"In chrome, if user clicks 'stop screen sharing', this will emit an event the UI can react to.    \r\n\r\n```\r\nself.emit('localScreenRemoved');\r\n```\r\n\r\nThis is symmetrical to the `videoRemoved` and `localScreenAdded` events.\r\n\r\nAlso a coding check for stopping undefined or older streams to prevent errors.\r\n\r\nThanks!\r\n","created_at":"2015-12-10T16:10:08Z","updated_at":"2015-12-14T02:14:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36b26189add15262e7e02615ad394db75ac1ef7d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366/commits","review_comments_url":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366/comments","review_comment_url":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andyet/SimpleWebRTC/issues/366/comments","statuses_url":"https://api.github.com/repos/andyet/SimpleWebRTC/statuses/99b510e5b9f9642c9f07625dfbaa62d242a1a4e3","head":{"label":"MichaelJCole:screensharingstop","ref":"screensharingstop","sha":"99b510e5b9f9642c9f07625dfbaa62d242a1a4e3","user":{"login":"MichaelJCole","id":1504790,"avatar_url":"https://avatars.githubusercontent.com/u/1504790?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelJCole","html_url":"https://github.com/MichaelJCole","followers_url":"https://api.github.com/users/MichaelJCole/followers","following_url":"https://api.github.com/users/MichaelJCole/following{/other_user}","gists_url":"https://api.github.com/users/MichaelJCole/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelJCole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelJCole/subscriptions","organizations_url":"https://api.github.com/users/MichaelJCole/orgs","repos_url":"https://api.github.com/users/MichaelJCole/repos","events_url":"https://api.github.com/users/MichaelJCole/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelJCole/received_events","type":"User","site_admin":false},"repo":{"id":46158441,"name":"SimpleWebRTC","full_name":"MichaelJCole/SimpleWebRTC","owner":{"login":"MichaelJCole","id":1504790,"avatar_url":"https://avatars.githubusercontent.com/u/1504790?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelJCole","html_url":"https://github.com/MichaelJCole","followers_url":"https://api.github.com/users/MichaelJCole/followers","following_url":"https://api.github.com/users/MichaelJCole/following{/other_user}","gists_url":"https://api.github.com/users/MichaelJCole/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelJCole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelJCole/subscriptions","organizations_url":"https://api.github.com/users/MichaelJCole/orgs","repos_url":"https://api.github.com/users/MichaelJCole/repos","events_url":"https://api.github.com/users/MichaelJCole/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelJCole/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MichaelJCole/SimpleWebRTC","description":"Simplest WebRTC ever","fork":true,"url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC","forks_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/forks","keys_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/teams","hooks_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/hooks","issue_events_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/issues/events{/number}","events_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/events","assignees_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/assignees{/user}","branches_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/branches{/branch}","tags_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/tags","blobs_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/git/refs{/sha}","trees_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/statuses/{sha}","languages_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/languages","stargazers_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/stargazers","contributors_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/contributors","subscribers_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/subscribers","subscription_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/subscription","commits_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/commits{/sha}","git_commits_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/git/commits{/sha}","comments_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/comments{/number}","issue_comment_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/issues/comments{/number}","contents_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/contents/{+path}","compare_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/merges","archive_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/downloads","issues_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/issues{/number}","pulls_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/pulls{/number}","milestones_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/milestones{/number}","notifications_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/labels{/name}","releases_url":"https://api.github.com/repos/MichaelJCole/SimpleWebRTC/releases{/id}","created_at":"2015-11-14T02:35:42Z","updated_at":"2015-11-14T02:35:43Z","pushed_at":"2015-12-10T16:07:10Z","git_url":"git://github.com/MichaelJCole/SimpleWebRTC.git","ssh_url":"git@github.com:MichaelJCole/SimpleWebRTC.git","clone_url":"https://github.com/MichaelJCole/SimpleWebRTC.git","svn_url":"https://github.com/MichaelJCole/SimpleWebRTC","homepage":null,"size":1926,"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":"andyet:master","ref":"master","sha":"7df87c4c94a1056a0674b0f755bc01d233cc575b","user":{"login":"andyet","id":325865,"avatar_url":"https://avatars.githubusercontent.com/u/325865?v=3","gravatar_id":"","url":"https://api.github.com/users/andyet","html_url":"https://github.com/andyet","followers_url":"https://api.github.com/users/andyet/followers","following_url":"https://api.github.com/users/andyet/following{/other_user}","gists_url":"https://api.github.com/users/andyet/gists{/gist_id}","starred_url":"https://api.github.com/users/andyet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyet/subscriptions","organizations_url":"https://api.github.com/users/andyet/orgs","repos_url":"https://api.github.com/users/andyet/repos","events_url":"https://api.github.com/users/andyet/events{/privacy}","received_events_url":"https://api.github.com/users/andyet/received_events","type":"Organization","site_admin":false},"repo":{"id":7769821,"name":"SimpleWebRTC","full_name":"andyet/SimpleWebRTC","owner":{"login":"andyet","id":325865,"avatar_url":"https://avatars.githubusercontent.com/u/325865?v=3","gravatar_id":"","url":"https://api.github.com/users/andyet","html_url":"https://github.com/andyet","followers_url":"https://api.github.com/users/andyet/followers","following_url":"https://api.github.com/users/andyet/following{/other_user}","gists_url":"https://api.github.com/users/andyet/gists{/gist_id}","starred_url":"https://api.github.com/users/andyet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyet/subscriptions","organizations_url":"https://api.github.com/users/andyet/orgs","repos_url":"https://api.github.com/users/andyet/repos","events_url":"https://api.github.com/users/andyet/events{/privacy}","received_events_url":"https://api.github.com/users/andyet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andyet/SimpleWebRTC","description":"Simplest WebRTC ever","fork":false,"url":"https://api.github.com/repos/andyet/SimpleWebRTC","forks_url":"https://api.github.com/repos/andyet/SimpleWebRTC/forks","keys_url":"https://api.github.com/repos/andyet/SimpleWebRTC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andyet/SimpleWebRTC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andyet/SimpleWebRTC/teams","hooks_url":"https://api.github.com/repos/andyet/SimpleWebRTC/hooks","issue_events_url":"https://api.github.com/repos/andyet/SimpleWebRTC/issues/events{/number}","events_url":"https://api.github.com/repos/andyet/SimpleWebRTC/events","assignees_url":"https://api.github.com/repos/andyet/SimpleWebRTC/assignees{/user}","branches_url":"https://api.github.com/repos/andyet/SimpleWebRTC/branches{/branch}","tags_url":"https://api.github.com/repos/andyet/SimpleWebRTC/tags","blobs_url":"https://api.github.com/repos/andyet/SimpleWebRTC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andyet/SimpleWebRTC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andyet/SimpleWebRTC/git/refs{/sha}","trees_url":"https://api.github.com/repos/andyet/SimpleWebRTC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andyet/SimpleWebRTC/statuses/{sha}","languages_url":"https://api.github.com/repos/andyet/SimpleWebRTC/languages","stargazers_url":"https://api.github.com/repos/andyet/SimpleWebRTC/stargazers","contributors_url":"https://api.github.com/repos/andyet/SimpleWebRTC/contributors","subscribers_url":"https://api.github.com/repos/andyet/SimpleWebRTC/subscribers","subscription_url":"https://api.github.com/repos/andyet/SimpleWebRTC/subscription","commits_url":"https://api.github.com/repos/andyet/SimpleWebRTC/commits{/sha}","git_commits_url":"https://api.github.com/repos/andyet/SimpleWebRTC/git/commits{/sha}","comments_url":"https://api.github.com/repos/andyet/SimpleWebRTC/comments{/number}","issue_comment_url":"https://api.github.com/repos/andyet/SimpleWebRTC/issues/comments{/number}","contents_url":"https://api.github.com/repos/andyet/SimpleWebRTC/contents/{+path}","compare_url":"https://api.github.com/repos/andyet/SimpleWebRTC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andyet/SimpleWebRTC/merges","archive_url":"https://api.github.com/repos/andyet/SimpleWebRTC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andyet/SimpleWebRTC/downloads","issues_url":"https://api.github.com/repos/andyet/SimpleWebRTC/issues{/number}","pulls_url":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls{/number}","milestones_url":"https://api.github.com/repos/andyet/SimpleWebRTC/milestones{/number}","notifications_url":"https://api.github.com/repos/andyet/SimpleWebRTC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andyet/SimpleWebRTC/labels{/name}","releases_url":"https://api.github.com/repos/andyet/SimpleWebRTC/releases{/id}","created_at":"2013-01-23T07:28:01Z","updated_at":"2015-12-13T08:51:54Z","pushed_at":"2015-12-14T02:12:23Z","git_url":"git://github.com/andyet/SimpleWebRTC.git","ssh_url":"git@github.com:andyet/SimpleWebRTC.git","clone_url":"https://github.com/andyet/SimpleWebRTC.git","svn_url":"https://github.com/andyet/SimpleWebRTC","homepage":null,"size":2742,"stargazers_count":2308,"watchers_count":2308,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":673,"mirror_url":null,"open_issues_count":64,"forks":673,"open_issues":64,"watchers":2308,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366"},"html":{"href":"https://github.com/andyet/SimpleWebRTC/pull/366"},"issue":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/issues/366"},"comments":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/issues/366/comments"},"review_comments":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366/comments"},"review_comment":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/pulls/366/commits"},"statuses":{"href":"https://api.github.com/repos/andyet/SimpleWebRTC/statuses/99b510e5b9f9642c9f07625dfbaa62d242a1a4e3"}}}}