Skip to content

Instantly share code, notes, and snippets.

@theredstapler
Created February 8, 2016 09:12
Show Gist options
  • Save theredstapler/00427796401036c0cd78 to your computer and use it in GitHub Desktop.
Save theredstapler/00427796401036c0cd78 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<head>
<title>Test Video.js</title>
<link href="video-js.min.css" rel="stylesheet">
<style>
body {
background-color:#000000;
}
#testdiv {
background-color:#ffffff;
position:absolute;
height:600px;
width:800px;
top:10px;
left:400px;
}
</style>
<style>
.videojs-background-wrap {
overflow:hidden;
position:absolute;
height:100%;
width:100%;
top:0;
left:0;
z-index: -998;
}
</style>
</head>
<body>
<div id="testdiv"></div>
<video id="bgvid1" class="video-js vjs-default-skin" width="100%" height="100%" loop>
<source src="testvideo2.mp4" type='video/mp4'>
</video>
<script src="video.min.js"></script>
<script src="videojs-background.js"></script>
<script>
videojs('bgvid1').Background();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment