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.


                <!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Cloudinary Multi Codec Adaptive Streaming</title>

<!-- Bootstrap -->

<link rel="stylesheet" href="" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<link rel="stylesheet" href="//">
<link href="" rel="stylesheet">
<link href="/style.css" rel="stylesheet">
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src=""></script>
<!-- Bootstrap -->
<script src="" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="//"></script>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src=""></script>
  <script src=""></script>
    <div class="container p-4">
        <nav class="nav mb-2">
            <a href="index.html"><< Back to examples index</a>
        <h1 class="text-primary">Cloudinary Multi-Codec Adaptive Bitrate Streaming</h1>
        <h3 class="text-primary mb-4">Adaptive streaming</h3>
      <p>More information on the concept here: <a href="" target="_blank"></a></p>
        <p>The player supports adaptive streaming formats such as HLS and MPEG-DASH: <br />
          <b>HLS</b> is supported out-of-the-box and is already bundled in the player's package. <br />
          <b>MPEG-DASH</b> support can be added by including 'dash.js' and 'videojs-contrib-dash' packages (example below).<br /><br />
          Simply set 'sourceTypes' to the desired format ('dash' or 'hls'). You can define a desired streaming
          profile ('sd', 'hd', etc') using the 'transformation' param.
      <p>You'll notice a bit of logic to determine which manifest to use based on which codecs this browser supports.  The most efficient codec will automatically be chosen for you!</p>
        <div class="video-container mb-5">
              class="cld-video-player cld-video-player-skin-dark">
<!-- Cloudinary Video Player Dependencies -->
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
  <!-- Actual code -->
  <script type="text/javascript">
    // var cld ={cloud_name: "miki-cloudinary", secure: true});
    var cld ={cloud_name: "demo-robert", secure: true});
function supportsVideoType(type) {
  let video;

  let formats = {
    h264: 'video/mp4; codecs="avc1.42E01E"',
    vp9: 'video/webm; codecs="vp9"',
    h265: 'video/mp4; codecs="hevc"'

  if(!video) {
    video = document.createElement('video')

  return video.canPlayType(formats[type] || type);

if(supportsVideoType('h265') === "probably" || supportsVideoType('h265') === "maybe") {
  var videoManifest = 'hls',
  videoCodec = 'h265';
else if(supportsVideoType('vp9') === "probably") {
  var videoManifest = 'dash',
  videoCodec = 'vp9';
else {
  var videoManifest = 'hls',
  videoCodec = 'h264';
  var demoplayer = cld.videoPlayer('example-player', {
      publicId: 'ouch',
      fluid: true,
      loop: false,
      controls: true,
      autoplayMode: 'never',
      transformation: {streaming_profile:'16x9_'+videoCodec+'_text2'},
      sourceTypes: [videoManifest]

    // playerMp4.source('videos/product-care/Store_Your_Parka_-_EN_MASTER_NO_FAQLINK-', { sourceTypes: ["hls", "mp4", "webm"] }).play();
    // playerDash.source('oceans', { sourceTypes: ['dash'], transformation: { streaming_profile: 'hd' }, info: { title: "MPEG-DASH" } }).play();