diff --git a/internal/servers/webrtc/publisher.js b/internal/servers/webrtc/publisher.js index bc8a703d..33d0a235 100644 --- a/internal/servers/webrtc/publisher.js +++ b/internal/servers/webrtc/publisher.js @@ -304,7 +304,7 @@ throw new Error(`bad status code ${res.status}`); } - this.sessionUrl = new URL(res.headers.get('location'), window.location.href).toString(); + this.sessionUrl = new URL(res.headers.get('location'), this.conf.url).toString(); return res.text(); }); diff --git a/internal/servers/webrtc/reader.js b/internal/servers/webrtc/reader.js index 8bf45cf6..bdb41f15 100644 --- a/internal/servers/webrtc/reader.js +++ b/internal/servers/webrtc/reader.js @@ -402,7 +402,7 @@ throw new Error(`bad status code ${res.status}`); } - this.sessionUrl = new URL(res.headers.get('location'), window.location.href).toString(); + this.sessionUrl = new URL(res.headers.get('location'), this.conf.url).toString(); return res.text(); });