Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2005
    Posts
    35
    Plugin Contributions
    0

    Default Resizing embedded Youtube frames

    Hi.

    I've been running our website www.thedavidhall.org.uk on 1.3.9 using the standard template for a couple of years now and we've been very happy with it - especially the embedded Youtube clips showing the film or artist. Now however I want to upgrade to 1.5.4 and use a resizeable template. I made a copy testsite and loaded several resizeable plugins. All elements work well except the Youtube Iframes which, when shown on my mobile phone (Huaway) remain the same size, spilling over the side of the site.

    I understand that the Youtube embed code contains its size which is presumably what is causing the problem

    eg <p><iframe frameborder="0" height="315" src="https://www.youtube.com/embed/5JxhlxRc9U4" width="560"></iframe></p>

    Please can anyone advise me how it can be resolved so that Youtube resizes appropriately?

    Many thanks

    Tony
    Tony

  2. #2
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Resizing embedded Youtube frames

    Quote Originally Posted by rustwood View Post
    Hi.

    I've been running our website www.thedavidhall.org.uk on 1.3.9 using the standard template for a couple of years now and we've been very happy with it - especially the embedded Youtube clips showing the film or artist. Now however I want to upgrade to 1.5.4 and use a resizeable template. I made a copy testsite and loaded several resizeable plugins. All elements work well except the Youtube Iframes which, when shown on my mobile phone (Huaway) remain the same size, spilling over the side of the site.

    I understand that the Youtube embed code contains its size which is presumably what is causing the problem

    eg <p><iframe frameborder="0" height="315" src="https://www.youtube.com/embed/5JxhlxRc9U4" width="560"></iframe></p>

    Please can anyone advise me how it can be resolved so that Youtube resizes appropriately?

    Many thanks

    Tony
    You would need something like Zen Colorbox with the iframe code to load the video in, but it's still in bata and not ready yet. I'm finding there an issue with the frame not resizing when I think it should... haven't had time to figure it out just yet.

    The code for the video loads into an lightbox iframe which can size depending on the screen size or tilt. The needed code is not that hard to add to the existing download if the video is all your after.

    The link on the page would be something like this;
    Code:
    echo '<a class="youtube" href="http://www.youtube.com/embed/jYa1eI1hpDE?rel=0&amp;wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a>';
    With the script added to the autoload_default.php file
    Code:
    $(".youtube").colorbox({iframe:true, 
    <?php echo 
    'innerWidth:' . ZEN_COLORBOX_INITIAL_WIDTH . 
    ',innerHeight:' . ZEN_COLORBOX_INITIAL_HEIGHT .
    ',opacity:' . ZEN_COLORBOX_OVERLAY_OPACITY .
    ',speed:' . ZEN_COLORBOX_RESIZE_DURATION .
    ',overlayClose:' . ZEN_COLORBOX_CLOSE_OVERLAY; ?>
    });
    Dave
    Always forward thinking... Lost my mind!

 

 

Similar Threads

  1. Static body for resizing (How to keep the body from sliding and moving when resizing)
    By bjmhistory in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 26 Jan 2007, 12:28 AM
  2. Frames again
    By ebatte in forum Basic Configuration
    Replies: 3
    Last Post: 10 May 2006, 02:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR