JSFiddle - React, Tailwind, and code Playground

by Ea Bangalore

HTML

<link rel="stylesheet" href="http://3ee.com/videojs/videojs-disable-progress/libs/video-js-4.1.0/video-js.css">
<script src="http://3ee.com/videojs/videojs-disable-progress/libs/video-js-4.1.0/video.dev.js"></script>
<script src="http://3ee.com/videojs/videojs-disable-progress/src/videojs.disableProgress.js"></script>
<p class="example-description">You can see a player configured with the Disable UI plugin below. Check out the page source to see an example of how to configure the plugin yourself.</p>
<video class="video-js vjs-default-skin" src="http://vjs.zencdn.net/v/oceans.mp4" data-setup="{}" controls></video>

JavaScript

var

// save a reference to the video element
video = document.querySelector('video'),

// save a reference to the video.js player for that element
player = videojs(video);

// initialize the plugin, passing in autoDisable
player.disableProgress({
    autoDisable: true
});

var timeCode = {
    start: 3,
    end: 9
}

player.on('timeupdate', function (e) {
    if (this.currentTime() >= timeCode.start && this.currentTime() <= timeCode.end) {
        this.disableProgress.disable();
    } else {
        this.disableProgress.enable();
    }
});