From 938b48b688409c2b0ca51fff80198113b3a3cba3 Mon Sep 17 00:00:00 2001 From: jojohoch <joachim.hoch@iqb.hu-berlin.de> Date: Tue, 5 Oct 2021 16:32:24 +0200 Subject: [PATCH] [player] Stop console logging --- projects/player/src/app/app.component.ts | 6 +++--- .../player-state/player-state.component.ts | 8 ++++---- .../components/unit-state/unit-state.component.ts | 8 ++++---- .../player/src/app/services/verona-post.service.ts | 4 ++-- .../app/services/verona-subscription.service.ts | 14 +++++++------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/projects/player/src/app/app.component.ts b/projects/player/src/app/app.component.ts index 9f9a4f101..99203d633 100644 --- a/projects/player/src/app/app.component.ts +++ b/projects/player/src/app/app.component.ts @@ -54,7 +54,7 @@ export class AppComponent implements OnInit { this.reset(); setTimeout(() => { // eslint-disable-next-line no-console - console.log('player: onStart', message); + // console.log('player: onStart', message); const unitDefinition: Unit = message.unitDefinition ? JSON.parse(message.unitDefinition) : {}; if (this.metaDataService.verifyUnitDefinitionVersion(unitDefinition.veronaModuleVersion)) { this.playerConfig = message.playerConfig || {}; @@ -78,13 +78,13 @@ export class AppComponent implements OnInit { private onFocus(focused: boolean): void { // eslint-disable-next-line no-console - console.log('player: onFocus', focused); + // console.log('player: onFocus', focused); this.veronaPostService.sendVopWindowFocusChangedNotification(focused); } private reset(): void { // eslint-disable-next-line no-console - console.log('player: reset'); + // console.log('player: reset'); this.pages = []; this.playerConfig = {}; this.unitStateElementCodes = []; diff --git a/projects/player/src/app/components/player-state/player-state.component.ts b/projects/player/src/app/components/player-state/player-state.component.ts index 3011f559e..2936c5ea9 100644 --- a/projects/player/src/app/components/player-state/player-state.component.ts +++ b/projects/player/src/app/components/player-state/player-state.component.ts @@ -68,21 +68,21 @@ export class PlayerStateComponent implements OnInit, OnDestroy { private onContinue(message: VopContinueCommand): void { // eslint-disable-next-line no-console - console.log('player: onContinue', message); + // console.log('player: onContinue', message); this.running = true; this.sendVopStateChangedNotification(); } private onStop(message: VopStopCommand): void { // eslint-disable-next-line no-console - console.log('player: onStop', message); + // console.log('player: onStop', message); this.running = false; this.sendVopStateChangedNotification(); } private onGetStateRequest(message: VopGetStateRequest): void { // eslint-disable-next-line no-console - console.log('player: onGetStateRequest', message); + // console.log('player: onGetStateRequest', message); if (message.stop) { this.running = false; } @@ -91,7 +91,7 @@ export class PlayerStateComponent implements OnInit, OnDestroy { private onPageNavigation(message: VopPageNavigationCommand): void { // eslint-disable-next-line no-console - console.log('player: onPageNavigation', message); + // console.log('player: onPageNavigation', message); this.selectIndex.next(parseInt(message.target, 10)); } diff --git a/projects/player/src/app/components/unit-state/unit-state.component.ts b/projects/player/src/app/components/unit-state/unit-state.component.ts index 934a482bf..e67976f4f 100644 --- a/projects/player/src/app/components/unit-state/unit-state.component.ts +++ b/projects/player/src/app/components/unit-state/unit-state.component.ts @@ -108,7 +108,7 @@ export class UnitStateComponent implements OnInit, OnDestroy { private onNavigationDenied(message: VopNavigationDeniedNotification): void { // eslint-disable-next-line no-console - console.log('player: onNavigationDenied', message); + // console.log('player: onNavigationDenied', message); const reasons = message.reason?.map((reason: string) => this.translateService.instant(reason)); this.messageService.showWarning(reasons?.join(', ') || this.translateService.instant('noReason')); this.form.markAllAsTouched(); @@ -125,13 +125,13 @@ export class UnitStateComponent implements OnInit, OnDestroy { private onElementValueChanges = (value: ValueChangeElement): void => { // eslint-disable-next-line no-console - console.log(`player: onElementValueChanges ${value.id}: old: ${value.values[0]}, new: ${value.values[1]}`); + // console.log(`player: onElementValueChanges ${value.id}: old: ${value.values[0]}, new: ${value.values[1]}`); this.setUnitStateElementCodeValue(value.id, value.values[1]); }; private onFormChanges(): void { // eslint-disable-next-line no-console - console.log('player: onFormChanges', this.unitStateElementCodes); + // console.log('player: onFormChanges', this.unitStateElementCodes); this.sendVopStateChangedNotification(); } @@ -140,7 +140,7 @@ export class UnitStateComponent implements OnInit, OnDestroy { this.presentedPages.push(pagePresented); } // eslint-disable-next-line no-console - console.log('player: onPresentedPageAdded', this.presentedPages); + // console.log('player: onPresentedPageAdded', this.presentedPages); this.sendVopStateChangedNotification(); } diff --git a/projects/player/src/app/services/verona-post.service.ts b/projects/player/src/app/services/verona-post.service.ts index 651783d63..cd83ed737 100644 --- a/projects/player/src/app/services/verona-post.service.ts +++ b/projects/player/src/app/services/verona-post.service.ts @@ -38,7 +38,7 @@ export class VeronaPostService { window.parent.postMessage(message, '*'); } else { // eslint-disable-next-line no-console - console.warn('player: no host detected'); + // console.warn('player: no host detected'); } } @@ -77,7 +77,7 @@ export class VeronaPostService { }); } else { // eslint-disable-next-line no-console - console.warn('player: no playerMetadata defined'); + // console.warn('player: no playerMetadata defined'); } } diff --git a/projects/player/src/app/services/verona-subscription.service.ts b/projects/player/src/app/services/verona-subscription.service.ts index ff0da4924..b1faff4d6 100644 --- a/projects/player/src/app/services/verona-subscription.service.ts +++ b/projects/player/src/app/services/verona-subscription.service.ts @@ -32,37 +32,37 @@ export class VeronaSubscriptionService { switch (messageData.type) { case 'vopStartCommand': // eslint-disable-next-line no-console - console.log('player: _vopStartCommand ', messageData); + // console.log('player: _vopStartCommand ', messageData); this._vopStartCommand.next(messageData); break; case 'vopNavigationDeniedNotification': // eslint-disable-next-line no-console - console.log('player: _vopNavigationDeniedNotification ', messageData); + // console.log('player: _vopNavigationDeniedNotification ', messageData); this._vopNavigationDeniedNotification.next(messageData); break; case 'vopPageNavigationCommand': // eslint-disable-next-line no-console - console.log('player: _vopPageNavigationCommand ', messageData); + // console.log('player: _vopPageNavigationCommand ', messageData); this._vopPageNavigationCommand.next(messageData); break; case 'vopStopCommand': // eslint-disable-next-line no-console - console.log('player: _vopStopCommand ', messageData); + // console.log('player: _vopStopCommand ', messageData); this._vopStopCommand.next(messageData); break; case 'vopContinueCommand': // eslint-disable-next-line no-console - console.log('player: _vopContinueCommand ', messageData); + // console.log('player: _vopContinueCommand ', messageData); this._vopContinueCommand.next(messageData); break; case 'vopGetStateRequest': // eslint-disable-next-line no-console - console.log('player: _vopGetStateRequest ', messageData); + // console.log('player: _vopGetStateRequest ', messageData); this._vopGetStateRequest.next(messageData); break; default: // eslint-disable-next-line no-console - console.warn(`player: got message of unknown type ${messageData.type}`); + // console.warn(`player: got message of unknown type ${messageData.type}`); } } -- GitLab