treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Fitvids - make it respect original embed width?

  • So I'm using fitvids.js on a simple youtube embed - is there any way to make fitvids just respect the iframe width/height values and only become responsive after that point?

  • To make videos responsive, I generally use Elastic Videos, rather than a Javascript solution, so you may want to give that a look. I've worked up a CodePen where the video is responsive after the min-width of 560px is reached.

    Unfortunately, I don't have experience with Fitvids so I can't help you if you're tied to using it.

  • Thanks for that - I may well end up using it.

    I welcome any other suggestions in the meantime!