[wp-trac] [WordPress Trac] #24134: Video Shortcode ignores sizes and aspect ratio

WordPress Trac noreply at wordpress.org
Fri Apr 19 11:30:51 UTC 2013


#24134: Video Shortcode ignores sizes and aspect ratio
--------------------------+--------------------
 Reporter:  Ipstenu       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.6
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+--------------------
Changes (by kovshenin):

 * cc: wonderboymusic (added)
 * keywords:  needs-patch => has-patch


Comment:

 It [https://github.com/johndyer/mediaelement/blob/master/src/js/mep-
 player.js#L738-L739 looks like] MediaElement.js is reading the `max-width`
 CSS property and ignoring the specified width and height if it's 100%,
 which is the case in both Twenty Thirteen and Twenty Twelve. It's what
 makes both themes responsive.

 I think MediaElement.js is making the wrong assumption here, but it's what
 makes the video responsive.

 A workaround would be to wrap the `video` element with a div, so that even
 if the video's width is set to 100%, it is still constrained by the parent
 block, and still responsive because both elements would have a 100% max-
 width. This, however, does not work for the video height. See
 [attachment:24134.diff].

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24134#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list