Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

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

Packages

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.

Behavior

Save Automatically?

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.

HTML

              
                <!-- styles for the SSAI plugin -->
<link href="//players.brightcove.net/videojs-ssai/1/videojs-ssai.css" rel="stylesheet">

<!-- player embed code with added id attribute -->
<video-js id="myPlayerID"
   data-account="1752604059001"
   data-player="default"
   data-embed="default"
   data-application-id
   class="video-js"
   controls></video-js>
<script src="https://players.brightcove.net/1752604059001/default_default/index.min.js"></script>

<!-- script for the SSAI plugin -->
<script src="https://players.brightcove.net/videojs-ssai/1/videojs-ssai.js"></script>
              
            
!

CSS

              
                /* * The body style is just for the
 * background color of the codepen.
 * Do not include in your code.
 */
body {
  background-color: #111;
  color: #fff;
}
/*
 * Styles essential to the sample
 * are below
 */
/* size the player */
.video-js {
  width: 640px;
  height: 360px;
}
              
            
!

JS

              
                videojs.getPlayer('myPlayerID').ready(function() {
  // replace the value below with your ad config id
  var myPlayer = this,
			adConfigId = "d6190656-2095-4ff3-8afe-1a0b60d67ed2";

  // get a reference to the player
  var myPlayer = videojs.getPlayer('myPlayerID');
  // initialize the SSAI plugin
  myPlayer.ssai();
  // use the catalog object to retrieve a video from your Video Cloud library. Replace the video id below with your own value. Notice that the ad config id is passed as a parameter for the getVideo() call.
  myPlayer.catalog.getVideo("5625751316001", function(error, video) {
    if (error) {
      // if there was an error retrieving the video, then set the error.
      myPlayer.error(error);
    } else {
      // load the video object in the player
      myPlayer.catalog.load(video);
      // uncomment the next line to autoplay the video
      //myPlayer.play();
    }
  }, adConfigId);
});
              
            
!
999px

Console