Use CSS width property for a responsive video player

To make your video player responsive, use the width property and set it to 100%


Live Demo

<!DOCTYPE html>
      <meta name = "viewport" content="width=device-width, initial-scale=1.0">
            video {
               width: 100%;
               height: auto;
      <video width = "300" controls autoplay>
         <source src = "/html5/foo.ogg" type = "video/ogg" />
         <source src = "/html5/foo.mp4" type = "video/mp4" />
      <p>To check the effect, you need to resize the browser.</p>