Is it possible to switch on and off video fullscreen in Vimeo Player (Froogaloop)?

I’m using Vimeo API and
I need to close fullscreen video mode after player “finish” event. And I know how to catch “finish”, but is it possible to switch from fullscreen?

here is link to froogaloop player example – jsfiddle.net/bdougherty/HfwWY/light/

  • vimeo froogaloop API only works when website is hosted?
  • Vimeo froogaloop seekto and play
  • Vimeo Froogaloop API not recognizing an event
  • On iPhone, Vimeo Javascript API .play() function doesn't work until the video has been played
  • Can't get hidden image to display with .show()
  • Vimeo Froogaloop - fullscreen availability detection HTML5 player JS API
  • Vimeo API not working with multiple videos
  • vimeo froogaloop API only works when website is hosted?
  • Vimeo Froogaloop - fullscreen availability detection HTML5 player JS API
  • Vimeo Api - Can't fire playProgress event using Froogaloop
  • Can't get hidden image to display with .show()
  • Vimeo API - Froogaloop. $f is not defined
  • One Solution collect form web for “Is it possible to switch on and off video fullscreen in Vimeo Player (Froogaloop)?”

    found the answer – https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode

    cross-browser solution

    function toggleFullScreen() {
      if (!document.fullscreenElement &&    // alternative standard method
          !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) {  // current working methods
        if (document.documentElement.requestFullscreen) {
          document.documentElement.requestFullscreen();
        } else if (document.documentElement.msRequestFullscreen) {
          document.documentElement.msRequestFullscreen();
        } else if (document.documentElement.mozRequestFullScreen) {
          document.documentElement.mozRequestFullScreen();
        } else if (document.documentElement.webkitRequestFullscreen) {
          document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
        }
      } else {
        if (document.exitFullscreen) {
          document.exitFullscreen();
        } else if (document.msExitFullscreen) {
          document.msExitFullscreen();
        } else if (document.mozCancelFullScreen) {
          document.mozCancelFullScreen();
        } else if (document.webkitExitFullscreen) {
          document.webkitExitFullscreen();
        }
      }
    }