videojs-constant-timeupdate

Adds a new event constant-timeupdate to player - an alternative to timeupdate event which will be triggered on a constant interval unlike timeupdate

Usage no npm install needed!

<script type="module">
  import videojsConstantTimeupdate from 'https://cdn.skypack.dev/videojs-constant-timeupdate';
</script>

README

videojs-constant-timeupdate

Adds a new event constant-timeupdate to player - an alternative to timeupdate event which will be triggered on a constant interval unlike timeupdate

Installation

npm install --save videojs-constant-timeupdate

Usage

To include videojs-constant-timeupdate on your website or web application, use any of the following methods.

<script> Tag

This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs global is available.

<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-constant-timeupdate.min.js"></script>
<script>
  var player = videojs('my-video');
  player.constantTimeupdate({
      interval: 1000,
      roundFn: Math.round
  });
</script>

License

MIT. Copyright (c) Arjun Ganesan <me@arjun-g.com>