How YouTube serves download links to browsers

I found this interesting article which describes how YouTube actually delivers a download link to a browser (with links to different sized videos). It also explains the negotiate download speed algorithm.

Anyone working on a youtube download / stream app for Haiku might be interested to read the article.