Hacker News new | ask | show | jobs
by maccard 432 days ago
2005 is basically the dark ages of the web. It’s pre Ajax and ie6 was the dominant browser. Using this as an argument is like saying apps aren’t suitable because the iPhone didn’t have an App Store until 2008.

> It’s not true because throwing a video file as a source on video tag has no information about the file being requested until the headers are pushed down.

And yet, if you stick a web server in front of a video and load it in chrome, you’ll see just that happening.

1 comments

Can load a video into a video tag in chrome. Press play and pause. See it makes a single request and buffers the whole video.
If you stick:

  <video controls>
    <source src="/video/sample.mp4" type="video/mp4">
    Your browser does not support the video tag.
  </video>
into a html file, and run it against this pastebin [0], you'll see that chrome (and safari) both do range requests out of the box if the fileis big enough.

[0] https://pastebin.com/MyUfiwYE

Tried it on a 800mb file. Single request.
I tried it on 4 different files, and in each case my browser sent a request, my server responded with a 206 and it grabbed chunks as it went.