Adjust paths

This commit is contained in:
Nick Mowen 2022-10-22 07:01:48 -06:00
parent bf24b827e4
commit fc8b02c3c5
3 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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(

View File

@ -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);