Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-video-timeline

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-video-timeline - npm Package Compare versions

Comparing version 0.1.1 to 0.1.4

341

bundles/ngx-video-timeline.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('dayjs'), require('rxjs'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-video-timeline', ['exports', '@angular/core', 'dayjs', 'rxjs', '@angular/common'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-video-timeline"] = {}, global.ng.core, global._moment, global.rxjs, global.ng.common));
})(this, (function (exports, i0, _moment, rxjs, common) { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ngx-video-timeline'] = {}, global.ng.core, global._moment, global.rxjs, global.ng.common));
}(this, (function (exports, i0, _moment, rxjs, common) { 'use strict';

@@ -16,3 +16,5 @@ function _interopNamespace(e) {

enumerable: true,
get: function () { return e[k]; }
get: function () {
return e[k];
}
});

@@ -22,3 +24,3 @@ }

}
n["default"] = e;
n['default'] = e;
return Object.freeze(n);

@@ -30,15 +32,28 @@ }

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
var NgxVideoTimelineService = /** @class */ (function () {
function NgxVideoTimelineService() {
}
return NgxVideoTimelineService;
}());
NgxVideoTimelineService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function NgxVideoTimelineService_Factory() { return new NgxVideoTimelineService(); }, token: NgxVideoTimelineService, providedIn: "root" });
NgxVideoTimelineService.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
NgxVideoTimelineService.ctorParameters = function () { return []; };
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
/******************************************************************************
Copyright (c) Microsoft Corporation.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

@@ -50,3 +65,3 @@ /* global Reflect, Promise */

function (d, b) { for (var p in b)
if (b.hasOwnProperty(p))
if (Object.prototype.hasOwnProperty.call(b, p))
d[p] = b[p]; };

@@ -56,2 +71,4 @@ return extendStatics(d, b);

function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -98,2 +115,60 @@ function __() { this.constructor = d; }

}
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function")
throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn)
context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access)
context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done)
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0)
continue;
if (result === null || typeof result !== "object")
throw new TypeError("Object expected");
if (_ = accept(result.get))
descriptor.get = _;
if (_ = accept(result.set))
descriptor.set = _;
if (_ = accept(result.init))
initializers.push(_);
}
else if (_ = accept(result)) {
if (kind === "field")
initializers.push(_);
else
descriptor[key] = _;
}
}
if (target)
Object.defineProperty(target, contextIn.name, descriptor);
done = true;
}
;
function __runInitializers(thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
}
;
function __propKey(x) {
return typeof x === "symbol" ? x : "".concat(x);
}
;
function __setFunctionName(f, name, prefix) {
if (typeof name === "symbol")
name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
}
;
function __metadata(metadataKey, metadataValue) {

@@ -104,2 +179,3 @@ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")

function __awaiter(thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {

@@ -118,3 +194,3 @@ function fulfilled(value) { try {

} }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -131,3 +207,3 @@ });

throw new TypeError("Generator is already executing.");
while (_)
while (g && (g = 0, op[0] && (_ = 0)), _)
try {

@@ -193,18 +269,33 @@ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)

}
function __exportStar(m, exports) {
var __createBinding = Object.create ? (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function () { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function (o, m, k, k2) {
if (k2 === undefined)
k2 = k;
o[k2] = m[k];
});
function __exportStar(m, o) {
for (var p in m)
if (!exports.hasOwnProperty(p))
exports[p] = m[p];
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
__createBinding(o, m, p);
}
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m)
return m.call(o);
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
if (o && typeof o.length === "number")
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}

@@ -235,2 +326,3 @@ function __read(o, n) {

}
/** @deprecated */
function __spread() {

@@ -241,2 +333,3 @@ for (var ar = [], i = 0; i < arguments.length; i++)

}
/** @deprecated */
function __spreadArrays() {

@@ -250,3 +343,13 @@ for (var s = 0, i = 0, il = arguments.length; i < il; i++)

}
;
function __spreadArray(to, from, pack) {
if (pack || arguments.length === 2)
for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar)
ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
}
function __await(v) {

@@ -277,3 +380,3 @@ return this instanceof __await ? (this.v = v, this) : new __await(v);

return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
}

@@ -298,2 +401,7 @@ function __asyncValues(o) {

;
var __setModuleDefault = Object.create ? (function (o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function (o, v) {
o["default"] = v;
};
function __importStar(mod) {

@@ -305,5 +413,5 @@ if (mod && mod.__esModule)

for (var k in mod)
if (Object.hasOwnProperty.call(mod, k))
result[k] = mod[k];
result.default = mod;
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;

@@ -314,15 +422,24 @@ }

}
function __classPrivateFieldGet(receiver, state, kind, f) {
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}
function __classPrivateFieldSet(receiver, state, value, kind, f) {
if (kind === "m")
throw new TypeError("Private method is not writable");
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}
function __classPrivateFieldIn(state, receiver) {
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
}
exports.NgxVideoTimelineService = /** @class */ (function () {
function NgxVideoTimelineService() {
}
return NgxVideoTimelineService;
}());
exports.NgxVideoTimelineService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function NgxVideoTimelineService_Factory() { return new exports.NgxVideoTimelineService(); }, token: exports.NgxVideoTimelineService, providedIn: "root" });
exports.NgxVideoTimelineService = __decorate([
i0.Injectable({
providedIn: 'root'
})
], exports.NgxVideoTimelineService);
var moment = _moment__namespace;

@@ -343,3 +460,3 @@ var DateUtil = /** @class */ (function () {

}());
exports.NgxVideoTimelineComponent = /** @class */ (function () {
var NgxVideoTimelineComponent = /** @class */ (function () {
function NgxVideoTimelineComponent() {

@@ -1040,77 +1157,36 @@ // The height of the outer canvas

}());
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "canvasHeight", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "playTime", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "speed", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "forWardValue", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "startTimeThreshold", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "endTimeThreshold", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "borderColor", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "bgColor", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "bottomLineColor", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "verticalBarColor", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "playBarColor", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "videoCells", void 0);
__decorate([
i0.Input()
], exports.NgxVideoTimelineComponent.prototype, "isPlayClick", void 0);
__decorate([
i0.Output()
], exports.NgxVideoTimelineComponent.prototype, "playClick", void 0);
__decorate([
i0.Output()
], exports.NgxVideoTimelineComponent.prototype, "mouseUp", void 0);
__decorate([
i0.Output()
], exports.NgxVideoTimelineComponent.prototype, "mouseDown", void 0);
__decorate([
i0.Output()
], exports.NgxVideoTimelineComponent.prototype, "keyUp", void 0);
__decorate([
i0.Output()
], exports.NgxVideoTimelineComponent.prototype, "keyDown", void 0);
__decorate([
i0.ViewChild('timeline', { static: true })
], exports.NgxVideoTimelineComponent.prototype, "canvasExp", void 0);
__decorate([
i0.HostListener('window:resize', [])
], exports.NgxVideoTimelineComponent.prototype, "onResize", null);
__decorate([
i0.HostListener('window:keydown', ['$event'])
], exports.NgxVideoTimelineComponent.prototype, "onKeyDown", null);
__decorate([
i0.HostListener('window:keyup', ['$event'])
], exports.NgxVideoTimelineComponent.prototype, "onKeyUp", null);
exports.NgxVideoTimelineComponent = __decorate([
i0.Component({
selector: 'ngx-video-timeline',
template: "<canvas #timeline class=\"canvas\" [ngStyle]=\"{cursor: 'pointer',border: '1px solid',borderColor: borderColor,'backgroundColor': bgColor}\"\n (dragstart)=\"onDragStart($event)\" (mouseup)=\"mouseupFunc($event)\" (mousewheel)=\"mousewheelFunc($event)\"\n (mousedown)=\"mousedownFunc($event)\" (mousemove)=\"mousemoveFunc($event)\" (mouseout)=\"mouseoutFunc()\"></canvas>\n",
styles: [".canvas{height:100%;width:100%}"]
})
], exports.NgxVideoTimelineComponent);
NgxVideoTimelineComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'ngx-video-timeline',
template: "<canvas #timeline class=\"canvas\" [ngStyle]=\"{cursor: 'pointer',border: '1px solid',borderColor: borderColor,'backgroundColor': bgColor}\"\n (dragstart)=\"onDragStart($event)\" (mouseup)=\"mouseupFunc($event)\" (mousewheel)=\"mousewheelFunc($event)\"\n (mousedown)=\"mousedownFunc($event)\" (mousemove)=\"mousemoveFunc($event)\" (mouseout)=\"mouseoutFunc()\"></canvas>\n",
styles: [".canvas{height:100%;width:100%}"]
},] }
];
NgxVideoTimelineComponent.ctorParameters = function () { return []; };
NgxVideoTimelineComponent.propDecorators = {
canvasHeight: [{ type: i0.Input }],
playTime: [{ type: i0.Input }],
speed: [{ type: i0.Input }],
forWardValue: [{ type: i0.Input }],
startTimeThreshold: [{ type: i0.Input }],
endTimeThreshold: [{ type: i0.Input }],
borderColor: [{ type: i0.Input }],
bgColor: [{ type: i0.Input }],
bottomLineColor: [{ type: i0.Input }],
verticalBarColor: [{ type: i0.Input }],
playBarColor: [{ type: i0.Input }],
videoCells: [{ type: i0.Input }],
isPlayClick: [{ type: i0.Input }],
playClick: [{ type: i0.Output }],
mouseUp: [{ type: i0.Output }],
mouseDown: [{ type: i0.Output }],
keyUp: [{ type: i0.Output }],
keyDown: [{ type: i0.Output }],
canvasExp: [{ type: i0.ViewChild, args: ['timeline', { static: true },] }],
onResize: [{ type: i0.HostListener, args: ['window:resize', [],] }],
onKeyDown: [{ type: i0.HostListener, args: ['window:keydown', ['$event'],] }],
onKeyUp: [{ type: i0.HostListener, args: ['window:keyup', ['$event'],] }]
};
exports.NgxVideoTimelineModule = /** @class */ (function () {
var NgxVideoTimelineModule = /** @class */ (function () {
function NgxVideoTimelineModule() {

@@ -1120,11 +1196,11 @@ }

}());
exports.NgxVideoTimelineModule = __decorate([
i0.NgModule({
declarations: [exports.NgxVideoTimelineComponent],
imports: [
common.CommonModule
],
exports: [exports.NgxVideoTimelineComponent]
})
], exports.NgxVideoTimelineModule);
NgxVideoTimelineModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NgxVideoTimelineComponent],
imports: [
common.CommonModule
],
exports: [NgxVideoTimelineComponent]
},] }
];

