From fc8b02c3c535cc59175dd933f440757ed239ab75 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Sat, 22 Oct 2022 07:01:48 -0600 Subject: [PATCH] Adjust paths --- docker/rootfs/usr/local/nginx/conf/nginx.conf | 6 +++--- web/src/components/JSMpegPlayer.jsx | 2 +- web/src/components/WebRtcPlayer.jsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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);