From 0ab1f558e111ad5cf64bf0e836756c28b3a8af69 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Tue, 3 Sep 2019 22:42:38 +0200 Subject: [PATCH] Changes to logger insert (from videoData.logger instead as consructor param) --- src/ext/lib/ar-detect/ArDetector.js | 4 ++-- src/ext/lib/video-data/PlayerData.js | 4 ++-- src/ext/lib/video-data/VideoData.js | 6 +++--- src/ext/lib/video-transform/Resizer.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ext/lib/ar-detect/ArDetector.js b/src/ext/lib/ar-detect/ArDetector.js index d5f1f40..b4746b9 100644 --- a/src/ext/lib/ar-detect/ArDetector.js +++ b/src/ext/lib/ar-detect/ArDetector.js @@ -11,8 +11,8 @@ import AspectRatio from '../../../common/enums/aspect-ratio.enum'; class ArDetector { - constructor(videoData, logger){ - this.logger = logger; + constructor(videoData){ + this.logger = videoData.logger; this.conf = videoData; this.video = videoData.video; this.settings = videoData.settings; diff --git a/src/ext/lib/video-data/PlayerData.js b/src/ext/lib/video-data/PlayerData.js index 946ed10..660278f 100644 --- a/src/ext/lib/video-data/PlayerData.js +++ b/src/ext/lib/video-data/PlayerData.js @@ -33,7 +33,7 @@ if(Debug.debug) */ class PlayerData { - constructor(videoData, logger) { + constructor(videoData) { this.videoData = videoData; this.video = videoData.video; this.settings = videoData.settings; @@ -41,7 +41,7 @@ class PlayerData { this.element = undefined; this.dimensions = undefined; this.overlayNode = undefined; - this.logger = logger; + this.logger = videoData.logger; this.observer = new MutationObserver(this.onPlayerDimensionsChanged); diff --git a/src/ext/lib/video-data/VideoData.js b/src/ext/lib/video-data/VideoData.js index 100c25e..ca76cd2 100644 --- a/src/ext/lib/video-data/VideoData.js +++ b/src/ext/lib/video-data/VideoData.js @@ -29,10 +29,10 @@ class VideoData { // POZOR: VRSTNI RED JE POMEMBEN (arDetect mora bit zadnji) // NOTE: ORDERING OF OBJ INITIALIZATIONS IS IMPORTANT (arDetect needs to go last) - this.player = new PlayerData(this, this.logger); - this.resizer = new Resizer(this, this.logger); + this.player = new PlayerData(this); + this.resizer = new Resizer(this); - this.arDetector = new ArDetector(this, this.logger); // this starts Ar detection. needs optional parameter that prevets ardetdctor from starting + this.arDetector = new ArDetector(this); // this starts Ar detection. needs optional parameter that prevets ardetdctor from starting // player dimensions need to be in: // this.player.dimensions diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 7e3b5fb..325c78f 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -14,13 +14,13 @@ if(Debug.debug) { class Resizer { - constructor(videoData, logger) { + constructor(videoData) { this.conf = videoData; this.video = videoData.video; this.settings = videoData.settings; this.extensionMode = videoData.extensionMode; - this.logger = logger; + this.logger = videoData.logger; this.scaler = new Scaler(this.conf, logger); this.stretcher = new Stretcher(this.conf, logger);