DEV Community

Discussion on: HTML5 tags - how do they work, and which ones should I use?

Collapse
 
dylanjha profile image
Dylan Jhaveri

What about the html5 <video> tag? It kind of works... but it has a lot of caveats. For example: using the controls attribute results in a different UI in different browsers. If the src is an HLS video it will work in Safari but not in Chrome, Firefox.

autoplay is its own beast of unreliability. It works sometimes in chrome (if the user has a high Media Engagement Index with that particular site, otherwise it gets blocked. autoplay has a higher probability of working (but not always) if the video also has the muted and playsinline attribute.

Collapse
 
bholmesdev profile image
Ben Holmes

Agreed, that's a pretty big HTML5 addition! But I decided not to include it for the complexities you mentioned here. It really is a ton of elements laced together "web component" style, which makes it hard to customize and control.

That said, it's definitely an element you'll use for all your embedded videos. Worth more of a Stack overflow deep dive than a bullet point here tho 😁