Before you ask please READ THIS

Embedded Video Aspect Ratio Problem

edited January 2017 in FatMoon Posts: 26
Hi there!

Embedded Videos do not resize correctly (screenshot attached).

All iframe videos do have a fixed width (800) and height (450) baked in. max-width: 100% will fix the width but the height will always be 450px.

I tried width:100% and height: auto but this will leave me with a height of 150px. So that won't be any help in single post view.

Examples:
http://www.jenslumm.com/tag/video/

Is there a way to fix that? Thanks a lot for any help.
Skizze.png
818 x 886 - 160K
Post edited by milesdeelite on

Comments

  • AirAir
    Posts: 10,970
    Hello:-)

    Yes, this is work for JavaScript, as WordPress give em this dimension by default.

    Please try such fix:
    Go to fatmoon/js/script.js line ~117, find there:
    
    		runPlugins : function(){
    			//Resize iframe videos (YT, VIMEO)
    			$("div.post-media").fitVids();
    		},
    and change it to
    
    		runPlugins : function(){
    			//Resize iframe videos (YT, VIMEO)
    			$("div.post-media").fitVids();
    			$("div.real-content").find('p').fitVids();
    		},
    Please tell me later did this worked for you.

    With kind regards.
  • It worked. Thanks a lot!
  • AirAir
    Posts: 10,970
    Thanks for info - added to update.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!