Skip to main content
Known Participant
December 6, 2012
Question

Full Screen toggle button in Captivate??

  • December 6, 2012
  • 1 reply
  • 5766 views

Is there ANY way to create a full screen toggle button in captivate? I've tried everything I can think of. I am creating an interactive training product that I would like for users to switch to "full screen mode" if they wish (both html5 and flash). Is this possible??

This topic has been closed for replies.

1 reply

Gleeful_Odyssey6C29
Participant
January 28, 2017

you can execute  javascript codes:

//【fullscreen】

var docElm = document.documentElement;

//W3C 

if (docElm.requestFullscreen) { 

    docElm.requestFullscreen(); 

}

//FireFox 

else if (docElm.mozRequestFullScreen) { 

    docElm.mozRequestFullScreen(); 

}

//Chrome等 

else if (docElm.webkitRequestFullScreen) { 

docElm.webkitRequestFullScreen(); 

}

//IE11

else if (elem.msRequestFullscreen) {

  elem.msRequestFullscreen();

}

//【exit fullscreen】

if (document.exitFullscreen) { 
        
document.exitFullscreen(); 

else if (document.mozCancelFullScreen) { 
        
document.mozCancelFullScreen(); 

else if (document.webkitCancelFullScreen) { 
    
document.webkitCancelFullScreen(); 
}
else if (document.msExitFullscreen) {
      
document.msExitFullscreen();
}

Participating Frequently
January 30, 2017

In the case where you are displaying your materials in an IFRAME of an LMS,  you need to use this instead:

// check to see if you're in an iframe

let i = parent.document.getElementsByTagName("iframe")[0]

        if (i == null) { 

            i = document.getElementById("main_container")   // nope, you're ok..  main_container is from captivate.

        }

        i.webkitRequestFullScreen()   // assuming this works for more than chrome.

    });