jquery Programming Glossary: playerstate
Using Youtube's javascript API with jQuery http://stackoverflow.com/questions/786380/using-youtubes-javascript-api-with-jquery the player with player.addEventListener 'onStateChange' 'playerState' which will send any state changes to another global function.. any state changes to another global function in this case playerState . The problem is I'm not sure how to associate a state change.. '#' playerId 0 player.addEventListener 'onStateChange' 'playerState' function playerState state console.log state document .ready..
Using Youtube's javascript API with jQuery http://stackoverflow.com/questions/786380/using-youtubes-javascript-api-with-jquery ie player.playVideo . You can attach an event listener to the player with player.addEventListener 'onStateChange' 'playerState' which will send any state changes to another global function in this case playerState . The problem is I'm not sure how.. 'onStateChange' 'playerState' which will send any state changes to another global function in this case playerState . The problem is I'm not sure how to associate a state change with a specific player. My jQuery plugin can happily attach.. div jQuery function onYouTubePlayerReady playerId var player '#' playerId 0 player.addEventListener 'onStateChange' 'playerState' function playerState state console.log state document .ready function '.secondary' .simplified script head body div id..
|