Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Fullscreen iFrame?

Is it possible to open a Fullscreen iFrame and if so how because I see nowhere example sources on the site.
Second I installed Lightview but there is no example page what i must do to make an iFrame work? Can you explain me what I must fill in inside the HTML?

Comments

  • edited November 2016

    Set the width and height to '100%'

    <a href="http://www.jquery.com" 
       class="lightview" 
       data-lightview-type="iframe"
       data-lightview-options="width: '100%', height: '100%'">Fullscreen iframe</a>
    

    Or with the API:

    Lightview.show({
      url: 'http://www.jquery.com',
      type: 'iframe',
      options: {
        width: '100%',
        height: '100%'  
      }
    });
    
  • Thanks Nick and just one more question. If you look at the demo site www.regio.tv/clients/playfilm/iframe/index.html the background had a darkgrey color. I don't want this color so it must be transparent. Where can I change that color??

  • I put your code :smile:
    Fullscreen iframe

    inside my HTML file, but it show me not a Fullscreen iframe??

  • edited November 2016

    The link on that page works for me, there will always be some spacing around the box to allow for UI elements, like the close and previous/next buttons. You can change that using the spacing option.

    Putting a transparent background on a page loaded in an iframe doesn't work everywhere, I recommend avoiding it.

  • 1) the video is smaller then the frame. I can't make the video larger because the height and with are 100%. What can I do?
    2) Can you give me that darkgrey color and where I can find it?

    Many thanks!!

  • edited November 2016

    I noticed you're loading a youtube video in the iframe. My latest lightbox has built in support for youtube, it might be better alternative:

    http://frescojs.com

    It removes the need to work with iframes yourself, all it needs is a youtube link and the embedding is done for you. It only supports actual fullscreen-mode though, which you toggle using the fullscreen button in the youtube player. For regular display it accepts pixels only, defaulting to 1280x720.

  • Thanks Nick but this is not a YouTube video. It's an interactive video with a clutch to YouTube. When you watch the source you can see that the URL is not a YouTube video!

  • Nick, one question before I buy the commercial version : The Lightbox is perfect, but I want to make an iFrame of this to put it on another server by the client, so the client must be only put an iframe on his site. When I do that, I did not see the Lightbox anymore?
    Example : www.regio.tv/clients/playfilm/iframe/aanroep.html

    What do I wrong?

  • edited November 2016

    I guess you a running into cross domain security issues. Best to host the iframe yourself and setup your server to allow cross domain access, so the client can just point to a url the same way you embed a youtube video through an iframe.

Sign In or Register to comment.