AURATEC|株式会社オーラテック

MNB技術

var player1 var player2 var player3 var player4 function onYouTubeIframeAPIReady() { player1 = new YT.Player('player1', { height: '248', width: '330', videoId: 'dC76F9qkykM', playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange }, playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', } }); player2 = new YT.Player('player2', { height: '248', width: '330', videoId: 'ReOITsHn35A', playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange }, playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', } }); player3 = new YT.Player('player3', { height: '248', width: '330', videoId: 'IjtM_GugxVI', playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange }, playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', } }); player4 = new YT.Player('player4', { height: '248', width: '330', videoId: 'HQhig7iS5Dc', playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', }, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange }, playerVars: { 'autoplay': '0', 'rel': '0', 'loopplaylist': '0', 'showinfo': '0', } }); } // 4. The API will call this function when the video player is ready. function onPlayerReady(event) { event.target.mute(); } // 5. The API calls this function when the player's state changes. // The function indicates that when playing a video (state=1), // the player should play for six seconds and then stop. var done = false; function onPlayerStateChange(event) { event.target.mute(); // if (event.data == YT.PlayerState.PLAYING && !done) { // setTimeout(stopVideo, 6000); // done = true; // } } function stopVideo() { player.stopVideo(); }