Changes to logger insert (from videoData.logger instead as consructor param)

This commit is contained in:
Tamius Han 2019-09-03 22:42:38 +02:00
parent 3c1b5f4b1a
commit 0ab1f558e1
4 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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);