From fc68ebb3128d3a07575963e82fce31c2b9da6ebe Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Fri, 14 Oct 2022 13:02:55 -0600 Subject: [PATCH] Setup specific restream modules --- docker/rootfs/usr/local/nginx/conf/nginx.conf | 15 +++++++++------ web/src/routes/Camera.jsx | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docker/rootfs/usr/local/nginx/conf/nginx.conf b/docker/rootfs/usr/local/nginx/conf/nginx.conf index c09304c56..30a38d858 100644 --- a/docker/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/rootfs/usr/local/nginx/conf/nginx.conf @@ -178,12 +178,15 @@ http { proxy_set_header Host $host; } - location ~ /restream/(.*)$ { - proxy_pass http://go2rtc/api/stream.mp4?src=$1; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_set_header Host $host; + location /restream/ { + + location ~ /mp4/(.*)$ { + proxy_pass http://go2rtc/api/stream.mp4?src=$1; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } } location /go2rtc/ { diff --git a/web/src/routes/Camera.jsx b/web/src/routes/Camera.jsx index 2d6d1be48..5b7c54b22 100644 --- a/web/src/routes/Camera.jsx +++ b/web/src/routes/Camera.jsx @@ -108,7 +108,7 @@ export default function Camera({ camera }) { playbackRates: [1], sources: [ { - src: `${apiHost}/restream/${camera}`, + src: `${apiHost}/restream/mp4/${camera}`, type: 'video/mp4', }, ],