Created by Wayne Warner / @wawjr3d
Implementing a responsive site that needs a video player:
Goal: Turn a fixed dimension video into a responsive video
Is flash fallback responsive w/ HTML5 solution?
.video-container {
position: relative;
width: 100%;
height: 0;
padding-bottom: (1 / aspect ratio) * 100%;
/* 16:9 => 56.25%, 4:3 => 75% */
}
video,
object,
embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Everywhere! (Firefox, Chrome, all IEs)
We got everything we want! (and no javascript)