The Video Function


Home Forums Front-end Questions The Video Function

This topic contains 2 replies, has 2 voices, and was last updated by  pedroheitor 2 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42462

    pedroheitor
    Member

    Using the The Video Function

    <?php
    $video = new youtube_video();
    echo $video->video();
    ?>

    will not make the video responsive. How can I make it responsive?

    #42463

    admin
    Keymaster

    Try this and let me know if it works:

    <?php
    $video = new youtube_video(['video_responsive'=>true]);
    echo $video->video();
    ?>
    #42464

    pedroheitor
    Member

    no, didn’t work for me. But I did manage to make it work using the video_url(); it’s all I need anyway

      <div class="videoWrapper" style="position: relative;
    	padding-bottom: 56.25%; /* 16:9 */
    	padding-top: 25px;
    	height: 0;margin-bottom: 20px;">
                <iframe style="position: absolute;
    	top: 0;
    	left: 0;
    	width: 100%;
    	height: 100%;" width="560" height="349" src="<?php
                $video = new youtube_video();
                echo $video->video_url();
                ?>?rel=0&hd=1" frameborder="0" allowfullscreen></iframe>
            </div>
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.



Copyright © 2013 Ternstyle LLC. All rights reserved.
site design: ternstyle.us