diff --git a/public/embed.html b/public/embed.html index 34aa326..f07d838 100644 --- a/public/embed.html +++ b/public/embed.html @@ -26,8 +26,8 @@ - - - + + + diff --git a/public/index.html b/public/index.html index 85db3c4..9a8f355 100644 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,7 @@ Screenshare - Viewer - +
@@ -17,8 +17,8 @@
- - - + + + diff --git a/public/viewer.js b/public/viewer.js index b2d8271..81689a7 100644 --- a/public/viewer.js +++ b/public/viewer.js @@ -1,4 +1,5 @@ -const socket = io(); +const basePath = window.location.pathname.replace(/\/[^\/]+\.[^\/]+$/, '').replace(/\/$/, ''); +const socket = io({ path: basePath + '/socket.io' }); const remoteVideo = document.getElementById('remoteVideo'); const overlay = document.getElementById('overlay');