videojs-constant-timeupdate
v1.0.0
Published
Adds a new event `constant-timeupdate` to player - an alternative to `timeupdate` event which will be triggered on a constant interval unlike `timeupdate`
Downloads
97
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 <[email protected]>