Video Attributes and Media Support

video_library Media File Support

Different browsers support different video formats and codecs

public
Chrome
public
Firefox
public
Edge
public
Safari
movie MP4: H.264 video + AAC audio
movie WebM: VP8/VP9 video + Vorbis/Opus audio
movie OGG: Theora video + Vorbis audio

warning Compatibility Considerations

Mobile vs Desktop: Different support levels
Software dependency: May rely on installed software
Multiple formats: Provide files in different formats
lightbulb Best Practice

Always provide multiple source formats to ensure maximum compatibility across browsers

source Multiple Source Elements

<video controls>
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  <source src="video.ogv" type="video/ogg">
  Your browser doesn't support HTML5 video.
</video>
type attribute: Helps browser determine if it can play the file
Fallback content: Displayed if no sources are supported

settings Additional Video Attributes

autoplay: Starts playing automatically
loop: Restarts when finished
muted: Mutes the audio by default
preload: Hints how much to preload