Skip to content

a videojs plugin that can disable/enable the progress bar from being scrubbed

License

Notifications You must be signed in to change notification settings

rsadwick/videojs-disable-progress

Repository files navigation

Disable Progress

This videojs plugin allows you to disable video progress. Useful for preroll videos where you need to disable the user from progressing/scrubbing the video.

Getting Started

Download videojs

In your web page:

var enabled = false;

videojs("example_video_1").ready(function () {
    this.disableProgress();

    if(enabled){
       this.disableProgress.enable();
    }
    else{
        this.disableProgress.disable();
    }
});

Want to auto disable the controls, use the autoDisable option:

videojs("example_video_1").ready(function () {
  var player = this;
  player.disableProgress({
    autoDisable: true
  });
});

Use the tiny api to enable/disable through js:

videojs("example_video_1").ready(function () {
  var player = this;
  player.disableProgress();

  //something changes where you need to disable:
  player.disableProgress.disable();

  //some awesome event happens when you need to enable:
  player.disableProgress.enable()
});

Example

jsfiddle example

Examples

Check out example.html to see Disable Progress in action.

About

a videojs plugin that can disable/enable the progress bar from being scrubbed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published