From 51f39e58ce2b98027c9f47fc0051b02cd2808fe3 Mon Sep 17 00:00:00 2001
From: jojohoch <joachim.hoch@iqb.hu-berlin.de>
Date: Tue, 18 Jan 2022 10:55:51 +0100
Subject: [PATCH] Remove media properties 'uninterruptible' and
 'hideOtherPages'

- 'hideOtherPages' is not supported by verona api
- 'uninterruptible' is already fulfilled by disabling pause and
progress bar
---
 .../components/control-bar/control-bar.component.ts       | 4 ----
 projects/common/models/uI-element.ts                      | 2 --
 projects/common/util/unit-interface-initializer.ts        | 8 --------
 .../components/dialogs/player-edit-dialog.component.ts    | 8 --------
 projects/editor/src/assets/i18n/de.json                   | 2 --
 5 files changed, 24 deletions(-)

diff --git a/projects/common/components/control-bar/control-bar.component.ts b/projects/common/components/control-bar/control-bar.component.ts
index 44b6e9b2c..fbf12fcda 100644
--- a/projects/common/components/control-bar/control-bar.component.ts
+++ b/projects/common/components/control-bar/control-bar.component.ts
@@ -33,10 +33,6 @@ export class ControlBarComponent implements OnInit, OnChanges, OnDestroy {
   playbackTime!: number;
   valid!: boolean;
 
-  // TODO:
-  // uninterruptible: boolean; // false kein Blättern; starten eines anderen Videos; ....
-  // hideOtherPages: boolean; // false (Solange nicht vollständig gespielt, sind alle anderen Seiten verborgen)
-
   ngOnInit(): void {
     this.dependencyDissolved = !this.playerProperties.activeAfterID;
     this.playbackTime = this.playerProperties.playbackTime;
diff --git a/projects/common/models/uI-element.ts b/projects/common/models/uI-element.ts
index 829e3b308..d70d6b12c 100644
--- a/projects/common/models/uI-element.ts
+++ b/projects/common/models/uI-element.ts
@@ -185,8 +185,6 @@ export interface PlayerProperties {
   interactiveMuteControl: boolean;
   hintLabel: string;
   hintLabelDelay: number;
-  uninterruptible: boolean;
-  hideOtherPages: boolean;
   activeAfterID: string;
   minRuns: number;
   maxRuns: number | null;
diff --git a/projects/common/util/unit-interface-initializer.ts b/projects/common/util/unit-interface-initializer.ts
index afb138728..65bc2fb26 100644
--- a/projects/common/util/unit-interface-initializer.ts
+++ b/projects/common/util/unit-interface-initializer.ts
@@ -138,10 +138,6 @@ export function initPlayerElement(serializedElement: Partial<UIElement>): Player
       hintLabel: serializedElement.playerProps.hintLabel as string || '',
       hintLabelDelay: serializedElement.playerProps.hintLabelDelay !== undefined ?
         serializedElement.playerProps.hintLabelDelay as number : 0,
-      uninterruptible: serializedElement.playerProps.uninterruptible !== undefined ?
-        serializedElement.playerProps.uninterruptible as boolean : false,
-      hideOtherPages: serializedElement.playerProps.hideOtherPages !== undefined ?
-        serializedElement.playerProps.hideOtherPages as boolean : false,
       activeAfterID: serializedElement.playerProps.activeAfterID as string || '',
       minRuns: serializedElement.playerProps.minRuns !== undefined ?
         serializedElement.playerProps.minRuns as number : 1,
@@ -174,10 +170,6 @@ export function initPlayerElement(serializedElement: Partial<UIElement>): Player
         serializedElement.interactiveMuteControl as boolean : false,
     hintLabel: serializedElement.hintLabel as string || '',
     hintLabelDelay: serializedElement.hintLabelDelay !== undefined ? serializedElement.hintLabelDelay as number : 0,
-    uninterruptible:
-      serializedElement.uninterruptible !== undefined ? serializedElement.uninterruptible as boolean : false,
-    hideOtherPages:
-      serializedElement.hideOtherPages !== undefined ? serializedElement.hideOtherPages as boolean : false,
     activeAfterID: serializedElement.activeAfterID as string || '',
     minRuns: serializedElement.minRuns !== undefined ? serializedElement.minRuns as number : 1,
     maxRuns: serializedElement.maxRuns !== undefined ? serializedElement.maxRuns as number : null,
diff --git a/projects/editor/src/app/components/dialogs/player-edit-dialog.component.ts b/projects/editor/src/app/components/dialogs/player-edit-dialog.component.ts
index a180a6b3f..3b2aff595 100644
--- a/projects/editor/src/app/components/dialogs/player-edit-dialog.component.ts
+++ b/projects/editor/src/app/components/dialogs/player-edit-dialog.component.ts
@@ -83,14 +83,6 @@ import { PlayerProperties } from '../../../../../common/models/uI-element';
                           (change)="newPlayerConfig.loop = $event.checked">
               {{ 'player.loop' | translate }}
             </mat-checkbox>
-            <mat-checkbox [checked]="newPlayerConfig.uninterruptible || data.playerProps.uninterruptible"
-                          (change)="newPlayerConfig.uninterruptible = $event.checked">
-              {{ 'player.uninterruptible' | translate }}
-            </mat-checkbox>
-            <mat-checkbox [checked]="newPlayerConfig.hideOtherPages || data.playerProps.hideOtherPages"
-                          (change)="newPlayerConfig.hideOtherPages = $event.checked">
-              {{ 'player.hideOtherPages' | translate }}
-            </mat-checkbox>
             <mat-form-field appearance="fill">
               <mat-label>{{ 'player.activeAfterID' | translate }}</mat-label>
               <input matInput type="text" [value]="newPlayerConfig.activeAfterID || data.playerProps.activeAfterID"
diff --git a/projects/editor/src/assets/i18n/de.json b/projects/editor/src/assets/i18n/de.json
index 32535b6f6..6879f1350 100644
--- a/projects/editor/src/assets/i18n/de.json
+++ b/projects/editor/src/assets/i18n/de.json
@@ -152,8 +152,6 @@
     "interactiveMuteControl": "Stummschaltung (steuerbar)",
     "minVolume": "Minimale Lautstärke",
     "defaultVolume": "Voreingestellte Lautstärke",
-    "uninterruptible": "Unterbrechen verbieten",
-    "hideOtherPages": "Weitere Seiten verbergen",
     "showRestTime": "Verbleibende Zeit anzeigen",
     "showRestRuns": "Verbleibende Durchläufe anzeigen",
     "hintLabel": "Aufforderungstext zum Starten",
-- 
GitLab