- 10 Feb 2010
The ESA HD Media Player supports the playback of videos hosted on YouTube. Because we have implemented YouTube’s entire AS3 API into our MediaPlayer component, you can easily load and manipulate YouTube videos with our default components, and you can even take advantage of the small, medium, large, and HD720 formats they offer using any of our bit rate switching options, including: automated selection based on bandwidth, dynamic switching for seamless transitions, and user defined switching that allows your users to switch on the fly. A few key advantages of using YouTube as your content host include free hosting and bandwidh, easy uploading and encoding to multiple bit rates, ability to seek to any part of the video at any time (i.e. you don’t have to wait for the entire video to download), and seamless bit rate switching (picks up right where it left off with only a minor pause and no blank screen). However, there are also a few key disadvantages to using YouTube’s free service, including: they don’t allow access to the NetStream object, so their content does not work with the CCForFlash component (i.e. no external caption support), you can’t adjust the buffer time, you can’t use the smoothing option, and you can’t detect dropped frames; you are not allowed to overlay anything on top of a YouTube video (no links, captions, overlays, or logos); and you can’t get rid of the clickable YouTube logo that appears in the lower right corner of the video (links back to the YouTube page where that video is featured).
For example, the url “http://www.youtube.com/v/aVdO-cx-McA” will load an Avatar trailer with “ID=aVdO-cx-McA” as seen at http://www.youtube.com/watch?v=aVdO-cx-McA.
To use the other bit rate options offered by YouTube, you must enable the bandwidth detection and bit rate switching buttons in our player, and you must use our XML playlist file to define the urls and speed thresholds as shown below. Please note: the same VIDEO_ID should be used for all three versions in the XML, and our player will sort out the rest. The LD version equals YouTube’s ”small” file, the MD version equals YouTube’s “medium” file, and the HD version equals YouTube’s ”hd720″ file (if the hd720 file does not exist the HD version equals YouTube’s ”large” file). Also note: our player will not pull any images from YouTube, so you have to store any images you want to display on your own web server.
Sample Player (created with Skin Wizard):