{"action":"created","comment":{"url":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/comments/43227919","id":43227919,"diff_hunk":"@@ -137,40 +177,29 @@ define(['underscore', 'text!partials/screensharedialogff.html', 'webrtc.adapter'\n \n \t\t\t\t// Firefox 36 got screen sharing support.\n \t\t\t\t// See https://bugzilla.mozilla.org/show_bug.cgi?id=923225\n-\t\t\t\tif ($window.webrtcDetectedVersion >= 36) {\n+\t\t\t\tif ($window.webrtcDetectedVersion >= 36 && firefoxExtension.available) {\n \t\t\t\t\tthis.supported = true;\n \t\t\t\t\tthis.prepare = function(options) {\n-\t\t\t\t\t\t// To work, the current domain must be whitelisted in\n-\t\t\t\t\t\t// media.getusermedia.screensharing.allowed_domains (about:config).\n-\t\t\t\t\t\t// See https://wiki.mozilla.org/Screensharing for reference.\n-\t\t\t\t\t\tvar d = $q.defer();\n-\t\t\t\t\t\tvar dlg = dialogs.create('/dialogs/screensharedialogff.html', screenshareDialogFFController, {selection: \"screen\"}, {});\n-\t\t\t\t\t\tdlg.result.then(function(source) {\n-\t\t\t\t\t\t\tif (source) {\n-\t\t\t\t\t\t\t\tvar opts = _.extend({\n-\t\t\t\t\t\t\t\t\tmediaSource: source\n-\t\t\t\t\t\t\t\t}, options);\n-\t\t\t\t\t\t\t\td.resolve(opts);\n-\t\t\t\t\t\t\t} else {\n-\t\t\t\t\t\t\t\td.resolve(null);\n-\t\t\t\t\t\t\t}\n-\t\t\t\t\t\t}, function(err) {\n-\t\t\t\t\t\t\td.resolve(null);\n-\t\t\t\t\t\t});\n-\t\t\t\t\t\treturn d.promise;\n+\t\t\t\t\t\treturn selectFirefoxScreenToShare(options);\n \t\t\t\t\t};\n+\t\t\t\t} else {\n+\n+\t\t\t\t\tif (firefoxExtension.autoinstall.force) {\n+\t\t\t\t\t\tthis.supported = false;\n+\t\t\t\t\t}\n+\n \t\t\t\t}\n \n \t\t\t} else {\n \t\t\t\t// No support for screen sharing.\n \t\t\t}\n \n+\t\t\tvar waiting = false;\n+\t\t\tvar prepareAlternative = this.prepare;","path":"static/js/services/screensharing.js","position":105,"original_position":105,"commit_id":"4af02f5ce460e3a0e9ecaa04b8b0a110b315c414","original_commit_id":"4af02f5ce460e3a0e9ecaa04b8b0a110b315c414","user":{"login":"theurere","id":4820641,"avatar_url":"https://avatars.githubusercontent.com/u/4820641?v=3","gravatar_id":"","url":"https://api.github.com/users/theurere","html_url":"https://github.com/theurere","followers_url":"https://api.github.com/users/theurere/followers","following_url":"https://api.github.com/users/theurere/following{/other_user}","gists_url":"https://api.github.com/users/theurere/gists{/gist_id}","starred_url":"https://api.github.com/users/theurere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theurere/subscriptions","organizations_url":"https://api.github.com/users/theurere/orgs","repos_url":"https://api.github.com/users/theurere/repos","events_url":"https://api.github.com/users/theurere/events{/privacy}","received_events_url":"https://api.github.com/users/theurere/received_events","type":"User","site_admin":false},"body":"What is not good about this? The variables are available in this scope level anyway. Declaring them here makes it more clear when used for Firefox as well.","created_at":"2015-10-28T08:33:10Z","updated_at":"2015-10-28T08:33:10Z","html_url":"https://github.com/strukturag/spreed-webrtc/pull/238#discussion_r43227919","pull_request_url":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238","_links":{"self":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/comments/43227919"},"html":{"href":"https://github.com/strukturag/spreed-webrtc/pull/238#discussion_r43227919"},"pull_request":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238"}}},"pull_request":{"url":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238","id":46765668,"html_url":"https://github.com/strukturag/spreed-webrtc/pull/238","diff_url":"https://github.com/strukturag/spreed-webrtc/pull/238.diff","patch_url":"https://github.com/strukturag/spreed-webrtc/pull/238.patch","issue_url":"https://api.github.com/repos/strukturag/spreed-webrtc/issues/238","number":238,"state":"open","locked":false,"title":"Add support for auto install of Firefox screen sharing extension","user":{"login":"theurere","id":4820641,"avatar_url":"https://avatars.githubusercontent.com/u/4820641?v=3","gravatar_id":"","url":"https://api.github.com/users/theurere","html_url":"https://github.com/theurere","followers_url":"https://api.github.com/users/theurere/followers","following_url":"https://api.github.com/users/theurere/following{/other_user}","gists_url":"https://api.github.com/users/theurere/gists{/gist_id}","starred_url":"https://api.github.com/users/theurere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theurere/subscriptions","organizations_url":"https://api.github.com/users/theurere/orgs","repos_url":"https://api.github.com/users/theurere/repos","events_url":"https://api.github.com/users/theurere/events{/privacy}","received_events_url":"https://api.github.com/users/theurere/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-05T10:40:56Z","updated_at":"2015-10-28T08:33:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0e5c47f11d5a66c163d4c567b88c617b9f85632","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238/commits","review_comments_url":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238/comments","review_comment_url":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/strukturag/spreed-webrtc/issues/238/comments","statuses_url":"https://api.github.com/repos/strukturag/spreed-webrtc/statuses/4af02f5ce460e3a0e9ecaa04b8b0a110b315c414","head":{"label":"theurere:add-firefoxextension-service","ref":"add-firefoxextension-service","sha":"4af02f5ce460e3a0e9ecaa04b8b0a110b315c414","user":{"login":"theurere","id":4820641,"avatar_url":"https://avatars.githubusercontent.com/u/4820641?v=3","gravatar_id":"","url":"https://api.github.com/users/theurere","html_url":"https://github.com/theurere","followers_url":"https://api.github.com/users/theurere/followers","following_url":"https://api.github.com/users/theurere/following{/other_user}","gists_url":"https://api.github.com/users/theurere/gists{/gist_id}","starred_url":"https://api.github.com/users/theurere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theurere/subscriptions","organizations_url":"https://api.github.com/users/theurere/orgs","repos_url":"https://api.github.com/users/theurere/repos","events_url":"https://api.github.com/users/theurere/events{/privacy}","received_events_url":"https://api.github.com/users/theurere/received_events","type":"User","site_admin":false},"repo":{"id":21456782,"name":"spreed-webrtc","full_name":"theurere/spreed-webrtc","owner":{"login":"theurere","id":4820641,"avatar_url":"https://avatars.githubusercontent.com/u/4820641?v=3","gravatar_id":"","url":"https://api.github.com/users/theurere","html_url":"https://github.com/theurere","followers_url":"https://api.github.com/users/theurere/followers","following_url":"https://api.github.com/users/theurere/following{/other_user}","gists_url":"https://api.github.com/users/theurere/gists{/gist_id}","starred_url":"https://api.github.com/users/theurere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theurere/subscriptions","organizations_url":"https://api.github.com/users/theurere/orgs","repos_url":"https://api.github.com/users/theurere/repos","events_url":"https://api.github.com/users/theurere/events{/privacy}","received_events_url":"https://api.github.com/users/theurere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/theurere/spreed-webrtc","description":"WebRTC audio/video call and conferencing server.","fork":true,"url":"https://api.github.com/repos/theurere/spreed-webrtc","forks_url":"https://api.github.com/repos/theurere/spreed-webrtc/forks","keys_url":"https://api.github.com/repos/theurere/spreed-webrtc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theurere/spreed-webrtc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theurere/spreed-webrtc/teams","hooks_url":"https://api.github.com/repos/theurere/spreed-webrtc/hooks","issue_events_url":"https://api.github.com/repos/theurere/spreed-webrtc/issues/events{/number}","events_url":"https://api.github.com/repos/theurere/spreed-webrtc/events","assignees_url":"https://api.github.com/repos/theurere/spreed-webrtc/assignees{/user}","branches_url":"https://api.github.com/repos/theurere/spreed-webrtc/branches{/branch}","tags_url":"https://api.github.com/repos/theurere/spreed-webrtc/tags","blobs_url":"https://api.github.com/repos/theurere/spreed-webrtc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theurere/spreed-webrtc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theurere/spreed-webrtc/git/refs{/sha}","trees_url":"https://api.github.com/repos/theurere/spreed-webrtc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theurere/spreed-webrtc/statuses/{sha}","languages_url":"https://api.github.com/repos/theurere/spreed-webrtc/languages","stargazers_url":"https://api.github.com/repos/theurere/spreed-webrtc/stargazers","contributors_url":"https://api.github.com/repos/theurere/spreed-webrtc/contributors","subscribers_url":"https://api.github.com/repos/theurere/spreed-webrtc/subscribers","subscription_url":"https://api.github.com/repos/theurere/spreed-webrtc/subscription","commits_url":"https://api.github.com/repos/theurere/spreed-webrtc/commits{/sha}","git_commits_url":"https://api.github.com/repos/theurere/spreed-webrtc/git/commits{/sha}","comments_url":"https://api.github.com/repos/theurere/spreed-webrtc/comments{/number}","issue_comment_url":"https://api.github.com/repos/theurere/spreed-webrtc/issues/comments{/number}","contents_url":"https://api.github.com/repos/theurere/spreed-webrtc/contents/{+path}","compare_url":"https://api.github.com/repos/theurere/spreed-webrtc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theurere/spreed-webrtc/merges","archive_url":"https://api.github.com/repos/theurere/spreed-webrtc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theurere/spreed-webrtc/downloads","issues_url":"https://api.github.com/repos/theurere/spreed-webrtc/issues{/number}","pulls_url":"https://api.github.com/repos/theurere/spreed-webrtc/pulls{/number}","milestones_url":"https://api.github.com/repos/theurere/spreed-webrtc/milestones{/number}","notifications_url":"https://api.github.com/repos/theurere/spreed-webrtc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theurere/spreed-webrtc/labels{/name}","releases_url":"https://api.github.com/repos/theurere/spreed-webrtc/releases{/id}","created_at":"2014-07-03T09:18:41Z","updated_at":"2015-02-20T10:57:14Z","pushed_at":"2015-10-28T08:25:06Z","git_url":"git://github.com/theurere/spreed-webrtc.git","ssh_url":"git@github.com:theurere/spreed-webrtc.git","clone_url":"https://github.com/theurere/spreed-webrtc.git","svn_url":"https://github.com/theurere/spreed-webrtc","homepage":"","size":12831,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"strukturag:develop","ref":"develop","sha":"941abd8b80bd6ec8af670590f3832a953d978aa1","user":{"login":"strukturag","id":5314589,"avatar_url":"https://avatars.githubusercontent.com/u/5314589?v=3","gravatar_id":"","url":"https://api.github.com/users/strukturag","html_url":"https://github.com/strukturag","followers_url":"https://api.github.com/users/strukturag/followers","following_url":"https://api.github.com/users/strukturag/following{/other_user}","gists_url":"https://api.github.com/users/strukturag/gists{/gist_id}","starred_url":"https://api.github.com/users/strukturag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strukturag/subscriptions","organizations_url":"https://api.github.com/users/strukturag/orgs","repos_url":"https://api.github.com/users/strukturag/repos","events_url":"https://api.github.com/users/strukturag/events{/privacy}","received_events_url":"https://api.github.com/users/strukturag/received_events","type":"Organization","site_admin":false},"repo":{"id":16809332,"name":"spreed-webrtc","full_name":"strukturag/spreed-webrtc","owner":{"login":"strukturag","id":5314589,"avatar_url":"https://avatars.githubusercontent.com/u/5314589?v=3","gravatar_id":"","url":"https://api.github.com/users/strukturag","html_url":"https://github.com/strukturag","followers_url":"https://api.github.com/users/strukturag/followers","following_url":"https://api.github.com/users/strukturag/following{/other_user}","gists_url":"https://api.github.com/users/strukturag/gists{/gist_id}","starred_url":"https://api.github.com/users/strukturag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strukturag/subscriptions","organizations_url":"https://api.github.com/users/strukturag/orgs","repos_url":"https://api.github.com/users/strukturag/repos","events_url":"https://api.github.com/users/strukturag/events{/privacy}","received_events_url":"https://api.github.com/users/strukturag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/strukturag/spreed-webrtc","description":"WebRTC audio/video call and conferencing server.","fork":false,"url":"https://api.github.com/repos/strukturag/spreed-webrtc","forks_url":"https://api.github.com/repos/strukturag/spreed-webrtc/forks","keys_url":"https://api.github.com/repos/strukturag/spreed-webrtc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/strukturag/spreed-webrtc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/strukturag/spreed-webrtc/teams","hooks_url":"https://api.github.com/repos/strukturag/spreed-webrtc/hooks","issue_events_url":"https://api.github.com/repos/strukturag/spreed-webrtc/issues/events{/number}","events_url":"https://api.github.com/repos/strukturag/spreed-webrtc/events","assignees_url":"https://api.github.com/repos/strukturag/spreed-webrtc/assignees{/user}","branches_url":"https://api.github.com/repos/strukturag/spreed-webrtc/branches{/branch}","tags_url":"https://api.github.com/repos/strukturag/spreed-webrtc/tags","blobs_url":"https://api.github.com/repos/strukturag/spreed-webrtc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/strukturag/spreed-webrtc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/strukturag/spreed-webrtc/git/refs{/sha}","trees_url":"https://api.github.com/repos/strukturag/spreed-webrtc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/strukturag/spreed-webrtc/statuses/{sha}","languages_url":"https://api.github.com/repos/strukturag/spreed-webrtc/languages","stargazers_url":"https://api.github.com/repos/strukturag/spreed-webrtc/stargazers","contributors_url":"https://api.github.com/repos/strukturag/spreed-webrtc/contributors","subscribers_url":"https://api.github.com/repos/strukturag/spreed-webrtc/subscribers","subscription_url":"https://api.github.com/repos/strukturag/spreed-webrtc/subscription","commits_url":"https://api.github.com/repos/strukturag/spreed-webrtc/commits{/sha}","git_commits_url":"https://api.github.com/repos/strukturag/spreed-webrtc/git/commits{/sha}","comments_url":"https://api.github.com/repos/strukturag/spreed-webrtc/comments{/number}","issue_comment_url":"https://api.github.com/repos/strukturag/spreed-webrtc/issues/comments{/number}","contents_url":"https://api.github.com/repos/strukturag/spreed-webrtc/contents/{+path}","compare_url":"https://api.github.com/repos/strukturag/spreed-webrtc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/strukturag/spreed-webrtc/merges","archive_url":"https://api.github.com/repos/strukturag/spreed-webrtc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/strukturag/spreed-webrtc/downloads","issues_url":"https://api.github.com/repos/strukturag/spreed-webrtc/issues{/number}","pulls_url":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls{/number}","milestones_url":"https://api.github.com/repos/strukturag/spreed-webrtc/milestones{/number}","notifications_url":"https://api.github.com/repos/strukturag/spreed-webrtc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/strukturag/spreed-webrtc/labels{/name}","releases_url":"https://api.github.com/repos/strukturag/spreed-webrtc/releases{/id}","created_at":"2014-02-13T16:38:34Z","updated_at":"2015-10-21T10:49:18Z","pushed_at":"2015-10-28T08:25:06Z","git_url":"git://github.com/strukturag/spreed-webrtc.git","ssh_url":"git@github.com:strukturag/spreed-webrtc.git","clone_url":"https://github.com/strukturag/spreed-webrtc.git","svn_url":"https://github.com/strukturag/spreed-webrtc","homepage":"","size":18216,"stargazers_count":101,"watchers_count":101,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":26,"forks":22,"open_issues":26,"watchers":101,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238"},"html":{"href":"https://github.com/strukturag/spreed-webrtc/pull/238"},"issue":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/issues/238"},"comments":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/issues/238/comments"},"review_comments":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238/comments"},"review_comment":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/pulls/238/commits"},"statuses":{"href":"https://api.github.com/repos/strukturag/spreed-webrtc/statuses/4af02f5ce460e3a0e9ecaa04b8b0a110b315c414"}}}}