Google Groups

Re: How do i obtain the player state for embedded ifram video player?


Jeffrey Posnick Aug 2, 2012 7:37 AM
Posted in group: YouTube APIs Developer Forum
Hello Steve,

 Yes, the documentation (https://developers.google.com/youtube/iframe_api_reference) has an example of hooking up on onStateChange callback that gets fired when a player changes state. If you're following the example in the docs, I don't know what specific problem you're having, and to debug further it would be good if you could provide a public URL where we could access your web page.

Cheers,
-Jeff Posnick, YouTube API Team
YouTube Developer Relations is hiring! developers.google.com/jobs


On Wednesday, August 1, 2012 10:49:25 AM UTC-4, steve wrote:
Hello,
I have embedded iframe videos on my webpage. This works well but now I want to listen for the change in player state so I can control other behaviors using javascript. I have looked at the API documentation and see that there are 2 parameters to establish javascript interaction but I have not been able to get them to work. Is there an example of using embedded iframe and obtaining the player state?
  Thanks!