Here's my nginx configuration within the server block:
location /mp4/ {
mp4;
mp4_buffer_size 6M;
mp4_max_buffer_size 20M;
limit_rate 260k;
limit_rate_after 3m;
}
I also have the following in the http block:
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
sendfile_max_chunk 512k;
}
I loaded the 1.2GB test file http://example.com/mp4/sample.mp4 directly in Chrome browser.
A default built-in player is shown and I can playback with seek and scrub without problem.
But when the video is paused, the rest of the clip is still being downloaded.
I noticed this by monitoring my bandwidth usage on the server side.
I read that the mp4_max_buffer_size and mp4_buffer_size are meant to be setting memory usage on the server side.
How do I prevent the client side from continuously downloading the video in the background when video is paused, so that it won't waste the client's and my server's bandwidth?
The server just fulfills requests. Its up the the browser how much data it requests.