WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/29/2014 12:46:15 AM (7 years ago)
Author:
wonderboymusic
Message:

Don't hardcode height for videos - this was a workaround for MediaElement internals causing problems. Responsive videos now work properly and don't cause extra whitespace.

Fixes MediaElement by hand in the interim: https://github.com/johndyer/mediaelement/pull/1337
Video playlists were completely broken by this.

Fixes #30078.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r30068 r30082  
    18561856    $html .= '</video>';
    18571857
    1858     $width_rule = $height_rule = '';
     1858    $width_rule = '';
    18591859    if ( ! empty( $atts['width'] ) ) {
    18601860        $width_rule = sprintf( 'width: %dpx; ', $atts['width'] );
    18611861    }
    1862     if ( ! empty( $atts['height'] ) ) {
    1863         $height_rule = sprintf( 'height: %dpx; ', $atts['height'] );
    1864     }
    1865     $output = sprintf( '<div style="%s%s" class="wp-video">%s</div>', $width_rule, $height_rule, $html );
     1862    $output = sprintf( '<div style="%s" class="wp-video">%s</div>', $width_rule, $html );
    18661863
    18671864    /**
Note: See TracChangeset for help on using the changeset viewer.