diff --git a/src/common/interfaces/StretchInterface.ts b/src/common/interfaces/StretchInterface.ts index e19fb88..0568d0d 100644 --- a/src/common/interfaces/StretchInterface.ts +++ b/src/common/interfaces/StretchInterface.ts @@ -2,5 +2,6 @@ import StretchType from '../enums/StretchType.enum'; export interface Stretch { type: StretchType, - ratio?: number + ratio?: number, + limit?: number, } diff --git a/src/ext/lib/video-transform/Stretcher.ts b/src/ext/lib/video-transform/Stretcher.ts index e758e8e..b414162 100644 --- a/src/ext/lib/video-transform/Stretcher.ts +++ b/src/ext/lib/video-transform/Stretcher.ts @@ -24,10 +24,7 @@ class Stretcher { siteSettings: SiteSettings; //#endregion - //#region misc data stretch: Stretch; - fixedStretchRatio: any; - //#endregion // functions constructor(videoData) { @@ -65,11 +62,11 @@ class Stretcher { actualWidth = newWidth; } - let minW = this.conf.player.dimensions.width * (1 - this.settings.active.stretch.conditionalDifferencePercent); - let maxW = this.conf.player.dimensions.width * (1 + this.settings.active.stretch.conditionalDifferencePercent); + let minW = this.conf.player.dimensions.width * (1 - this.stretch.limit); + let maxW = this.conf.player.dimensions.width * (1 + this.stretch.limit); - let minH = this.conf.player.dimensions.height * (1 - this.settings.active.stretch.conditionalDifferencePercent); - let maxH = this.conf.player.dimensions.height * (1 + this.settings.active.stretch.conditionalDifferencePercent); + let minH = this.conf.player.dimensions.height * (1 - this.stretch.limit); + let maxH = this.conf.player.dimensions.height * (1 + this.stretch.limit); if (actualWidth >= minW && actualWidth <= maxW) { stretchFactors.xFactor *= this.conf.player.dimensions.width / actualWidth; @@ -80,16 +77,6 @@ class Stretcher { } calculateBasicStretch() { - // video.videoWidth in video.videoHeight predstavljata velikost datoteke. - // velikost video datoteke je lahko drugačna kot velikost