Video
๐ Covered in this chapter:
<video> Element ยท poster Attribute ยท <source> Formats (MP4, WebM) ยท <track> WebVTT Subtitles ยท Responsive Aspect Ratio
Welcome to Phase 8 (Chapter 21): Video! Embed video playback natively with the HTML5
<video> element, WebVTT closed captions (<track>), poster preview images, and responsive video aspect ratios.
1Video Player with Captions Syntax
HTML โ Video Player with Captions
โถ Run in HTML Editor
<video controls poster="poster.jpg" width="640" height="360">
<source src="video.mp4" type="video/mp4">
<source src="video.webm" type="video/webm">
<track kind="subtitles" src="subtitles-en.vtt" srclang="en" label="English" default>
</video>