¡@

Home 

2014/10/16 ¤W¤È 12:10:45

jquery Programming Glossary: yt.player

youtube api end of video load a function

http://stackoverflow.com/questions/10459622/youtube-api-end-of-video-load-a-function

code script var ytfullplayer function onYouTubePlayerAPIReady console.log 'onYouTubePlayerAPIReady' ytfullplayer new YT.Player 'myVid' events if ''onStateChange' getVideo function getVideo script code pre I have called the youtube api in the head..

YouTube (injected) video ends callback

http://stackoverflow.com/questions/12107202/youtube-injected-video-ends-callback

load video player by this construction outside document ready var player function onYouTubePlayerAPIReady player new YT.Player 'player' height '421' width '761' videoId '' playerVars autoplay 1 autohide 1 showinfo 0 events 'onReady' onPlayerReady.. working example of the below code is also on jsfiddle.net . Some notes Uses the iframe_api not the javascript_api The YT.Player constructor is minimal because you are building the iframe yourself. The playerVars are included as iframe URL parameters... function log msg jQuery '#log' .prepend msg ' br ' function onPlayerStateChange event switch event.data case YT.PlayerState.ENDED log 'Video has ended.' break case YT.PlayerState.PLAYING log 'Video is playing.' break case YT.PlayerState.PAUSED..

Listening for Youtube Event in JavaScript or jQuery

http://stackoverflow.com/questions/7988476/listening-for-youtube-event-in-javascript-or-jquery

execute when the API is ready YT_ready function var frameID getFrameID tabs2 if frameID If the frame exists player new YT.Player frameID events onStateChange stopCycle Example function stopCycle bound to onStateChange function stopCycle event alert..

How do I automatically play a Youtube video (IFrame API) muted?

http://stackoverflow.com/questions/8869372/how-do-i-automatically-play-a-youtube-video-iframe-api-muted

an iframe and YouTube player after the API code downloads. var player function onYouTubePlayerAPIReady player new YT.Player 'player' playerVars 'autoplay' 1 'controls' 1 'autohide' 1 'wmode' 'opaque' videoId 'JW5meKfy3fY' events 'onReady' onPlayerReady..