Git Product home page Git Product logo

Comments (5)

own3mall avatar own3mall commented on June 9, 2024

With this fix, the only way I can get iframe content to truly go into full screen is to add the "webkitAllowFullScreen" property to the iframe. "allowfullscreen" is not enough.

Example:

<iframe src="{WEBPAGE_WITH_BIGSCREEN_STUFF_HERE}" allowfullscreen webkitAllowFullScreen></iframe>

That's the only way I can get it to work. webkitAllowFullScreen must be added to the iframe.

from bigscreen.

bdougherty avatar bdougherty commented on June 9, 2024

I think this is actually by design. BigScreen.enabled should only be true if calling BigScreen.request would actually work. If you don't have webkitallowfullscreen added to the iframe, that request won't work.

If all you're interested in is doing fullscreen for a video (which is most of the reason this library exists), BigScreen.videoEnabled(video) is there to check for that. There's an older fullscreen api that works only on videos that is enabled even if the iframe lacks the fullscreen attribute.

from bigscreen.

own3mall avatar own3mall commented on June 9, 2024

No, in my case, I want the body of the entire HTML document in the iframe to go fullscreen. Without my changes, it won't go fullscreen in Safari when there is no reason for it to NOT go into fullscreen.

Basically, it should go fullscreen since it works just fine, but BigScreen.enabled is false until my changes are made due to checking a property that doesn't exist on the dom in an iframe.

from bigscreen.

bdougherty avatar bdougherty commented on June 9, 2024

Can you make a CodePen or JSFiddle that shows that it works? The fullscreen request should fail without the webkitallowfullscreen attribute on the iframe.

from bigscreen.

own3mall avatar own3mall commented on June 9, 2024

Please test the attached HTML file in all browsers. When you click on the image in each iframe, the image should go fullscreen. Try it in Safari. When you click on the first image in the iframe, the image does not go fullscreen. The bottom iframe works as expected which contains the changes I made to BigScreen.js

This issue is not related to having the "webkitAllowFullScreen" attribute present on the iframe. It is however required to get it to work with my changes.

test_in_safari.zip

from bigscreen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.