views:

266

answers:

2

I'm trying to use Youtube API and always get error "ytplayer is not defined".

I've copied the code in http://code.google.com/apis/youtube/chromeless_example_1.html to my .html file, hosted in my computer "ytplayer is not defined". I tried different code but again said "ytplayer is not defined".

What is the problem?

+1  A: 

From the YouTube JavaScript Player API Reference:

Note: To test any of these calls, you must have your file running on a webserver, as the Flash player restricts calls between local files and the internet.

barrowc
A: 

how are you running the application? if its in the air framework, check you haven't got transparency=true set in the configuration. it won't load swf with transparency enabled.

Kieran H