Fullscreen clip youtube
-
What team duplicates the function of fullscreen in youtube? I'm doing caste control, and design is designed to be a "side-down" button. Now this is 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();
});
}
-
//обработка нажатия на кастомную кнопку $(playButtonClass).addEventListener('click', function(){ // Воспроизвидим и потом развораричаваем на весь экран player.playVideo(); var playerElement = $(playerWrapperClass); var requestFullScreen = playerElement.requestFullScreen || playerElement.mozRequestFullScreen || playerElement.webkitRequestFullScreen; if (requestFullScreen) { requestFullScreen.bind(playerElement)(); } })
I found that.
Big Google search says it's an idea, in itself, that's not part of Youtube's philosophy.