WordPress.org

Ready to get started?Download WordPress

Forums

Featured Video
responsive video (1 post)

  1. h3p315t05
    Member
    Posted 7 months ago #

    I modified the plugin to meet my requirements add made it responsive.
    Please add this funktion in your next update

    Here the way i did this:

    added this in style.css :

    .elastic-video {
        height: 0;
        margin-bottom: 20px;
        overflow: hidden;
        padding-bottom: 55%;
        padding-top: 15px;
        position: relative;
    }
    .elastic-video iframe {
        height: 100%;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
    }

    Then added this to featured-video.php :

    add_action('wp_head','featuredvideo_style');
    
    function featuredvideo_style(){
      echo '<link rel="stylesheet" href="' . rtrim(get_settings('siteurl'), '/') .  '/wp-content/plugins/featured-video/style.css" type="text/css" media="screen" />';
    }

    And I modified the embed code by adding a div tag around the embed code with class="elastic-video" .
    Example:
    line 169 in featured-video.php:

    echo '<div class="elastic-video"><iframe width="'.$width.'" height="'.$height.'" src="http://www.youtube.com/embed/'.$id.'?wmode='.$wmode.'" frameborder="0" '.$fs.'></iframe></div>';

    http://wordpress.org/plugins/featured-video/

Reply

You must log in to post.

About this Plugin

About this Topic