Forum Discussion
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?
- MichaelAnder569Community 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();
}
}- VeronicaBudnikaSuper Hero
That's super useful Michael, thanks!
- MarjonVlugCommunity Member
Thanks for the code! Do I need to add the trigger to separately to each slide?
- MichaelAnder569Community Member
Please check out an updated version of this here that appears to work better across multiple browsers.
http://andersonelearning.com/demo/FullScreen/story.html
I've attached the .story file to this message. I welcome any input or improvements.
- JeremyLarsonCommunity Member
Hey Micheal,
My company is moving to a new content management system and as a result of some of the new platforms constraints we would really benefit from being able to use this Full Screen mode. I have tested it out and it seems to work fantastic. But before I try to implement this company wide on tons of software simulations built with Storyline, I am wondering if you (or anyone else) has run into any issues thus far when browsers have updates or if there are any other concerns with how stable this solution is. Thank you!
- VeronicaBudnikaSuper Hero
Hi Marjon,
There isn't a full 'full screen' option, but you can adjust your story size and some of the settings. To make my courses as close as possible to full screen I set my Player Size to 'Scale player to fill browser window' through the Player Properties > Other dialogue box.
You may have seen this already, but in case you missed it: https://community.articulate.com/discussions/articulate-storyline/course-full-screen
Hope this helps!
- MichaelAnder569Community Member
Sameeksha, I didn't have time to make a project that toggles this setting and everything, but the code below appears to work okay in IE11, allowing the next button to work ok. Please check it out and test it well. I will put a project together if I get time tomorrow.
var fullStorylinePlayer = document.querySelectorAll("html");
if (fullStorylinePlayer[0].requestFullscreen) {
fullStorylinePlayer[0].requestFullscreen();
}else if (fullStorylinePlayer[0].mozRequestFullScreen) {
fullStorylinePlayer[0].mozRequestFullScreen(); // Firefox
}else if (fullStorylinePlayer[0].webkitRequestFullscreen) {
fullStorylinePlayer[0].webkitRequestFullscreen(); // Chrome and Safari
}else if (fullStorylinePlayer[0].msRequestFullscreen) {
fullStorylinePlayer[0].msRequestFullscreen(); // IE
}- SameekshaMis875Community Member
Thanks Michael! I will try this code.
- MichaelAnder569Community Member
You're welcome. Hopefully it will work for her. Sometimes code like that needs to be updated to keep up with changes made to the various browsers, so always test, test, test, and then test some more, :)
- MichaelAnder569Community Member
I did not test multiple slides, but the browser should stay full screen once set that way.
- RavindraGardi-1Community Member
Hi Michael and Community members,
I have tried this and working fine, but I have tested this on android Tab first screen is like below:
Actually I have given play button on first screen and once user click on play icon Full screen script is executing and this video is playing on same page, but video is not getting full screen, second screen is working fine. can you please tell me the cause? This is Published in storyline 2.
Hi Ravindra,
This discussion is quite a bit older, so I'm not sure if folks like Michael are still subscribed here. Perhaps you'll want to share a copy of your .story file here so that folks can take a look at the customizations you made?
Also, you could try reaching out to any users directly using the Contact Me button on their profile.
Best of luck with your course!
- MichaelAnder569Community Member
Ravindra, I'm sorry but even though I am subscribed to this page, I did not receive a notifcation that you had replied. Please let me know if you are still trying to work through this. If I don't reply here, please contact me directly.
- SameekshaMis875Community Member
Hi Michael Anderson,
I tried embedding the code in my Storyline source file on a click of a button. However if I click the next button of the player to move to the next slide, an error appears in Internet Explorer. The error says Incorrect function in app.min.js. I am unable to move to the next slide.
Also I tried adding a second slide in your source file (FullScreen_1.0) and the same problem occurs in that as well.
Any help will be highly appreciated.
- MichaelAnder569Community Member
Sameeksha, I see that error in IE and I'm looking at it now.
- SameekshaMis875Community Member
Thanks Michael!