Before I start, let me plug some of my code: a lot of developers out there go ahead and create their own little helper classes for the YouTube player. However, do feel free to use my “YouTube Approved” (oh yeah) Player API class up on github.
So, you’ve got your project and you’re told to “load that video in HD”. Now one must remember that unless your player is larger than, say 600px wide, there’s no point having it in HD. If you’re loading a HD video into a player that’s smaller than 600px, Flash Player is going to have to scale every frame down and this uses resources, and this isn’t good.
It’s worth having a good read of the playback quality types available from YouTube and decide which one works for your project.
So, back to the original dilemma, how does one make the player HD? Well, it’s pretty simple, just use the “setPlaybackQuality()” function, but this has to be fired, preferably, when the player has loaded and is buffering the video, like so:
Simples eh? Like I said, all this is in my YouTube Player class up on github. Tell me what you think