From 52ac0c2aac90db6757941d77e417fa5439769f19 Mon Sep 17 00:00:00 2001 From: ThisBirchWood Date: Wed, 22 Jan 2025 15:26:16 +0000 Subject: [PATCH] Adjusted HLS root location, reduced latency and changed Flask access to have an /api/ prefix --- nginx/nginx.conf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2b13cfb..3cf4145 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -17,7 +17,7 @@ rtmp { hls_path /tmp/hls; # Path to store HLS files (use an absolute path) hls_nested on; hls_fragment 5s; # Duration of each HLS segment - hls_playlist_length 30s; # Length of HLS playlist (total duration) + hls_playlist_length 15s; # Length of HLS playlist (total duration) } } } @@ -32,11 +32,13 @@ http { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } + add_header Access-Control-Allow-Origin *; - root /tmp/hls; + root /tmp/; + autoindex on; } - location / { + location /api/ { proxy_pass http://web_server:5000; # flask-app is the name of the Flask container in docker-compose } }