Vimeo, Full Screen Detection

Is there any way to detect when the user presses the full screen button? Unable to find information about this on its API site ...

http://developer.vimeo.com/player/js-api

+4
source share
2 answers

I try a lot of time to detect a click on a full-screen button on a vimeo player, without success. But I find another solution that works for me:

$(window).resize(checkResize);

function checkResize(){
    if (
        document.fullscreenElement ||
        document.webkitFullscreenElement ||
        document.mozFullScreenElement ||
        document.msFullscreenElement
    ){
        // action for fullscreen enable
    }else{
        // action for fullscreen disable
    }
}
0
source

You can do it as follows:

$('button.fullscreen[data-title-fullscreen][data-title-unfullscreen]').click(function(){
//DO something here
});
-1
source

Source: https://habr.com/ru/post/1532823/


All Articles