Forum Discussion
MarjonVlug
8 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
8 years agoCommunity 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();
}
}
- VeronicaBudnika8 years agoSuper Hero
That's super useful Michael, thanks!
- MarjonVlug8 years agoCommunity Member
Thanks for the code! Do I need to add the trigger to separately to each slide?