Cloudinary Video Player

VAST and VPAID

Single video with ads

Playlist with Ads

Ads and monetization documentation

Example Code:

      

        <video
          id="player"
          playsinline
          controls
          muted
          class="cld-video-player"
          width="500">
        </video>

        <video
          id="player-playlist"
          playsinline
          controls
          muted
          autoplay
          class="cld-video-player"
          width="500">
        </video>

      
      

        player1 = cloudinary.videoPlayer('player', {
          cloud_name: 'demo',
          ads: {
            adTagUrl: AD_TAG_URL,
            debug: true
          }
        });

        player1.source('elephants');

        player2 = cloudinary.videoPlayer('player-playlist', {
          cloud_name: 'demo',
          ads: {
            adTagUrl: AD_TAG_URL,
            debug: true
          }
        });

        player2.playlistByTag('video_race', {
          autoAdvance: true,
          repeat: true,
        }).then(function() {
          var divElem = document.querySelector("#playlist-data");
          var list = player2.playlist().list().map(function(source) {
            return source.publicId()
          }).join(', ');

          divElem.innerText = "Playlist: " + list
        });