Hey folks I’m using Chris’ fluid width YouTube videos script:
https://css-tricks.com/fluid-width-youtube-videos
Problem is, doesn’t seem to work when you have videos of different aspect ratios. I believe the script is hunting for the width and height of the first embed on the page, then when it finds them, it uses them to resize every other object on the page. So if the first video is 640×480, and the second video is 1280×720, the 1280×720 player gets resized to a 4×3 rectangle…
How do I fix this? You’d have to make the script check every set of width/height coordinates on the page… Would you use .each()? I gave that a shot but couldn’t quite figure it out.
Thanks in advance for any advice!