diff --git a/docs/release-notes-player.txt b/docs/release-notes-player.txt index d8860d84d95b48fc04227143402b8b88bdc29ad1..145f813ef8990130180448e85888261ba8f1851f 100644 --- a/docs/release-notes-player.txt +++ b/docs/release-notes-player.txt @@ -2,6 +2,7 @@ Player ====== 1.14.1 - Fix restoring of toggle buttons +- Prevent audio/video hint text from being displayed after reloading a played audio/video file - Fix marking text when the selection is empty at the end - Improve checking of responsesProgress of compound elements diff --git a/projects/common/components/control-bar/control-bar.component.ts b/projects/common/components/control-bar/control-bar.component.ts index c032a3c5526e589938b80e9b5c43b525efbcfa69..78e5b8773e0d3649e89ab59b1ecc2bb23ea378fa 100644 --- a/projects/common/components/control-bar/control-bar.component.ts +++ b/projects/common/components/control-bar/control-bar.component.ts @@ -40,6 +40,8 @@ export class ControlBarComponent implements OnInit, OnChanges, OnDestroy { ngOnInit(): void { this.dependencyDissolved = !this.playerProperties.activeAfterID; this.playbackTime = this.playerProperties.playbackTime; + this.started = this.playbackTime > 0; + this.runCounter = Math.floor(this.playbackTime); this.player.ondurationchange = () => this.initTimeValues(); this.player.ontimeupdate = () => { this.currentTime = this.player.currentTime / 60; @@ -173,9 +175,8 @@ export class ControlBarComponent implements OnInit, OnChanges, OnDestroy { if (!this.duration) { if ((this.player.duration !== Infinity) && this.player.duration) { this.duration = this.player.duration / 60; - this.currentRestTime = (this.player.duration - this.player.currentTime) / 60; - this.runCounter = Math.floor(this.playerProperties.playbackTime); this.player.currentTime = (this.playerProperties.playbackTime - this.runCounter) * this.player.duration; + this.currentRestTime = (this.player.duration - this.player.currentTime) / 60; this.checkDisabledState(this.runCounter); this.checkValidState(this.runCounter); this.sendPlaybackTimeChanged();