Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="full-bg">
  <video-js id="myPlayerID"
    style="object-fit: cover;">

<!-- This article text block will be displayed over the video background -->
<div id="article">
  <h1 id="videoTitle"></h1>
  <p id=videoDescription></p>

<script src="//"></script></div></div>



                /** The body style is just for the
 * background color of the codepen.
 * Do not include in your code.
body {
  background-color: #111;
  color: #fff;

/** The styles below are the ones
 *  essential to the sample

/* Style the container for the player */
.full-bg {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  z-index: -100;

/* Style the player within the container */
.full-bg .video-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

Make the video cover its container
.full-bg .vjs-tech {
  object-fit: cover;

/* Hide the player control bar */
.video-js .vjs-control-bar {
  display: none;

/* Remove click events on the player */
.video-js {
  pointer-events: none;

/* Style the article container and text */
#article {
  font-family: Agenda-Light, Agenda Light, Agenda, Arial Narrow, sans-serif;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  padding: 2rem;
  width: 33%;
  margin: 2rem;
  float: right;
  font-size: 1.2rem;
  position: absolute;
  top: 30px;
  right: 3em;

h1 {
  font-size: 3rem;
  text-transform: uppercase;
  margin-top: 0;
  letter-spacing: 0.3rem;



                videojs.getPlayer('myPlayerID').ready(function() {
  // Get a reference to the player
  var myPlayer = this;

  // +++ Set the playlist to repeat +++

  // +++ Display the title and description +++
  myPlayer.on("loadstart", function() {
    videoTitle.textContent =;
    videoDescription.textContent = myPlayer.mediainfo.description;