Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HTML5 Self Hosted Video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Video</title>
<link href="//vjs.zencdn.net/4.6/video-js.css" rel="stylesheet">
<style type="text/css">
html, body {
margin: 0px;
padding: 0px;
}
</style>
<script type="text/javascript">
document.createElement('video');document.createElement('audio');document.createElement('track');
</script>
</head>
<body>
<video id="video" class="video-js vjs-default-skin vjs-big-play-centered"
controls preload="auto"
width="100%" height="100%"
poster="http://video-js.zencoder.com/oceans-clip.png">
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
<script src="//vjs.zencdn.net/4.6/video.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.