Solved ! - Scale document to window size and fullscreen

Yeah Chrome works fine so it must be a Mozilla issue. Shame :confused:

The template works fine, but as soon I try to get the background rectangle (or any image) flexible to fill witdth and height, the page loads in a bigger size the first time. If you resize the browser window or press any of the fullscreen buttons, the page recover the flexible layout. Any ideas if this can be fixed?
Attached is my modified template
Many thanks!
fullscreenflexible.hype.zip (24.7 KB)

@DBear button:
fullscreen-vDBear.hype.zip (19.7 KB)

1 Like

So I have been using this template for a while now but now I noticed that it messes up video controls on Safari. Video controls do not show up. Is there any fix for that?

Thanks and I appreciate your help!

Greg

Do you have ‘controls’ setup for the video?

01%20AM

Are you using an external service? (If you can share a link that would be great)

If you’re using an external hosting service that uses iframes, you may need to ensure you have the allowfullscreen option in place: https://www.allowfullscreen.com

1 Like

Very nice project @kerguelen! Maybe this will be very helpful to me. I want to make something close to it but with videos.
I'm wondering can I use the "exitFullscreenWorks" code to close video after it finished? Something like this:

	var video = hypeDocument.getElementById('video1');    
video.onended = function(e) {
if (document.exitFullscreen) {
document.exitFullscreen();}else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();}else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();}

But maybe I'm getting wrong somewhere with the syntax because it not works...

1 Like

Hello,
Thanks for your comment.
I'm not sure what kind of video you want to use. Embeded youtube or built in project video ?

Unless it was a paste issue, you are missing a } at the end to close the function. Otherwise it works with HTML5 video for me, but as @kerguelen suggests may not work with other videos that occur within an embed/iframe.

Hmmm, I'm not familiar with the coding maybe thats why I was missed the }.
This is my file:
Video_vExitFullScr.zip (1.6 МБ)

My idea is that if the user has watched the video in full screen, after its end it will automatically exit the full screen.

I will use built in project video @kerguelen .

1 Like

As far as I can tell, you have two problems:

  1. You gave the video a unique element ID of video3 but the code references video1. You should change them to match.

  2. Nothing triggers the untitledFunction() that adds the onended handler for the video. You should setup an On Scene Load handler to Run JavaScript that is set to this function.

Then it should work!

1 Like

Oh! Yes, sorry about that! You're right!
Thank you!

1 Like

3 posts were split to a new topic: Troubleshooting scaling