From 160d3bb17217804c20a98a9242cb13a3726d7783 Mon Sep 17 00:00:00 2001 From: Evan Theurer Date: Mon, 2 Nov 2015 16:03:30 +0100 Subject: [PATCH] Add explanation how to enable firefox screensharing via flag. --- static/js/directives/screenshare.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/directives/screenshare.js b/static/js/directives/screenshare.js index 0b069375..e105b626 100644 --- a/static/js/directives/screenshare.js +++ b/static/js/directives/screenshare.js @@ -22,7 +22,7 @@ "use strict"; define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials/screensharepeer.html', 'bigscreen', 'webrtc.adapter'], function($, _, template, templatePeer, BigScreen) { - return ["$window", "mediaStream", "$compile", "safeApply", "videoWaiter", "$timeout", "alertify", "translation", "screensharing", function($window, mediaStream, $compile, safeApply, videoWaiter, $timeout, alertify, translation, screensharing) { + return ["$window", "mediaStream", "$compile", "safeApply", "videoWaiter", "$timeout", "alertify", "translation", "screensharing", "$location", function($window, mediaStream, $compile, safeApply, videoWaiter, $timeout, alertify, translation, screensharing, $location) { var peerTemplate = $compile(templatePeer); @@ -279,9 +279,13 @@ define(['jquery', 'underscore', 'text!partials/screenshare.html', 'text!partials switch (error.name) { case "PermissionDeniedError": case "InvalidStateError": - if ($window.webrtcDetectedVersion >= 32 && + if ($window.webrtcDetectedBrowser === "chrome" && + $window.webrtcDetectedVersion >= 32 && $window.webrtcDetectedVersion < 37) { alertify.dialog.alert(translation._("Permission to start screen sharing was denied. Make sure to have enabled screen sharing access for your browser. Copy chrome://flags/#enable-usermedia-screen-capture and open it with your browser and enable the flag on top. Then restart the browser and you are ready to go.")); + } else if ($window.webrtcDetectedBrowser === "firefox" && + $window.webrtcDetectedVersion >= 36) { + alertify.dialog.alert(translation._("Permission to start screen sharing was denied. Make sure to have enabled screen sharing access for your browser. Copy about:config?filter=screensharing.allowed_domains and open it with your browser, double click the option, and add the domain %s to the list (include a comma). Then you are ready to go. Otherwise install the Firefox screensharing extension.", $location.host())); } else { alertify.dialog.alert(translation._("Permission to start screen sharing was denied.")); }