Forum Discussion
CruzRincon
9 years agoCommunity Member
Storyline Toggle Fullscreen Mode in Web Browser
Compatible with HTML5 compliant browsers only. Tested on Chrome 57 for Windows and Chrome for Android Nougat (Storyline 3)
Proof of concept:
https://cruzrincon.github.io/Fullscreen/story_html5.html
Instructions: Assign the following Javascript to be executed via Trigger:
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();
}
}
16 Replies
- CraigWolfend195Community Member
Thank you for this code, most helpful. Can you advise how to add a button to leave full screen.
- CruzRinconCommunity Member
This code includes a toggle like behavior. It will switch in and out of the full screen state whenever assigned to a button trigger
- MiriMarchant-deCommunity Member
Hello, any progress on that? did you manage to solve the issue on Iphones? thanks!!!
- fabianCommunity Member
Would be great to have this functionality within the Modern Player Menu and if it could work on iOS. Do you know if there will be a solution from Articulate anytime soon?
Related Content
- 7 months ago
- 8 months ago
- 4 months ago
- 6 months ago