@@ -1140,6 +1216,9 @@ /*

exports.DateUtil = DateUtil;
exports.NgxVideoTimelineComponent = NgxVideoTimelineComponent;
exports.NgxVideoTimelineModule = NgxVideoTimelineModule;
exports.NgxVideoTimelineService = NgxVideoTimelineService;
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));
//# sourceMappingURL=ngx-video-timeline.umd.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("dayjs"),require("rxjs"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-video-timeline",["exports","@angular/core","dayjs","rxjs","@angular/common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["ngx-video-timeline"]={},t.ng.core,t._moment,t.rxjs,t.ng.common)}(this,(function(t,e,i,s,r){"use strict";function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(i){if("default"!==i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}})),e.default=t,Object.freeze(e)}var a=o(e),n=o(i);function h(t,e,i,s){var r,o=arguments.length,a=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,s);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a}function l(t){var e="function"==typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}t.NgxVideoTimelineService=function(){},t.NgxVideoTimelineService.ɵprov=a.ɵɵdefineInjectable({factory:function(){return new t.NgxVideoTimelineService},token:t.NgxVideoTimelineService,providedIn:"root"}),t.NgxVideoTimelineService=h([e.Injectable({providedIn:"root"})],t.NgxVideoTimelineService);var m=n,u=function(){function t(){}return t.formatDate=function(t,e){return m(t).format(e)},t}();t.NgxVideoTimelineComponent=function(){function t(){this.canvasHeight=50,this.scale=this.canvasHeight/4.55,this.gMousedownCursor=void 0,this.gMousedownCursorY=void 0,this.forWardValue=5e3,this.speed=1e3,this.playTime=(new Date).getTime(),this.startTimeThreshold=(new Date).getTime()-432e5,this.endTimeThreshold=(new Date).getTime()+432e5,this.playClick=new e.EventEmitter,this.mouseUp=new e.EventEmitter,this.mouseDown=new e.EventEmitter,this.keyUp=new e.EventEmitter,this.keyDown=new e.EventEmitter,this.isPlayClick=!1,this.videoCells=[{beginTime:(new Date).getTime()-108e5,endTime:(new Date).getTime()-36e5,style:{background:"rgba(132, 244, 180, 0.498039)"}},{beginTime:(new Date).getTime()-216e5,endTime:(new Date).getTime()-144e5,style:{background:"rgba(132, 244, 180, 0.498039)"}}],this.verticalBarColor="rgba(0,0,0,1)",this.bottomLineColor="rgba(0,0,0,1)",this.borderColor="#fff",this.bgColor="#fff",this.playBarColor="#448aff"}return t.prototype.onResize=function(){this.canvas.width=Math.round(this.canvas.parentNode.offsetWidth-2),this.canvasW=this.canvas.parentNode.offsetWidth,this.init(this.startTimestamp,this.timecell,!1)},t.prototype.onKeyDown=function(t){37===Number(t.keyCode)?(this.playTime=Number(this.playTime)-this.forWardValue,this.currentTimestamp=Number(this.currentTimestamp)-this.forWardValue,this.set_time_to_middle(this.playTime)):Number(39===t.keyCode)&&(this.playTime=Number(this.playTime)+this.forWardValue,this.currentTimestamp=Number(this.currentTimestamp)+this.forWardValue,this.set_time_to_middle(this.playTime)),this.keyDown.emit(this.playTime)},t.prototype.onKeyUp=function(t){(13===Number(t.keyCode)||Number(32===t.keyCode))&&(this.isPlayClick?this.onPauseClick():this.onPlayClick()),this.keyUp.emit(this.playTime)},t.prototype.ngOnInit=function(){this.canvas=this.canvasExp.nativeElement,this.ctx=this.canvas.getContext("2d"),this.canvas.width=Math.round(this.canvas.parentNode.offsetWidth-2),this.canvasW=this.canvas.width,this.canvas.height=this.canvasHeight,this.canvasH=this.canvas.height,this.timecell=this.videoCells,this.minutesPerStep=[1,2,5,10,15,20,30,60,120,180,240,360,720,1440],this.graduationStep=20,this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24,this.startTimestamp=Number(this.startTimeThreshold),this.distanceBetweenGtitle=80,this.zoom=24,this.gIsMousedown=!1,this.gIsMousemove=!1,this.gMousedownCursor=void 0,this.pxPerMs=this.canvasW/(3600*this.hoursPerRuler*1e3),this.playBarOffsetX=this.canvasW/2,this.playBarDistanceLeft=this.playBarOffsetX/this.pxPerMs/3600/1e3/this.hoursPerRuler,this.currentTimestamp=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3,this.playBarOffsetX1=this.playBarOffsetX-.6*this.scale,this.playBarOffsetX2=this.playBarOffsetX+.6*this.scale,this.playBarOffsetY1=2.5*this.scale,this.playBarOffsetY2=3.5*this.scale,this.init(this.startTimestamp,this.timecell,!1),this.drawPalyBar()},t.prototype.ngOnChanges=function(t){var e=this;if(t.canvasHeight&&(this.canvasHeight=t.canvasHeight.currentValue,this.canvas=this.canvasExp.nativeElement,this.ctx=this.canvas.getContext("2d"),this.canvas.width=Math.round(this.canvas.parentNode.offsetWidth-2),this.canvasW=this.canvas.width,this.canvas.height=this.canvasHeight,this.canvasH=this.canvas.height,this.timecell=this.videoCells,this.minutesPerStep=[1,2,5,10,15,20,30,60,120,180,240,360,720,1440],this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24,this.startTimestamp=Number(this.startTimeThreshold),this.pxPerMs=this.canvasW/(3600*this.hoursPerRuler*1e3),this.playBarOffsetX=this.canvasW/2,this.playBarDistanceLeft=this.playBarOffsetX/this.pxPerMs/3600/1e3/this.hoursPerRuler,this.currentTimestamp=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3,this.playBarOffsetX1=this.playBarOffsetX-.6*this.scale,this.playBarOffsetX2=this.playBarOffsetX+.6*this.scale,this.playBarOffsetY1=2.5*this.scale,this.playBarOffsetY2=3.5*this.scale,this.init(this.startTimestamp,this.timecell,!1),this.drawPalyBar()),t.videoCells&&(this.videoCells=t.videoCells.currentValue,this.timecell=this.videoCells,this.add_cells(this.timecell)),t.startTimeThreshold){var i=t.startTimeThreshold.currentValue;t.startTimeThreshold.currentValue instanceof String?this.startTimeThreshold=new Date(i).getTime():i instanceof Date?this.startTimeThreshold=i.getTime():"number"==typeof i&&(this.startTimeThreshold=Number(i)),this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24,this.startTimestamp=Number(this.startTimeThreshold)}if(t.endTimeThreshold){i=t.endTimeThreshold.currentValue;t.endTimeThreshold.currentValue instanceof String?this.endTimeThreshold=new Date(i).getTime():i instanceof Date?this.endTimeThreshold=i.getTime():"number"==typeof i&&(this.endTimeThreshold=Number(i)),this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24}if(t.playTime){i=t.playTime.currentValue;t.playTime.currentValue instanceof String?this.playTime=new Date(i).getTime():i instanceof Date?this.playTime=i.getTime():"number"==typeof i&&(this.playTime=Number(i)),setTimeout((function(){e.set_time_to_middle(new Date(e.playTime).getTime())}),100)}t.speed&&(this.speed=1e3*Number(t.speed.currentValue)),t.forWardValue&&(this.forWardValue=1e3*Number(t.forWardValue.currentValue)),t.isPlayClick&&(t.isPlayClick.currentValue?this.onPlayClick():this.onPauseClick())},t.prototype.init=function(t,e,i){this.timecell=e,this.startTimestamp=t,this.currentTimestamp>=this.endTimeThreshold?(this.startTimestamp=Number(this.endTimeThreshold)-this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.currentTimestamp=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.playTime=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600):this.currentTimestamp<=this.startTimeThreshold&&(this.startTimestamp=Number(this.startTimeThreshold)-this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.currentTimestamp=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.playTime=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600),this.drawCellBg(),this.add_graduations(t),this.add_cells(e),this.drawLine(0,this.canvasH,this.canvasW,this.canvasH,this.bottomLineColor,1)},t.prototype.add_graduations=function(t){var e,i,s,r,o=this.canvasW/(60*this.hoursPerRuler),a=this.canvasW/(60*this.hoursPerRuler*60*1e3),n=this.graduationStep,h=n/o;try{for(var m=l(this.minutesPerStep),c=m.next();!c.done;c=m.next()){if(h<=(f=c.value)){n=o*(h=f);break}}}catch(t){e={error:t}}finally{try{c&&!c.done&&(i=m.return)&&i.call(m)}finally{if(e)throw e.error}}var p=30;try{for(var d=l(this.minutesPerStep),T=d.next();!T.done;T=d.next()){var f=T.value;if(this.distanceBetweenGtitle/o<=f){p=f;break}}}catch(t){s={error:t}}finally{try{T&&!T.done&&(r=d.return)&&r.call(d)}finally{if(s)throw s.error}}for(var y,v,g,x=this.canvasW/n,C=this.ms_to_next_step(t,60*h*1e3),b=C*a,w=n/a,N=0;N<x;N++){y=b+N*n,v=Number(t)+Number(C)+N*Number(w);var B=new Date(v);if(0===B.getUTCHours()&&0===B.getUTCMinutes()){"big",g=1.25*this.scale;var P=u.formatDate(B,"HH:mm:ss");this.ctx.textAlign="center",this.ctx.fillText(P,y,1.5*this.scale),this.ctx.fillStyle=this.verticalBarColor}else if(v/6e4%p==0){"middle",g=.75*this.scale;var D=u.formatDate(B,"HH:mm:ss");this.ctx.textAlign="center",this.ctx.fillText(D,y,1.5*this.scale),this.ctx.fillStyle=this.verticalBarColor}else g=.5*this.scale;this.drawLine(y,0,y,g,this.verticalBarColor,1)}},t.prototype.drawPalyBar=function(){this.ctx.beginPath(),this.ctx.moveTo(this.playBarOffsetX,0),this.ctx.lineTo(this.playBarOffsetX,1.75*this.scale),this.ctx.strokeStyle=this.playBarColor,this.ctx.stroke(),this.ctx.moveTo(this.playBarOffsetX,1.75*this.scale),this.ctx.lineTo(this.playBarOffsetX,1.75*this.scale),this.ctx.lineTo(this.playBarOffsetX-.6*this.scale,2.5*this.scale),this.ctx.lineTo(this.playBarOffsetX-.6*this.scale,3.5*this.scale),this.ctx.lineTo(this.playBarOffsetX+.6*this.scale,3.5*this.scale),this.ctx.lineTo(this.playBarOffsetX+.6*this.scale,2.5*this.scale),this.ctx.lineTo(this.playBarOffsetX,1.75*this.scale),this.ctx.fillStyle=this.playBarColor,this.ctx.fill(),this.ctx.closePath();var t=Number(this.currentTimestamp);this.ctx.fillStyle=this.playBarColor,this.ctx.textAlign="center",this.ctx.fillText(u.formatDate(new Date(t),"YYYY-MM-DD HH:mm:ss"),this.playBarOffsetX,4.25*this.scale)},t.prototype.drawLine=function(t,e,i,s,r,o){this.ctx.beginPath(),this.ctx.moveTo(t,e),this.ctx.lineTo(i,s),this.ctx.strokeStyle=r,this.ctx.lineWidth=o,this.ctx.stroke()},t.prototype.add_cells=function(t){var e=this;t.forEach((function(t){e.draw_cell(t)}))},t.prototype.draw_cell=function(t){var e=this.canvasW/(60*this.hoursPerRuler*60*1e3),i=(t.beginTime-this.startTimestamp)*e,s=(t.endTime-t.beginTime)*e;this.ctx.fillStyle=t.style.background,this.ctx.fillRect(i,0,s,.75*this.scale)},t.prototype.drawCellBg=function(){this.ctx.fillStyle="rgba(69, 72, 76, 0.5)",this.ctx.fillRect(0,0,this.canvasW,0)},t.prototype.mousedownFunc=function(t){this.gIsMousedown=!0,this.gMousedownCursor=this.get_cursor_x_position(t).posX,this.gMousedownCursorY=this.get_cursor_x_position(t).posY},t.prototype.mousemoveFunc=function(t){this.clearCanvas();var e=this.get_cursor_x_position(t).posX,i=this.canvasW/(3600*this.hoursPerRuler*1e3),s=e-this.gMousedownCursor;if(this.gIsMousedown)this.gMousedownCursor>=this.playBarOffsetX1&&this.gMousedownCursor<=this.playBarOffsetX2&&this.gMousedownCursorY>=this.playBarOffsetY1&&this.gMousedownCursorY<=this.playBarOffsetY2?(this.startTimestamp=this.startTimestamp+Math.round(s/i),this.currentTimestamp=this.startTimestamp+Math.round(this.playBarOffsetX/i),this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!1),this.gIsMousemove=!0):(this.startTimestamp=this.startTimestamp-Math.round(s/i),this.currentTimestamp=this.startTimestamp+Math.round(this.playBarOffsetX/i),this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0),this.gIsMousemove=!0,this.gMousedownCursor=e),this.mouseUp.emit(this.currentTimestamp);else{var r=this.startTimestamp+e/i;this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0),this.drawLine(e,0,e,50,"rgb(194, 202, 215)",1),this.ctx.fillStyle="rgb(194, 202, 215)",this.ctx.textAlign="center",this.ctx.fillText(u.formatDate(new Date(r),"YYYY-MM-DD HH:mm:ss"),e,3*this.scale)}},t.prototype.mouseupFunc=function(t){if(this.gIsMousemove)this.gIsMousemove=!1,this.gIsMousedown=!1,this.playTime=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3;else{this.gIsMousedown=!1;var e=this.get_cursor_x_position(t).posX,i=3600*this.zoom*1e3/this.canvasW;this.playTime=this.startTimestamp+e*i,this.set_time_to_middle(this.playTime)}this.mouseDown.emit(this.playTime)},t.prototype.mouseoutFunc=function(){this.clearCanvas();var t=this.canvasW/(3600*this.hoursPerRuler*1e3);this.currentTimestamp=this.startTimestamp+Math.round(this.playBarOffsetX/t),this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0)},t.prototype.mousewheelFunc=function(t){if(!t||!t.preventDefault)return window.event.returnValue=!1,!1;t.preventDefault();var e=window.event||t,i=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail)),s=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3;i<0?(this.zoom=this.zoom+4,this.zoom>=24&&(this.zoom=24),this.hoursPerRuler=this.zoom):i>0&&(this.zoom=this.zoom-4,this.zoom<=1&&(this.zoom=1),this.hoursPerRuler=this.zoom),this.clearCanvas(),this.startTimestamp=s-3600*this.hoursPerRuler*1e3/2,this.init(this.startTimestamp,this.timecell,!0),this.drawPalyBar()},t.prototype.get_cursor_x_position=function(t){var e=0,i=0;return t||(t=window.event),(t.offsetX||t.offsetY)&&(e=t.offsetX,i=t.offsetY),{posX:e,posY:i}},t.prototype.ms_to_next_step=function(t,e){var i=t%e;return i?e-i:0},t.prototype.set_time_to_middle=function(t){this.ctx&&(this.clearCanvas(),this.startTimestamp=t-this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3,this.currentTimestamp=t,this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0))},t.prototype.clearCanvas=function(){this.ctx.clearRect(0,0,this.canvasW,7.5*this.scale)},t.prototype.onPlayClick=function(){var t=this;this.isPlayClick=!0,this.setTimeMove=s.interval(this.speed).subscribe((function(e){t.playTime=Number(t.playTime)+1e3,t.playClick.emit(t.playTime),t.set_time_to_middle(t.playTime)}))},t.prototype.onPauseClick=function(){this.isPlayClick=!1,this.setTimeMove&&(this.setTimeMove.unsubscribe(),this.playClick.emit(this.playTime))},t.prototype.changeVideo=function(){var t=[{beginTime:(new Date).getTime()-36e5,endTime:(new Date).getTime()+72e5,style:{background:"rgba(132, 244, 180, 0.498039)"}}];this.clearCanvas(),this.drawPalyBar(),this.init(this.startTimestamp,t,!0)},t.prototype.selectedTime=function(t){var e=new Date(t.value.getTime());this.set_time_to_middle(Number(e))},t.prototype.onDragStart=function(t){return t.preventDefault(),!1},t}(),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"canvasHeight",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"playTime",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"speed",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"forWardValue",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"startTimeThreshold",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"endTimeThreshold",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"borderColor",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"bgColor",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"bottomLineColor",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"verticalBarColor",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"playBarColor",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"videoCells",void 0),h([e.Input()],t.NgxVideoTimelineComponent.prototype,"isPlayClick",void 0),h([e.Output()],t.NgxVideoTimelineComponent.prototype,"playClick",void 0),h([e.Output()],t.NgxVideoTimelineComponent.prototype,"mouseUp",void 0),h([e.Output()],t.NgxVideoTimelineComponent.prototype,"mouseDown",void 0),h([e.Output()],t.NgxVideoTimelineComponent.prototype,"keyUp",void 0),h([e.Output()],t.NgxVideoTimelineComponent.prototype,"keyDown",void 0),h([e.ViewChild("timeline",{static:!0})],t.NgxVideoTimelineComponent.prototype,"canvasExp",void 0),h([e.HostListener("window:resize",[])],t.NgxVideoTimelineComponent.prototype,"onResize",null),h([e.HostListener("window:keydown",["$event"])],t.NgxVideoTimelineComponent.prototype,"onKeyDown",null),h([e.HostListener("window:keyup",["$event"])],t.NgxVideoTimelineComponent.prototype,"onKeyUp",null),t.NgxVideoTimelineComponent=h([e.Component({selector:"ngx-video-timeline",template:'<canvas #timeline class="canvas" [ngStyle]="{cursor: \'pointer\',border: \'1px solid\',borderColor: borderColor,\'backgroundColor\': bgColor}"\n (dragstart)="onDragStart($event)" (mouseup)="mouseupFunc($event)" (mousewheel)="mousewheelFunc($event)"\n (mousedown)="mousedownFunc($event)" (mousemove)="mousemoveFunc($event)" (mouseout)="mouseoutFunc()"></canvas>\n',styles:[".canvas{height:100%;width:100%}"]})],t.NgxVideoTimelineComponent),t.NgxVideoTimelineModule=function(){},t.NgxVideoTimelineModule=h([e.NgModule({declarations:[t.NgxVideoTimelineComponent],imports:[r.CommonModule],exports:[t.NgxVideoTimelineComponent]})],t.NgxVideoTimelineModule),t.DateUtil=u,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("dayjs"),require("rxjs"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-video-timeline",["exports","@angular/core","dayjs","rxjs","@angular/common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["ngx-video-timeline"]={},t.ng.core,t._moment,t.rxjs,t.ng.common)}(this,(function(t,e,s,i,r){"use strict";function a(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(s){if("default"!==s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:function(){return t[s]}})}})),e.default=t,Object.freeze(e)}var h=a(e),o=a(s),n=function(){};n.ɵprov=h.ɵɵdefineInjectable({factory:function(){return new n},token:n,providedIn:"root"}),n.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],n.ctorParameters=function(){return[]};Object.create;function l(t){var e="function"==typeof Symbol&&Symbol.iterator,s=e&&t[e],i=0;if(s)return s.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;var m=o,u=function(){function t(){}return t.formatDate=function(t,e){return m(t).format(e)},t}(),c=function(){function t(){this.canvasHeight=50,this.scale=this.canvasHeight/4.55,this.gMousedownCursor=void 0,this.gMousedownCursorY=void 0,this.forWardValue=5e3,this.speed=1e3,this.playTime=(new Date).getTime(),this.startTimeThreshold=(new Date).getTime()-432e5,this.endTimeThreshold=(new Date).getTime()+432e5,this.playClick=new e.EventEmitter,this.mouseUp=new e.EventEmitter,this.mouseDown=new e.EventEmitter,this.keyUp=new e.EventEmitter,this.keyDown=new e.EventEmitter,this.isPlayClick=!1,this.videoCells=[{beginTime:(new Date).getTime()-108e5,endTime:(new Date).getTime()-36e5,style:{background:"rgba(132, 244, 180, 0.498039)"}},{beginTime:(new Date).getTime()-216e5,endTime:(new Date).getTime()-144e5,style:{background:"rgba(132, 244, 180, 0.498039)"}}],this.verticalBarColor="rgba(0,0,0,1)",this.bottomLineColor="rgba(0,0,0,1)",this.borderColor="#fff",this.bgColor="#fff",this.playBarColor="#448aff"}return t.prototype.onResize=function(){this.canvas.width=Math.round(this.canvas.parentNode.offsetWidth-2),this.canvasW=this.canvas.parentNode.offsetWidth,this.init(this.startTimestamp,this.timecell,!1)},t.prototype.onKeyDown=function(t){37===Number(t.keyCode)?(this.playTime=Number(this.playTime)-this.forWardValue,this.currentTimestamp=Number(this.currentTimestamp)-this.forWardValue,this.set_time_to_middle(this.playTime)):Number(39===t.keyCode)&&(this.playTime=Number(this.playTime)+this.forWardValue,this.currentTimestamp=Number(this.currentTimestamp)+this.forWardValue,this.set_time_to_middle(this.playTime)),this.keyDown.emit(this.playTime)},t.prototype.onKeyUp=function(t){(13===Number(t.keyCode)||Number(32===t.keyCode))&&(this.isPlayClick?this.onPauseClick():this.onPlayClick()),this.keyUp.emit(this.playTime)},t.prototype.ngOnInit=function(){this.canvas=this.canvasExp.nativeElement,this.ctx=this.canvas.getContext("2d"),this.canvas.width=Math.round(this.canvas.parentNode.offsetWidth-2),this.canvasW=this.canvas.width,this.canvas.height=this.canvasHeight,this.canvasH=this.canvas.height,this.timecell=this.videoCells,this.minutesPerStep=[1,2,5,10,15,20,30,60,120,180,240,360,720,1440],this.graduationStep=20,this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24,this.startTimestamp=Number(this.startTimeThreshold),this.distanceBetweenGtitle=80,this.zoom=24,this.gIsMousedown=!1,this.gIsMousemove=!1,this.gMousedownCursor=void 0,this.pxPerMs=this.canvasW/(3600*this.hoursPerRuler*1e3),this.playBarOffsetX=this.canvasW/2,this.playBarDistanceLeft=this.playBarOffsetX/this.pxPerMs/3600/1e3/this.hoursPerRuler,this.currentTimestamp=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3,this.playBarOffsetX1=this.playBarOffsetX-.6*this.scale,this.playBarOffsetX2=this.playBarOffsetX+.6*this.scale,this.playBarOffsetY1=2.5*this.scale,this.playBarOffsetY2=3.5*this.scale,this.init(this.startTimestamp,this.timecell,!1),this.drawPalyBar()},t.prototype.ngOnChanges=function(t){var e=this;if(t.canvasHeight&&(this.canvasHeight=t.canvasHeight.currentValue,this.canvas=this.canvasExp.nativeElement,this.ctx=this.canvas.getContext("2d"),this.canvas.width=Math.round(this.canvas.parentNode.offsetWidth-2),this.canvasW=this.canvas.width,this.canvas.height=this.canvasHeight,this.canvasH=this.canvas.height,this.timecell=this.videoCells,this.minutesPerStep=[1,2,5,10,15,20,30,60,120,180,240,360,720,1440],this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24,this.startTimestamp=Number(this.startTimeThreshold),this.pxPerMs=this.canvasW/(3600*this.hoursPerRuler*1e3),this.playBarOffsetX=this.canvasW/2,this.playBarDistanceLeft=this.playBarOffsetX/this.pxPerMs/3600/1e3/this.hoursPerRuler,this.currentTimestamp=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3,this.playBarOffsetX1=this.playBarOffsetX-.6*this.scale,this.playBarOffsetX2=this.playBarOffsetX+.6*this.scale,this.playBarOffsetY1=2.5*this.scale,this.playBarOffsetY2=3.5*this.scale,this.init(this.startTimestamp,this.timecell,!1),this.drawPalyBar()),t.videoCells&&(this.videoCells=t.videoCells.currentValue,this.timecell=this.videoCells,this.add_cells(this.timecell)),t.startTimeThreshold){var s=t.startTimeThreshold.currentValue;t.startTimeThreshold.currentValue instanceof String?this.startTimeThreshold=new Date(s).getTime():s instanceof Date?this.startTimeThreshold=s.getTime():"number"==typeof s&&(this.startTimeThreshold=Number(s)),this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24,this.startTimestamp=Number(this.startTimeThreshold)}if(t.endTimeThreshold){s=t.endTimeThreshold.currentValue;t.endTimeThreshold.currentValue instanceof String?this.endTimeThreshold=new Date(s).getTime():s instanceof Date?this.endTimeThreshold=s.getTime():"number"==typeof s&&(this.endTimeThreshold=Number(s)),this.hoursPerRuler=Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600)<24?Math.ceil((Number(this.endTimeThreshold)-Number(this.startTimeThreshold))/1e3/3600):24}if(t.playTime){s=t.playTime.currentValue;t.playTime.currentValue instanceof String?this.playTime=new Date(s).getTime():s instanceof Date?this.playTime=s.getTime():"number"==typeof s&&(this.playTime=Number(s)),setTimeout((function(){e.set_time_to_middle(new Date(e.playTime).getTime())}),100)}t.speed&&(this.speed=1e3*Number(t.speed.currentValue)),t.forWardValue&&(this.forWardValue=1e3*Number(t.forWardValue.currentValue)),t.isPlayClick&&(t.isPlayClick.currentValue?this.onPlayClick():this.onPauseClick())},t.prototype.init=function(t,e,s){this.timecell=e,this.startTimestamp=t,this.currentTimestamp>=this.endTimeThreshold?(this.startTimestamp=Number(this.endTimeThreshold)-this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.currentTimestamp=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.playTime=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600):this.currentTimestamp<=this.startTimeThreshold&&(this.startTimestamp=Number(this.startTimeThreshold)-this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.currentTimestamp=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600,this.playTime=Number(this.startTimestamp)+this.hoursPerRuler*this.playBarDistanceLeft*1e3*3600),this.drawCellBg(),this.add_graduations(t),this.add_cells(e),this.drawLine(0,this.canvasH,this.canvasW,this.canvasH,this.bottomLineColor,1)},t.prototype.add_graduations=function(t){var e,s,i,r,a=this.canvasW/(60*this.hoursPerRuler),h=this.canvasW/(60*this.hoursPerRuler*60*1e3),o=this.graduationStep,n=o/a;try{for(var m=l(this.minutesPerStep),c=m.next();!c.done;c=m.next()){if(n<=(y=c.value)){o=a*(n=y);break}}}catch(t){e={error:t}}finally{try{c&&!c.done&&(s=m.return)&&s.call(m)}finally{if(e)throw e.error}}var p=30;try{for(var d=l(this.minutesPerStep),f=d.next();!f.done;f=d.next()){var y=f.value;if(this.distanceBetweenGtitle/a<=y){p=y;break}}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}for(var T,v,g,b=this.canvasW/o,w=this.ms_to_next_step(t,60*n*1e3),x=w*h,C=o/h,B=0;B<b;B++){T=x+B*o,v=Number(t)+Number(w)+B*Number(C);var P=new Date(v);if(0===P.getUTCHours()&&0===P.getUTCMinutes()){"big",g=1.25*this.scale;var D=u.formatDate(P,"HH:mm:ss");this.ctx.textAlign="center",this.ctx.fillText(D,T,1.5*this.scale),this.ctx.fillStyle=this.verticalBarColor}else if(v/6e4%p==0){"middle",g=.75*this.scale;var M=u.formatDate(P,"HH:mm:ss");this.ctx.textAlign="center",this.ctx.fillText(M,T,1.5*this.scale),this.ctx.fillStyle=this.verticalBarColor}else g=.5*this.scale;this.drawLine(T,0,T,g,this.verticalBarColor,1)}},t.prototype.drawPalyBar=function(){this.ctx.beginPath(),this.ctx.moveTo(this.playBarOffsetX,0),this.ctx.lineTo(this.playBarOffsetX,1.75*this.scale),this.ctx.strokeStyle=this.playBarColor,this.ctx.stroke(),this.ctx.moveTo(this.playBarOffsetX,1.75*this.scale),this.ctx.lineTo(this.playBarOffsetX,1.75*this.scale),this.ctx.lineTo(this.playBarOffsetX-.6*this.scale,2.5*this.scale),this.ctx.lineTo(this.playBarOffsetX-.6*this.scale,3.5*this.scale),this.ctx.lineTo(this.playBarOffsetX+.6*this.scale,3.5*this.scale),this.ctx.lineTo(this.playBarOffsetX+.6*this.scale,2.5*this.scale),this.ctx.lineTo(this.playBarOffsetX,1.75*this.scale),this.ctx.fillStyle=this.playBarColor,this.ctx.fill(),this.ctx.closePath();var t=Number(this.currentTimestamp);this.ctx.fillStyle=this.playBarColor,this.ctx.textAlign="center",this.ctx.fillText(u.formatDate(new Date(t),"YYYY-MM-DD HH:mm:ss"),this.playBarOffsetX,4.25*this.scale)},t.prototype.drawLine=function(t,e,s,i,r,a){this.ctx.beginPath(),this.ctx.moveTo(t,e),this.ctx.lineTo(s,i),this.ctx.strokeStyle=r,this.ctx.lineWidth=a,this.ctx.stroke()},t.prototype.add_cells=function(t){var e=this;t.forEach((function(t){e.draw_cell(t)}))},t.prototype.draw_cell=function(t){var e=this.canvasW/(60*this.hoursPerRuler*60*1e3),s=(t.beginTime-this.startTimestamp)*e,i=(t.endTime-t.beginTime)*e;this.ctx.fillStyle=t.style.background,this.ctx.fillRect(s,0,i,.75*this.scale)},t.prototype.drawCellBg=function(){this.ctx.fillStyle="rgba(69, 72, 76, 0.5)",this.ctx.fillRect(0,0,this.canvasW,0)},t.prototype.mousedownFunc=function(t){this.gIsMousedown=!0,this.gMousedownCursor=this.get_cursor_x_position(t).posX,this.gMousedownCursorY=this.get_cursor_x_position(t).posY},t.prototype.mousemoveFunc=function(t){this.clearCanvas();var e=this.get_cursor_x_position(t).posX,s=this.canvasW/(3600*this.hoursPerRuler*1e3),i=e-this.gMousedownCursor;if(this.gIsMousedown)this.gMousedownCursor>=this.playBarOffsetX1&&this.gMousedownCursor<=this.playBarOffsetX2&&this.gMousedownCursorY>=this.playBarOffsetY1&&this.gMousedownCursorY<=this.playBarOffsetY2?(this.startTimestamp=this.startTimestamp+Math.round(i/s),this.currentTimestamp=this.startTimestamp+Math.round(this.playBarOffsetX/s),this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!1),this.gIsMousemove=!0):(this.startTimestamp=this.startTimestamp-Math.round(i/s),this.currentTimestamp=this.startTimestamp+Math.round(this.playBarOffsetX/s),this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0),this.gIsMousemove=!0,this.gMousedownCursor=e),this.mouseUp.emit(this.currentTimestamp);else{var r=this.startTimestamp+e/s;this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0),this.drawLine(e,0,e,50,"rgb(194, 202, 215)",1),this.ctx.fillStyle="rgb(194, 202, 215)",this.ctx.textAlign="center",this.ctx.fillText(u.formatDate(new Date(r),"YYYY-MM-DD HH:mm:ss"),e,3*this.scale)}},t.prototype.mouseupFunc=function(t){if(this.gIsMousemove)this.gIsMousemove=!1,this.gIsMousedown=!1,this.playTime=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3;else{this.gIsMousedown=!1;var e=this.get_cursor_x_position(t).posX,s=3600*this.zoom*1e3/this.canvasW;this.playTime=this.startTimestamp+e*s,this.set_time_to_middle(this.playTime)}this.mouseDown.emit(this.playTime)},t.prototype.mouseoutFunc=function(){this.clearCanvas();var t=this.canvasW/(3600*this.hoursPerRuler*1e3);this.currentTimestamp=this.startTimestamp+Math.round(this.playBarOffsetX/t),this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0)},t.prototype.mousewheelFunc=function(t){if(!t||!t.preventDefault)return window.event.returnValue=!1,!1;t.preventDefault();var e=window.event||t,s=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail)),i=this.startTimestamp+this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3;s<0?(this.zoom=this.zoom+4,this.zoom>=24&&(this.zoom=24),this.hoursPerRuler=this.zoom):s>0&&(this.zoom=this.zoom-4,this.zoom<=1&&(this.zoom=1),this.hoursPerRuler=this.zoom),this.clearCanvas(),this.startTimestamp=i-3600*this.hoursPerRuler*1e3/2,this.init(this.startTimestamp,this.timecell,!0),this.drawPalyBar()},t.prototype.get_cursor_x_position=function(t){var e=0,s=0;return t||(t=window.event),(t.offsetX||t.offsetY)&&(e=t.offsetX,s=t.offsetY),{posX:e,posY:s}},t.prototype.ms_to_next_step=function(t,e){var s=t%e;return s?e-s:0},t.prototype.set_time_to_middle=function(t){this.ctx&&(this.clearCanvas(),this.startTimestamp=t-this.hoursPerRuler*this.playBarDistanceLeft*3600*1e3,this.currentTimestamp=t,this.drawPalyBar(),this.init(this.startTimestamp,this.timecell,!0))},t.prototype.clearCanvas=function(){this.ctx.clearRect(0,0,this.canvasW,7.5*this.scale)},t.prototype.onPlayClick=function(){var t=this;this.isPlayClick=!0,this.setTimeMove=i.interval(this.speed).subscribe((function(e){t.playTime=Number(t.playTime)+1e3,t.playClick.emit(t.playTime),t.set_time_to_middle(t.playTime)}))},t.prototype.onPauseClick=function(){this.isPlayClick=!1,this.setTimeMove&&(this.setTimeMove.unsubscribe(),this.playClick.emit(this.playTime))},t.prototype.changeVideo=function(){var t=[{beginTime:(new Date).getTime()-36e5,endTime:(new Date).getTime()+72e5,style:{background:"rgba(132, 244, 180, 0.498039)"}}];this.clearCanvas(),this.drawPalyBar(),this.init(this.startTimestamp,t,!0)},t.prototype.selectedTime=function(t){var e=new Date(t.value.getTime());this.set_time_to_middle(Number(e))},t.prototype.onDragStart=function(t){return t.preventDefault(),!1},t}();c.decorators=[{type:e.Component,args:[{selector:"ngx-video-timeline",template:'<canvas #timeline class="canvas" [ngStyle]="{cursor: \'pointer\',border: \'1px solid\',borderColor: borderColor,\'backgroundColor\': bgColor}"\n (dragstart)="onDragStart($event)" (mouseup)="mouseupFunc($event)" (mousewheel)="mousewheelFunc($event)"\n (mousedown)="mousedownFunc($event)" (mousemove)="mousemoveFunc($event)" (mouseout)="mouseoutFunc()"></canvas>\n',styles:[".canvas{height:100%;width:100%}"]}]}],c.ctorParameters=function(){return[]},c.propDecorators={canvasHeight:[{type:e.Input}],playTime:[{type:e.Input}],speed:[{type:e.Input}],forWardValue:[{type:e.Input}],startTimeThreshold:[{type:e.Input}],endTimeThreshold:[{type:e.Input}],borderColor:[{type:e.Input}],bgColor:[{type:e.Input}],bottomLineColor:[{type:e.Input}],verticalBarColor:[{type:e.Input}],playBarColor:[{type:e.Input}],videoCells:[{type:e.Input}],isPlayClick:[{type:e.Input}],playClick:[{type:e.Output}],mouseUp:[{type:e.Output}],mouseDown:[{type:e.Output}],keyUp:[{type:e.Output}],keyDown:[{type:e.Output}],canvasExp:[{type:e.ViewChild,args:["timeline",{static:!0}]}],onResize:[{type:e.HostListener,args:["window:resize",[]]}],onKeyDown:[{type:e.HostListener,args:["window:keydown",["$event"]]}],onKeyUp:[{type:e.HostListener,args:["window:keyup",["$event"]]}]};var p=function(){};p.decorators=[{type:e.NgModule,args:[{declarations:[c],imports:[r.CommonModule],exports:[c]}]}],t.DateUtil=u,t.NgxVideoTimelineComponent=c,t.NgxVideoTimelineModule=p,t.NgxVideoTimelineService=n,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-video-timeline.umd.min.js.map

@@ -1,17 +0,15 @@

import { __decorate } from "tslib";
import { NgModule } from '@angular/core';
import { NgxVideoTimelineComponent } from './timeline.component';
import { CommonModule } from '@angular/common';
let NgxVideoTimelineModule = class NgxVideoTimelineModule {
};
NgxVideoTimelineModule = __decorate([
NgModule({
declarations: [NgxVideoTimelineComponent],
imports: [
CommonModule
],
exports: [NgxVideoTimelineComponent]
})
], NgxVideoTimelineModule);
export { NgxVideoTimelineModule };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxpbmUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9tYWMvbmV3LXRlY2gvbmd4LXZpZGVvLXRpbWVsaW5lL3Byb2plY3RzL3RpbWVsaW5lL3NyYy8iLCJzb3VyY2VzIjpbImxpYi90aW1lbGluZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDakUsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBVzdDLElBQWEsc0JBQXNCLEdBQW5DLE1BQWEsc0JBQXNCO0NBQUksQ0FBQTtBQUExQixzQkFBc0I7SUFQbEMsUUFBUSxDQUFDO1FBQ04sWUFBWSxFQUFFLENBQUMseUJBQXlCLENBQUM7UUFDekMsT0FBTyxFQUFFO1lBQ1AsWUFBWTtTQUNiO1FBQ0QsT0FBTyxFQUFFLENBQUMseUJBQXlCLENBQUM7S0FDdkMsQ0FBQztHQUNXLHNCQUFzQixDQUFJO1NBQTFCLHNCQUFzQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBOZ3hWaWRlb1RpbWVsaW5lQ29tcG9uZW50IH0gZnJvbSAnLi90aW1lbGluZS5jb21wb25lbnQnO1xuaW1wb3J0IHtDb21tb25Nb2R1bGV9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5cblxuXG5ATmdNb2R1bGUoe1xuICAgIGRlY2xhcmF0aW9uczogW05neFZpZGVvVGltZWxpbmVDb21wb25lbnRdLFxuICAgIGltcG9ydHM6IFtcbiAgICAgIENvbW1vbk1vZHVsZVxuICAgIF0sXG4gICAgZXhwb3J0czogW05neFZpZGVvVGltZWxpbmVDb21wb25lbnRdXG59KVxuZXhwb3J0IGNsYXNzIE5neFZpZGVvVGltZWxpbmVNb2R1bGUgeyB9XG4iXX0=
export class NgxVideoTimelineModule {
}
NgxVideoTimelineModule.decorators = [
{ type: NgModule, args: [{
declarations: [NgxVideoTimelineComponent],
imports: [
CommonModule
],
exports: [NgxVideoTimelineComponent]
},] }
];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxpbmUubW9kdWxlLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9tYWMvbGVub24vcmVwb3NpdG9yaWVzL25neC12aWRlby10aW1lbGluZS9wcm9qZWN0cy90aW1lbGluZS9zcmMvIiwic291cmNlcyI6WyJsaWIvdGltZWxpbmUubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDakUsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBVzdDLE1BQU0sT0FBTyxzQkFBc0I7OztZQVBsQyxRQUFRLFNBQUM7Z0JBQ04sWUFBWSxFQUFFLENBQUMseUJBQXlCLENBQUM7Z0JBQ3pDLE9BQU8sRUFBRTtvQkFDUCxZQUFZO2lCQUNiO2dCQUNELE9BQU8sRUFBRSxDQUFDLHlCQUF5QixDQUFDO2FBQ3ZDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IE5neFZpZGVvVGltZWxpbmVDb21wb25lbnQgfSBmcm9tICcuL3RpbWVsaW5lLmNvbXBvbmVudCc7XG5pbXBvcnQge0NvbW1vbk1vZHVsZX0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uJztcblxuXG5cbkBOZ01vZHVsZSh7XG4gICAgZGVjbGFyYXRpb25zOiBbTmd4VmlkZW9UaW1lbGluZUNvbXBvbmVudF0sXG4gICAgaW1wb3J0czogW1xuICAgICAgQ29tbW9uTW9kdWxlXG4gICAgXSxcbiAgICBleHBvcnRzOiBbTmd4VmlkZW9UaW1lbGluZUNvbXBvbmVudF1cbn0pXG5leHBvcnQgY2xhc3MgTmd4VmlkZW9UaW1lbGluZU1vZHVsZSB7IH1cbiJdfQ==

@@ -1,14 +0,13 @@

import { __decorate } from "tslib";
import { Injectable } from '@angular/core';
import * as i0 from "@angular/core";
let NgxVideoTimelineService = class NgxVideoTimelineService {
export class NgxVideoTimelineService {
constructor() { }
};
}
NgxVideoTimelineService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgxVideoTimelineService_Factory() { return new NgxVideoTimelineService(); }, token: NgxVideoTimelineService, providedIn: "root" });
NgxVideoTimelineService = __decorate([
Injectable({
providedIn: 'root'
})
], NgxVideoTimelineService);
export { NgxVideoTimelineService };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxpbmUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIvVXNlcnMvbWFjL25ldy10ZWNoL25neC12aWRlby10aW1lbGluZS9wcm9qZWN0cy90aW1lbGluZS9zcmMvIiwic291cmNlcyI6WyJsaWIvdGltZWxpbmUuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFLM0MsSUFBYSx1QkFBdUIsR0FBcEMsTUFBYSx1QkFBdUI7SUFFbEMsZ0JBQWdCLENBQUM7Q0FDbEIsQ0FBQTs7QUFIWSx1QkFBdUI7SUFIbkMsVUFBVSxDQUFDO1FBQ1YsVUFBVSxFQUFFLE1BQU07S0FDbkIsQ0FBQztHQUNXLHVCQUF1QixDQUduQztTQUhZLHVCQUF1QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQEluamVjdGFibGUoe1xuICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgTmd4VmlkZW9UaW1lbGluZVNlcnZpY2Uge1xuXG4gIGNvbnN0cnVjdG9yKCkgeyB9XG59XG4iXX0=
NgxVideoTimelineService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
NgxVideoTimelineService.ctorParameters = () => [];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZWxpbmUuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIvVXNlcnMvbWFjL2xlbm9uL3JlcG9zaXRvcmllcy9uZ3gtdmlkZW8tdGltZWxpbmUvcHJvamVjdHMvdGltZWxpbmUvc3JjLyIsInNvdXJjZXMiOlsibGliL3RpbWVsaW5lLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFLM0MsTUFBTSxPQUFPLHVCQUF1QjtJQUVsQyxnQkFBZ0IsQ0FBQzs7OztZQUxsQixVQUFVLFNBQUM7Z0JBQ1YsVUFBVSxFQUFFLE1BQU07YUFDbkIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3RhYmxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBJbmplY3RhYmxlKHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnXG59KVxuZXhwb3J0IGNsYXNzIE5neFZpZGVvVGltZWxpbmVTZXJ2aWNlIHtcblxuICBjb25zdHJ1Y3RvcigpIHsgfVxufVxuIl19

@@ -5,2 +5,2 @@ /**

export * from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXZpZGVvLXRpbWVsaW5lLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9tYWMvbmV3LXRlY2gvbmd4LXZpZGVvLXRpbWVsaW5lL3Byb2plY3RzL3RpbWVsaW5lL3NyYy8iLCJzb3VyY2VzIjpbIm5neC12aWRlby10aW1lbGluZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LXZpZGVvLXRpbWVsaW5lLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9tYWMvbGVub24vcmVwb3NpdG9yaWVzL25neC12aWRlby10aW1lbGluZS9wcm9qZWN0cy90aW1lbGluZS9zcmMvIiwic291cmNlcyI6WyJuZ3gtdmlkZW8tdGltZWxpbmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==

@@ -7,2 +7,2 @@ /*

export * from './lib/timeline.module';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvVXNlcnMvbWFjL25ldy10ZWNoL25neC12aWRlby10aW1lbGluZS9wcm9qZWN0cy90aW1lbGluZS9zcmMvIiwic291cmNlcyI6WyJwdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsdUJBQXVCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIHRpbWVsaW5lXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvdGltZWxpbmUuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90aW1lbGluZS5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdGltZWxpbmUubW9kdWxlJztcbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvVXNlcnMvbWFjL2xlbm9uL3JlcG9zaXRvcmllcy9uZ3gtdmlkZW8tdGltZWxpbmUvcHJvamVjdHMvdGltZWxpbmUvc3JjLyIsInNvdXJjZXMiOlsicHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLHVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiB0aW1lbGluZVxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL3RpbWVsaW5lLnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdGltZWxpbmUuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3RpbWVsaW5lLm1vZHVsZSc7XG4iXX0=

@@ -1,4 +0,3 @@

import { __decorate } from 'tslib';
import * as i0 from '@angular/core';
import { Injectable, EventEmitter, Input, Output, ViewChild, HostListener, Component, NgModule } from '@angular/core';
import { Injectable, EventEmitter, Component, Input, Output, ViewChild, HostListener, NgModule } from '@angular/core';
import * as _moment from 'dayjs';

@@ -8,11 +7,12 @@ import { interval } from 'rxjs';

let NgxVideoTimelineService = class NgxVideoTimelineService {
class NgxVideoTimelineService {
constructor() { }
};
}
NgxVideoTimelineService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NgxVideoTimelineService_Factory() { return new NgxVideoTimelineService(); }, token: NgxVideoTimelineService, providedIn: "root" });
NgxVideoTimelineService = __decorate([
Injectable({
providedIn: 'root'
})
], NgxVideoTimelineService);
NgxVideoTimelineService.decorators = [
{ type: Injectable, args: [{
providedIn: 'root'
},] }
];
NgxVideoTimelineService.ctorParameters = () => [];

@@ -31,3 +31,3 @@ const moment = _moment;

}
let NgxVideoTimelineComponent = class NgxVideoTimelineComponent {
class NgxVideoTimelineComponent {
constructor() {

@@ -702,88 +702,47 @@ // The height of the outer canvas

}
}
NgxVideoTimelineComponent.decorators = [
{ type: Component, args: [{
selector: 'ngx-video-timeline',
template: "<canvas #timeline class=\"canvas\" [ngStyle]=\"{cursor: 'pointer',border: '1px solid',borderColor: borderColor,'backgroundColor': bgColor}\"\n (dragstart)=\"onDragStart($event)\" (mouseup)=\"mouseupFunc($event)\" (mousewheel)=\"mousewheelFunc($event)\"\n (mousedown)=\"mousedownFunc($event)\" (mousemove)=\"mousemoveFunc($event)\" (mouseout)=\"mouseoutFunc()\"></canvas>\n",
styles: [".canvas{height:100%;width:100%}"]
},] }
];
NgxVideoTimelineComponent.ctorParameters = () => [];
NgxVideoTimelineComponent.propDecorators = {
canvasHeight: [{ type: Input }],
playTime: [{ type: Input }],
speed: [{ type: Input }],
forWardValue: [{ type: Input }],
startTimeThreshold: [{ type: Input }],
endTimeThreshold: [{ type: Input }],
borderColor: [{ type: Input }],
bgColor: [{ type: Input }],
bottomLineColor: [{ type: Input }],
verticalBarColor: [{ type: Input }],
playBarColor: [{ type: Input }],
videoCells: [{ type: Input }],
isPlayClick: [{ type: Input }],
playClick: [{ type: Output }],
mouseUp: [{ type: Output }],
mouseDown: [{ type: Output }],
keyUp: [{ type: Output }],
keyDown: [{ type: Output }],
canvasExp: [{ type: ViewChild, args: ['timeline', { static: true },] }],
onResize: [{ type: HostListener, args: ['window:resize', [],] }],
onKeyDown: [{ type: HostListener, args: ['window:keydown', ['$event'],] }],
onKeyUp: [{ type: HostListener, args: ['window:keyup', ['$event'],] }]
};
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "canvasHeight", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "playTime", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "speed", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "forWardValue", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "startTimeThreshold", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "endTimeThreshold", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "borderColor", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "bgColor", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "bottomLineColor", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "verticalBarColor", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "playBarColor", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "videoCells", void 0);
__decorate([
Input()
], NgxVideoTimelineComponent.prototype, "isPlayClick", void 0);
__decorate([
Output()
], NgxVideoTimelineComponent.prototype, "playClick", void 0);
__decorate([
Output()
], NgxVideoTimelineComponent.prototype, "mouseUp", void 0);
__decorate([
Output()
], NgxVideoTimelineComponent.prototype, "mouseDown", void 0);
__decorate([
Output()
], NgxVideoTimelineComponent.prototype, "keyUp", void 0);
__decorate([
Output()
], NgxVideoTimelineComponent.prototype, "keyDown", void 0);
__decorate([
ViewChild('timeline', { static: true })
], NgxVideoTimelineComponent.prototype, "canvasExp", void 0);
__decorate([
HostListener('window:resize', [])
], NgxVideoTimelineComponent.prototype, "onResize", null);
__decorate([
HostListener('window:keydown', ['$event'])
], NgxVideoTimelineComponent.prototype, "onKeyDown", null);
__decorate([
HostListener('window:keyup', ['$event'])
], NgxVideoTimelineComponent.prototype, "onKeyUp", null);
NgxVideoTimelineComponent = __decorate([
Component({
selector: 'ngx-video-timeline',
template: "<canvas #timeline class=\"canvas\" [ngStyle]=\"{cursor: 'pointer',border: '1px solid',borderColor: borderColor,'backgroundColor': bgColor}\"\n (dragstart)=\"onDragStart($event)\" (mouseup)=\"mouseupFunc($event)\" (mousewheel)=\"mousewheelFunc($event)\"\n (mousedown)=\"mousedownFunc($event)\" (mousemove)=\"mousemoveFunc($event)\" (mouseout)=\"mouseoutFunc()\"></canvas>\n",
styles: [".canvas{height:100%;width:100%}"]
})
], NgxVideoTimelineComponent);
let NgxVideoTimelineModule = class NgxVideoTimelineModule {
};
NgxVideoTimelineModule = __decorate([
NgModule({
declarations: [NgxVideoTimelineComponent],
imports: [
CommonModule
],
exports: [NgxVideoTimelineComponent]
})
], NgxVideoTimelineModule);
class NgxVideoTimelineModule {
}
NgxVideoTimelineModule.decorators = [
{ type: NgModule, args: [{
declarations: [NgxVideoTimelineComponent],
imports: [
CommonModule
],
exports: [NgxVideoTimelineComponent]
},] }
];

@@ -790,0 +749,0 @@ /*

{
"name": "ngx-video-timeline",
"version": "0.1.1",
"version": "0.1.4",
"peerDependencies": {
"@angular/common": "^9.1.12",
"@angular/core": "^9.1.12"
"@angular/common": "~10.2.5",
"@angular/core": "~10.2.5"
},
"dependencies": {
"tslib": "^1.10.0"
"tslib": "^2.0.0"
},

@@ -11,0 +11,0 @@ "description": "a video timeline for ng2+",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc