Friday, July 22, 2011

[YouTube-API] Re: How to detect when a player's API is ready?

Hey Sam,

We've talked off-thread about this already, but there really is not a
supported API for controlling the YouTube player that's found on a
youtube.com watch page. Only the embedded player that is found on
third-party sites has a stable API.

Cheers,
-Jeff Posnick, YouTube API Team
apiblog.youtube.com | @YouTubeDev | groups.google.com/group/youtube-
api-gdata


On Jul 22, 8:05 am, Sam Dutton <dut...@google.com> wrote:
> I'm working on a Chrome extension to pause all YouTube videos that start
> playing in a page when it loads.
>
> So, from a contentscript in a page, I need to know when the API for each
> player on the page is available. Then I can call player.pauseVideo() for
> each.
>
> I've tried hacky methods using setInterval to check for the existence of
> player.pauseVideo, but that doesn't work very well.
>
> Excuse my ignorance, but is there a 'right' way to do this?

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment