javascript - You tube video api, stop a video -


how make work more 1 video , got work 1 video

  1. include:

    <script type="text/javascript" src="http://www.youtube.com/player_api"></script> 
  2. add youtube iframe:

    <iframe id="player" src="http://www.youtube.com/embed/yourid?rel=0&wmode=opaque&enablejsapi=1" frameborder="0"></iframe> 
  3. magic time:

    <script>     var player;     function onyoutubeplayerapiready() {         player = new yt.player('player');     }     // on jquery event or whatever call play or stop on video.     // play player.playvideo();     // stop player.stopvideo(); </script> 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -