I am generating a mp4 file from a live stream, sending it to nginx web server and playing it in the browser using html5 video tag. Since the file is being continuously generated the browser stops playing it after some time (say 5 seconds). I want the browser to keep playing the file from where it stopped. If I use the html5 "loop" feature it starts again from the beginning. Is there some configuration/setting in nginx or html5 which will allow me to do this?
Asked
Active
Viewed 990 times
0
-
see: http://stackoverflow.com/questions/10328401/html5-how-to-stream-large-mp4-files – RecycleRobot Jun 04 '14 at 13:57
-
@RecycleRobot: I am doing all that is suggested in that post – John Qualis Jun 04 '14 at 14:10
-
are you using a "Connection": "keep-alive" response header? – RecycleRobot Jun 04 '14 at 14:17
-
I am setting keepalive_timeout 5 in nginx.conf. But I dont see this header in the 200ok response in the web sniffer. – John Qualis Jun 04 '14 at 14:34
-
How do I set keepalive in the connection request? – John Qualis Jun 04 '14 at 15:18
-
No keepalive header doesnt do it – John Qualis Jun 04 '14 at 17:15
1 Answers
0
You need to set a "Connection": "keep-alive" response header and http 1.1 explicitly, you can do so like this:
server {
...
location /http/ {
proxy_http_version 1.1;
proxy_set_header Connection "";
...
}
}

RecycleRobot
- 801
- 2
- 11
- 19