diff --git a/docker/rootfs/usr/local/nginx/conf/nginx.conf b/docker/rootfs/usr/local/nginx/conf/nginx.conf index 9142b3cd2..d06ce4d55 100644 --- a/docker/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/rootfs/usr/local/nginx/conf/nginx.conf @@ -170,7 +170,7 @@ http { proxy_set_header Host $host; } - location /live/ { + location /live/jsmpeg/ { proxy_pass http://jsmpeg/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -178,7 +178,7 @@ http { proxy_set_header Host $host; } - location ~ /restream/mp4/(.*)$ { + location ~ /live/mp4/(.*)$ { proxy_pass http://go2rtc/api/stream.mp4?src=$1; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -186,7 +186,7 @@ http { proxy_set_header Host $host; } - location /go2rtc/ { + location /live/webrtc/ { proxy_pass http://go2rtc/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; diff --git a/web/src/components/JSMpegPlayer.jsx b/web/src/components/JSMpegPlayer.jsx index 875f0c8ed..c77f2530d 100644 --- a/web/src/components/JSMpegPlayer.jsx +++ b/web/src/components/JSMpegPlayer.jsx @@ -5,7 +5,7 @@ import JSMpeg from '@cycjimmy/jsmpeg-player'; export default function JSMpegPlayer({ camera, width, height }) { const playerRef = useRef(); - const url = `${baseUrl.replace(/^http/, 'ws')}live/${camera}`; + const url = `${baseUrl.replace(/^http/, 'ws')}live/jsmpeg/${camera}`; useEffect(() => { const video = new JSMpeg.VideoElement( diff --git a/web/src/components/WebRtcPlayer.jsx b/web/src/components/WebRtcPlayer.jsx index 5437ea008..5397717d8 100644 --- a/web/src/components/WebRtcPlayer.jsx +++ b/web/src/components/WebRtcPlayer.jsx @@ -3,7 +3,7 @@ import { baseUrl } from '../api/baseUrl'; import { useEffect } from 'preact/hooks'; export default function WebRtcPlayer({ camera, width, height }) { - const url = `${baseUrl.replace(/^http/, 'ws')}go2rtc/api/ws?src=${camera}`; + const url = `${baseUrl.replace(/^http/, 'ws')}live/webrtc/api/ws?src=${camera}`; useEffect(() => { const ws = new WebSocket(url);