Frame.html 1.31 KB
<!DOCTYPE html>
<html>
    <body>
        <div id="player0"></div>
        <div id="player1"></div>
        <div id="player2"></div>

    <script>
        var tag = document.createElement('script');

        tag.src = "https://www.youtube.com/iframe_api";
        var firstScriptTag = document.getElementsByTagName('script')[0];
        firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

        var player;
        var players = [];
        players.push('player0');
        players.push('player1');
        players.push('player2');
        var videoIds = [];
        videoIds.push('037o6vxm0es');
        videoIds.push('kR77WlHRZrs');
        videoIds.push('R6IT_f0XPT8');

        function onYouTubeIframeAPIReady()
        {
            for(var i = 0; i < videoIds.length; i++)
            {
                player = new YT.Player(players[i], {
                height: '360',
                width: '640',
                videoId: videoIds[i],
                events: {
                    // 'onReady': onPlayerReady,
                    // 'onStateChange': onPlayerStateChange
                    }
                });
            }
        }

    //   function onPlayerReady(event) {
    //   }
    //   function onPlayerStateChange(event) {
    //   }
    //   function stopVideo() {
    //   }
    </script>
  </body>
</html>