Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap auto resize video for screen size

I'm trying to decide between using Bootstrap and Foundation for front end work for a node.js express route. I was wondering if Bootstrap had any way to have an equivalent the Flex Video feature of Foundation (its an auto resizing based on screen size as far as I can tell)?

Edit: Regarding Peter Wooster's answer if there a solution that can be done easily without a framework why do people make such a big deal about Flex-Video then?

like image 593
Bren Avatar asked Jun 29 '14 00:06

Bren


People also ask

How do I fit a video into a div?

To auto-resize an image or a video to fit in a div container use object-fit property. It is used to specify how an image or video fits in the container. object-fit property: This property is used to specify how an image or video resize and fit the container.

Which aspect ratio is used with responsive video in bootstrap?

4:3 aspect ratio.


1 Answers

Bootstrap has responsive embeds: http://getbootstrap.com/components/#responsive-embed

Gratuitous example solely to avoid silly annoying SO bureaucrats from complaining about "link-only answer":

<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
  <iframe class="embed-responsive-item" src="…"></iframe>
</div>
like image 137
cvrebert Avatar answered Oct 02 '22 15:10

cvrebert