Adjusted HLS root location, reduced latency and changed Flask access to have an /api/ prefix
This commit is contained in:
@@ -17,7 +17,7 @@ rtmp {
|
|||||||
hls_path /tmp/hls; # Path to store HLS files (use an absolute path)
|
hls_path /tmp/hls; # Path to store HLS files (use an absolute path)
|
||||||
hls_nested on;
|
hls_nested on;
|
||||||
hls_fragment 5s; # Duration of each HLS segment
|
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;
|
application/vnd.apple.mpegurl m3u8;
|
||||||
video/mp2t ts;
|
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
|
proxy_pass http://web_server:5000; # flask-app is the name of the Flask container in docker-compose
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user