Forum Discussion
MarjonVlug
7 years agoCommunity Member
Course in full screen?
I saw a number of times the question was asked whether the course can also provide in full screen mode. That was some years ago. Is it possible in the meantime in Storyline 3?
MichaelAnder569
Community Member
Depending on your browser and environment, the code below or some version of it may work for you. This is javascript code, so add it to an "Execute Javascript" trigger. Try it in your intended environment and let us know if it works for you.
toggleFullScreen();
function toggleFullScreen() {
if ((document.fullScreenElement && document.fullScreenElement !== null) ||
(!document.mozFullScreen && !document.webkitIsFullScreen)) {
if (document.documentElement.requestFullScreen) {
document.documentElement.requestFullScreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen) {
document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
} else {
if (document.cancelFullScreen) {
document.cancelFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
}
}
VeronicaBudnika
7 years agoSuper Hero
That's super useful Michael, thanks!