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

              
                <!-- Set the Player size using a responsive div container-->
<div style="width:25%;">
  <!-- EXAMPLE PLAYER START -->
<!-- The script tag should live in the head of your page if at all possible -->
<script type="text/javascript" async src="https://play.vidyard.com/embed/v4.js"></script>


<!-- Put this wherever you would like your player to appear -->
<img
style="width: 100%; margin: auto; display: block;"
  class="vidyard-player-embed"
  src="https://play.vidyard.com/EPLHxfDKwSdr96WDiR3ReZ.jpg"
  data-uuid="EPLHxfDKwSdr96WDiR3ReZ"
  data-v="4"
  data-type="inline"
/>
<!-- EXAMPLE PLAYER END -->
</div>

<!-- First script will receive a chapter (video) number from the HTML 'onclick' and play from the beginning of that specific video. '0' is the first video in the playlist, '1' is the second etc-->
<script type="text/javascript">
 function playChapter(chapter) {
 var video = VidyardV4.players[0];
 video.playChapter(chapter);
 video.play();
 }
</script>

<!-- Second script will receive a second timestamp number from the HTML 'onclick' and play from that second of a specified video. e.g. 1min10sec = '70'. Change the video.playChapter(1) number to make sure you are targeting the correct video-->
<script type="text/javascript">
 function playSecond(chap,time) {
 var video = VidyardV4.players[0];
 video.playChapter(chap);
 video.seek(time);
 video.play();
 }
</script>


<!--Start of API Function-->
  
<script type="text/javascript">
  
// Add video title to link
  
//wait for api ready
window.onVidyardAPI = (vidyardEmbed) => {
vidyardEmbed.api.addReadyListener((_, player) => { 
  
//get titles for each chapter
var vtitle2 = VidyardV4.players[0].metadata.chapters_attributes[1].video_attributes.name;
  var vtitle3 = VidyardV4.players[0].metadata.chapters_attributes[2].video_attributes.name;

//set titles for each chapter
document.getElementById('title2').innerHTML = vtitle2;
document.getElementById('title3').innerHTML = vtitle3;
   })
}
</script>


<!-- Example links-->

<div id="chapter2"><a href="#" onclick="playChapter(1)">Play Chapter 2 -<div id="title2"></div></a>
  
  </br>

<div id="chapter3"><a href="#" onclick="playSecond(2,20)">Play Second #20 of Chapter 3 -<div id="title3"></div></a></p>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console