From 35dca27e83b63b005a6f5dd770a7b5e2751d02ae Mon Sep 17 00:00:00 2001 From: jojohoch <joachim.hoch@iqb.hu-berlin.de> Date: Mon, 13 Dec 2021 14:31:34 +0100 Subject: [PATCH] [player] Fix disabling mute button of audios and videos - Use the same default state for interactiveMuteControl and for playerProps.interactiveMuteControl --- docs/release-notes-player.txt | 3 ++- .../common/components/control-bar/control-bar.component.html | 1 + projects/common/util/unit-interface-initializer.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/release-notes-player.txt b/docs/release-notes-player.txt index 6b56ce45d..0759f4a9d 100644 --- a/docs/release-notes-player.txt +++ b/docs/release-notes-player.txt @@ -2,7 +2,8 @@ Player ====== 1.12.0 - Fix the playability of dependent audios and videos -- Fix storing/restoring the playback time of audios and videos +- Fix storing/restoring of the playback time of audios and videos +- Fix disabling mute button of audios and videos - Fix the response status when re-entering the unit - Ignore blank pages when calculating the response progress - Fix position of virtual keyboard for text areas diff --git a/projects/common/components/control-bar/control-bar.component.html b/projects/common/components/control-bar/control-bar.component.html index e917fdaf1..8bdca4541 100644 --- a/projects/common/components/control-bar/control-bar.component.html +++ b/projects/common/components/control-bar/control-bar.component.html @@ -62,6 +62,7 @@ <button mat-button type="button" class="control-button" + [disabled]="!playerProperties.interactiveMuteControl" [class.enabled-control]="playerProperties.interactiveMuteControl" (click)="toggleVolume()"> <mat-icon *ngIf="!player.muted">volume_up</mat-icon> diff --git a/projects/common/util/unit-interface-initializer.ts b/projects/common/util/unit-interface-initializer.ts index e9403bc2d..d42fe1959 100644 --- a/projects/common/util/unit-interface-initializer.ts +++ b/projects/common/util/unit-interface-initializer.ts @@ -167,7 +167,7 @@ export function initPlayerElement(serializedElement: Partial<UIElement>): Player muteControl: serializedElement.muteControl !== undefined ? serializedElement.muteControl as boolean : true, interactiveMuteControl: serializedElement.interactiveMuteControl !== undefined ? - serializedElement.interactiveMuteControl as boolean : true, + serializedElement.interactiveMuteControl as boolean : false, hintLabel: serializedElement.hintLabel as string || '', hintLabelDelay: serializedElement.hintLabelDelay !== undefined ? serializedElement.hintLabelDelay as number : 0, uninterruptible: -- GitLab