YouTube Player API – Sound but No Video (AS3 Gotcha)

Here is a gotcha for the YouTube Player AS3 API . I was trying to use the chromeless player, hearing sound, but not seeing any video. The player was added to the display list, alpha=1, visible=true and it was the only display object.


If you use the embedded player, you can call the player.resize() method before the video is playing because the video has already been cued. But if you want to use the chromeless player, you can only call player.resize() after you have cued/loaded a video, not just when the player has dispatched the ‘ready’ event.

Hope this helps someone!

Posted in AS3