diff --git a/projects/player/src/app/components/layouts/player-layout/player-layout.component.spec.ts b/projects/player/src/app/components/layouts/player-layout/player-layout.component.spec.ts index 8527a4b02ecde114f0308297fb3f1b92f428661e..82d08faeb8aef4a50838006584725a8578036a23 100644 --- a/projects/player/src/app/components/layouts/player-layout/player-layout.component.spec.ts +++ b/projects/player/src/app/components/layouts/player-layout/player-layout.component.spec.ts @@ -16,10 +16,11 @@ describe('PlayerLayoutComponent', () => { @Directive({ selector: '[aspectPlayerState]' }) class PlayerStateStubDirective { @Input() validPages!: Record<string, string>; - @Input() currentPlayerPageIndex!: number; + @Input() currentPageIndex!: number; @Input() isPlayerRunning!: BehaviorSubject<boolean>; } + @Component({ selector: 'aspect-pages-layout', template: '' }) class PagesLayoutStubComponent { @Input() pages!: Page[]; diff --git a/projects/player/src/app/components/unit/unit.component.html b/projects/player/src/app/components/unit/unit.component.html index c509a451f3592442010575b94f34d9f58475162f..56820ef5f07f29b29eae90da113c814c86249992 100644 --- a/projects/player/src/app/components/unit/unit.component.html +++ b/projects/player/src/app/components/unit/unit.component.html @@ -5,7 +5,7 @@ aspectUnitState aspectPlayerState [validPages]="pages | validPages" - [currentPlayerPageIndex]="pagesLayout.selectedIndex" + [currentPageIndex]="pagesLayout.selectedIndex" [isPlayerRunning]="playerLayout.isPlayerRunning"> <aspect-pages-layout #pagesLayout diff --git a/projects/player/src/app/directives/player-state.directive.ts b/projects/player/src/app/directives/player-state.directive.ts index 57fecdf438092ffff080e4ddea807e339a4a5022..366af704508a2fb5235da64ad36c91f3e8ec11e1 100644 --- a/projects/player/src/app/directives/player-state.directive.ts +++ b/projects/player/src/app/directives/player-state.directive.ts @@ -13,7 +13,7 @@ import { LogService } from 'player/modules/logging/services/log.service'; }) export class PlayerStateDirective implements OnInit, OnChanges { @Input() validPages!: Record<string, string>; - @Input() currentPlayerPageIndex!: number; + @Input() currentPageIndex!: number; @Input() isPlayerRunning!: BehaviorSubject<boolean>; private ngUnsubscribe = new Subject<void>(); @@ -29,7 +29,7 @@ export class PlayerStateDirective implements OnInit, OnChanges { } ngOnChanges(changes: SimpleChanges): void { - if (changes.currentPlayerPageIndex) { + if (changes.currentPageIndex) { this.sendVopStateChangedNotification(); } } @@ -58,10 +58,10 @@ export class PlayerStateDirective implements OnInit, OnChanges { private sendVopStateChangedNotification(requested:boolean = false): void { const playerState: PlayerState = { state: this.state, - currentPage: this.currentPlayerPageIndex.toString(10), + currentPage: this.currentPageIndex.toString(10), validPages: this.validPages }; - LogService.warn('player: sendVopStateChangedNotification', playerState); + LogService.info('player: sendVopStateChangedNotification', playerState); this.veronaPostService.sendVopStateChangedNotification({ playerState }, requested); }