Skip to content

Instantly share code, notes, and snippets.

@gerbenvandijk
Created June 27, 2014 13:37
Show Gist options
  • Select an option

  • Save gerbenvandijk/cd452addc6f00be65c9d to your computer and use it in GitHub Desktop.

Select an option

Save gerbenvandijk/cd452addc6f00be65c9d to your computer and use it in GitHub Desktop.

Revisions

  1. Gerben van Dijk created this gist Jun 27, 2014.
    22 changes: 22 additions & 0 deletions html5video-basic-sources.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    <video width="1920" height="1080" poster="http://www.domain.com/assets/img/poster.jpg" autoplay loop preload muted>

    <source src="http://www.domain.com/assets/video/video.mp4" type="video/mp4" />
    <source src="http://www.domain.com/assets/video/video.webm" type="video/webm" />
    <source src="http://www.domain.com/assets/video/video.ogv" type="video/ogg" />

    </video>

    <!--
    The above element behaves like this:
    - Sets the width and height of the video element to 1920x1080 (can be overridden by CSS or even JS).
    - Sets a poster image to show before the video plays.
    - Makes the video play automatically as soon as possible.
    - Loops the video endlessly (unless it's paused by the user or programmatically).
    - Preloads the entire video in the background.
    - Does not give the user controls like play and pause.
    - Mutes the video's audio.
    - Provides a list of video sources and their mime type.
    -->