From d143f3019e1015a5633fb97e754fa606d837c0ed Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 30 Oct 2022 17:16:06 +0100 Subject: [PATCH] fix: use current url to connect to server (#22) instead of using absolute path `/webrtc` Signed-off-by: Stefan Dej --- html/webrtc.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/webrtc.html b/html/webrtc.html index 4646c5a..226a2f1 100644 --- a/html/webrtc.html +++ b/html/webrtc.html @@ -73,7 +73,7 @@ const urlSearchParams = new URLSearchParams(window.location.search); const params = Object.fromEntries(urlSearchParams.entries()); - fetch('/webrtc', { + fetch(window.location.href, { body: JSON.stringify({ type: 'request', res: params.res @@ -109,7 +109,7 @@ }).then(function(answer) { var offer = pc.localDescription; - return fetch('/webrtc', { + return fetch(window.location.href, { body: JSON.stringify({ type: offer.type, id: pc.remote_pc_id,