Cloudinary Video Player

Fluid Layouts

Full documentation

Example Code:

      

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

        <button id="toggle-fluid" class="btn btn-default">Disable Fluid</button>

      
      

        var cld = cloudinary.Cloudinary.new({ cloud_name: 'demo' });

        // Initialize player
        var player = cld.videoPlayer('player');

        // Define source
        var source = { publicId: 'snow_horses', info: { title: 'Snow Horses', subtitle: 'A movie about horses' } };

        // Play source
        player.source(source).play();

        // Handle Fluid toggle button
        document.querySelector("button#toggle-fluid").addEventListener("click", function() {
          isFluid = !player.fluid()
          player.fluid(isFluid);

          this.innerHTML = isFluid ? 'Disable Fluid' : 'Enable Fluid'
        });