It was easier for me to use loadVideoByUrl () as an alternative to loadVideoByIdl () instead of using createSWF, you do not need to contact swfobject this way, it is a built-in function ... just use the video ID to create a youtube swt URL like: url = "http://www.youtube.com/e/" + VIDEO_ID + "? Enablejsapi = 1 & version = 3" and send using the loadVideoByUrl () function as follows: player.loadVideoByUrl (url)
This way you don't have to bother with swfobject, it is spelled out here:
http://code.google.com/apis/youtube/js_api_reference.html#loadVideoById
"player.loadVideoByUrl (mediaContentUrl: String, startSeconds: Number): Void Loads and plays the specified video.
* The mediaContentUrl must be a fully qualified YouTube player URL in the format http:
asper
source share