This is the code used above.
This example does not use the codecs attributes and values which might not be absolutely necessary.
<video width="600" height="250" controls>
<source src="derrick_final_comp1.mp4" type="video/mp4">
<source src="derrick_final_comp1.webm" type="video/webm">
<source src="derrick_final_comp1.theora.ogv" type="video/ogg">
<p>Your browser does not support html5 video</p>
</video>
<video src="derrick_final_comp1.mp4" width="600" height="250" preload controls type="video/mp4"></video>
<video width="600" height="250" controls autoplay>
<source src="derrick_final_comp1.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="derrick_final_comp1.webm" type='video/webm; codecs="vp8, vorbis"'>
<source src="derrick_final_comp1.theora.ogv" type='video/ogg; codecs="theora, vorbis"'>
<!--fallback in case the users browser sucks-->
<p>Your browser does not support html5 video</p>
</video>
video {
width: 100%; ( or max-width to not get bigger than the videos actual size)
height: auto;
}
or use max-width to not get bigger than the videos actual size, and aspect-ratio to keep the video the rigth shape when it it responsive
video {
max-width: 100%;
height: auto;
aspect-ratio:16 / 9;
}
aspect-ratio is a bit new, but will help with keeping video the right shape, and can work on iframes from youtube as well.
16 / 9 is the typical shape for much, but NOT ALL video. For those of you that shoot vertical video(gross), it would be different.
It might be 9 / 16, for example.
Use the share button for youtube or vimeo files and choose embed. Copy the code to your page.
See this article for more help with making youtube responsive.
The aspect ratio property is OK for current browsers though.