Skip to content

Commit 3162cc2

Browse files
authored
Merge pull request #32 from orblivion/dev-mode-fixes
Instructions and correct error message for localhost
2 parents bf49b4e + 591fa66 commit 3162cc2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ To set an element or class to listen for an init event set `ep_webrtc.listenClas
6767

6868
To enable webrtc with a URL parameter append the following to your pad URL ``?av=YES``
6969

70-
# contributing
70+
# developing and contributing
7171

72-
Please submit bug reports or patches at https://github.com/ether/ep_webrtc/issues
72+
On your browser, you should use `localhost` instead of `0.0.0.0`. This is because webrtc generally requires a secure connection (https), but [an exception is made](https://w3c.github.io/webappsec-secure-contexts/#localhost) specifically for localhost and domains that end in `.localhost`.
7373

74+
Please submit bug reports or patches at https://github.com/ether/ep_webrtc/issues

static/js/webrtc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,9 @@ var rtc = (function() {
538538
}
539539
});
540540
})
541-
.catch(function() {
541+
.catch(function(err) {
542542
var reason = "Sorry, we couldnt't find a suitable camera on your device. If you have a camera, make sure it set up correctly and refresh this website to retry.";
543-
if(location.protocol !== "https:") reason = "Sorry, you need to install SSL certificates for your Etherpad instance to use WebRTC";
543+
if(err.name !== "NotFoundError") reason = "Sorry, you need to install SSL certificates for your Etherpad instance to use WebRTC";
544544

545545
$("#rtcbox")
546546
.empty()

0 commit comments

Comments
 (0)