I suggest you take a look at http://www.youtube.com/html5 and take part in the BETA test. Then you can watch how YouTube works with HTML5 and video. I am sure that you can find answers to your questions by looking at the source code a bit :) I will do this too: D
source
share