diff --git a/docker/rootfs/usr/local/nginx/conf/nginx.conf b/docker/rootfs/usr/local/nginx/conf/nginx.conf index 670adb9b2..9142b3cd2 100644 --- a/docker/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/rootfs/usr/local/nginx/conf/nginx.conf @@ -170,14 +170,6 @@ http { proxy_set_header Host $host; } - location /restream-ws/ { - proxy_pass http://go2rtc/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header Host $host; - } - location /live/ { proxy_pass http://jsmpeg/; proxy_http_version 1.1; diff --git a/web/src/components/WebRtcPlayer.jsx b/web/src/components/WebRtcPlayer.jsx index 6edf25af6..2d523a14e 100644 --- a/web/src/components/WebRtcPlayer.jsx +++ b/web/src/components/WebRtcPlayer.jsx @@ -1,16 +1,12 @@ import { h } from 'preact'; -import { useRef, useEffect } from 'preact/hooks'; let ws; function initStream(camera) { - //ws = new WebSocket('ws://127.0.0.1:1984/api/ws?src=garage_cam'); - ws = new WebSocket(`ws://${window.location.hostname}:${window.location.port}/restream-ws/api/ws?src=${camera}`); + ws = new WebSocket(`ws://${window.location.host}/go2rtc/api/ws?src=${camera}`); ws.onopen = () => { - console.debug('ws.onopen'); pc.createOffer().then(offer => { pc.setLocalDescription(offer).then(() => { - console.log(offer.sdp); const msg = {type: 'webrtc/offer', value: pc.localDescription.sdp}; ws.send(JSON.stringify(msg)); }); @@ -18,7 +14,6 @@ function initStream(camera) { } ws.onmessage = ev => { const msg = JSON.parse(ev.data); - console.debug('ws.onmessage', msg); if (msg.type === 'webrtc/candidate') { pc.addIceCandidate({candidate: msg.value, sdpMid: ''});