June 16, 2017:
We're moving to a New Community!
https://talk.atomisystems.com/

Fullscreen API support for web browsers

0 like 0 dislike
asked Jun 7 in Support Questions by mitjad (340 points)
Hi,

is it possible to "hack" the exported HTML5 files of a project to make a HTL5 practice full screen using :Fullscreen API? I would especially lik it to work on Chrome for Android.

https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API

Thank  you

1 Answer

0 like 0 dislike
answered Jun 8 by phuongdv (39,310 points)

Hi,

Inserting following code into ACTIVEPRESENTER > Project Properties > Event will make content go to the Full Screen mode when clicking AutoFit/Actual Size button. However, if there are many tools in player, content will be clipped when viewing on mobile. You may need to hide some tools to avoid this problem.

if (!Prez.fullScreenCode){
    Prez.fullScreenCode = true;
    $("#btautofit").click(function() {
        if (UI.IsAutoFit()) {
            var vp = $('#ViewPortDiv')[0];
            if (vp) {
                 var rfs = vp.requestFullscreen || vp.webkitRequestFullScreen || vp.mozRequestFullScreen || vp.msRequestFullscreen;
                 if (rfs)
                     rfs.call(vp);
            }
        }
        else {
            var doc = $(document)[0];
            if (doc) {
                var efs = doc.exitFullscreen || doc.webkitExitFullscreen || doc.mozCancelFullscreen || doc.msExitFullscreen;
                if (efs)
                    efs.call(doc);
            }
        }
    });
}

Regards,

commented Jun 8 by mitjad (340 points)
Thank you, I will try.

BTW: This is the best support ever. And in so many forums they promote Adobe Captivate because of the support and community. We tested Captivate, but decided to go for Active presenter. And the price was not an issue. Great job guys.
commented Jun 8 by mitjad (340 points)

Hi, we tried but ...

After running the first view is like this

Then we press "Actual size" button. We get

Then we press that button "actual size" again, get the warning about Full screen view and it looks like ... too big.

commented Jun 9 by phuongdv (39,310 points)

Hi,

Maybe the toolbar contains many tool so the content can not fit to the screen size, as I mentioned in the answer, please hide some tools if possible. 

Since browser only allows going to Full Screen mode by an user's action so it is impossible to show content in this mode initially. For this reason and because the above code tries to sync the AutoFit mode with the Full Screen mode so the Initial Auto Fit State option should be set to No. The warning is shown by browser and it seems there is no way to control it.

Here is the test result on my Android device:

commented Jun 9 by mitjad (340 points)
Hi,

thank you, it works, although I have to click the Actual size button twice.

But it works.

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Aug 8, 2016 in Support Questions by Raynald Laroche
June 16, 2017:
We're moving to a New Community!
https://talk.atomisystems.com/

This Q&A community will be put in read-only mode and will retire soon.

1,643 questions

1,688 answers

1,738 comments

12,070 users

...