Also allow webrtcs:// for https WebRTC streams

This commit is contained in:
John Boiles authored and Gina Häußge committed 2021-09-15 18:28:02 +02:00
1 parent 34b4fd0b05
commit fd8db5e9ca
1 file changed
+5 -3
+5 -3
View File
@@ -1543,7 +1543,7 @@ var copyToClipboard = function (text) {
var determineWebcamStreamType = function (streamUrl) {
if (streamUrl) {
if (streamUrl.startsWith("webrtc://")) {
if (streamUrl.startsWith("webrtc")) {
return "webrtc";
}
@@ -1663,9 +1663,11 @@ var negotiateWebRTC = function (streamUrl) {
})
.then(function () {
var offer = pc.localDescription;
streamUrl = streamUrl.slice("webrtc://".length);
// webrtc://host.com becomes http://host.com
// webrtcs://host.com becomes https://host.com
streamUrl = "http" + streamUrl.slice("webrtc".length);
return $.ajax({
url: "http://" + streamUrl,
url: streamUrl,
type: "POST",
dataType: "json",
data: JSON.stringify({