Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.8 KiB

5 years ago
​
  1. /*! @name videojs-offset @version 2.1.0 @license MIT */
  2. !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["video.js"],e):(t=t||self).videojsOffset=e(t.videojs)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={},i=t.registerPlugin||t.plugin,r=function t(){var e=this.currentTime();e<0&&(this.currentTime(0),this.play()),this._offsetEnd>0&&e>this._offsetEnd-this._offsetStart&&(this.off("timeupdate",t),this.pause(),this.trigger("ended"),this._restartBeginning?(this.trigger("loadstart"),this.currentTime(0)):this.currentTime(this._offsetEnd-this._offsetStart))},n=function(i){var n=this;i=i||{};var s=this.constructor;this._offsetStart=parseFloat(i.start||"0"),this._offsetEnd=parseFloat(i.end||"0"),this._restartBeginning=i.restart_beginning||!1,s.__super__&&s.__super__.__offsetInit||(s.__super__={__offsetInit:!0,duration:s.prototype.duration,currentTime:s.prototype.currentTime,bufferedPercent:s.prototype.bufferedPercent,remainingTime:s.prototype.remainingTime},s.prototype.duration=function(){return this._offsetEnd>0?this._offsetEnd-this._offsetStart:s.__super__.duration.apply(this,arguments)-this._offsetStart},s.prototype.currentTime=function(t){return void 0!==t?s.__super__.currentTime.call(this,t+this._offsetStart):s.__super__.currentTime.apply(this)-this._offsetStart},s.prototype.remainingTime=function(){return this.duration()-this.currentTime()},s.prototype.startOffset=function(){return this._offsetStart},s.prototype.endOffset=function(){return this._offsetEnd>0?this._offsetEnd:this.duration()}),this.ready(function(){var s;s=n,t.mergeOptions(e,i),s.one("play",function(){s.on("timeupdate",r)})})};return i("offset",n),n.VERSION="2.1.0",n});