Which team duplicates the function of the fullscreen button inside youtube? I do custom management, the design provides such a "third-party" button. Now here's the code:
function onYouTubePlayerAPIReady() { player = new YT.Player('video-1', { events: { 'onReady': onPlayerReady } }); player2 = new YT.Player('video-2', { events: { 'onReady': onPlayerReady } }); } function onPlayerReady(event) { var stopButton = $('.videotab--header label'); stopButton.click(function() { player.stopVideo(); player2.stopVideo(); }); var playButton = $('.play-video--button'); playButton.click(function() { player2.playVideo(); }); }