Skip to content

Instantly share code, notes, and snippets.

@caseysoftware
Last active January 2, 2016 07:05
Show Gist options
  • Save caseysoftware/eb0c9ea4e1e32bdc5cea to your computer and use it in GitHub Desktop.
Save caseysoftware/eb0c9ea4e1e32bdc5cea to your computer and use it in GitHub Desktop.
This is a sample snippet of how to embed captions within the video.js player. This is used in the closed captioning post.
<video id="clarify_video" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="264"
data-setup='{"example_option":true}'>
<source src="http://example.com/clarify-video.mp4" type='video/mp4' />
<source src="http://example.com/clarify-video.webm" type='video/webm' />
<source src="http://example.com/clarify-video.ogv" type='video/ogg' />
<track kind="captions" src="http://example.com/path/to/captions.vtt" srclang="en" label="English" default>
</video>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment