From 34dbf36db384d58071355e5be65f2222bb6218d4 Mon Sep 17 00:00:00 2001 From: Martin Zurowietz Date: Fri, 14 Jun 2024 13:37:13 +0200 Subject: [PATCH] Finish mute video switch implementation --- resources/assets/js/videos/stores/settings.js | 1 + resources/assets/js/videos/videoContainer.vue | 2 +- resources/views/manual/tutorials/videos/sidebar.blade.php | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/videos/stores/settings.js b/resources/assets/js/videos/stores/settings.js index aaa1cc71b..d73f14d72 100644 --- a/resources/assets/js/videos/stores/settings.js +++ b/resources/assets/js/videos/stores/settings.js @@ -8,6 +8,7 @@ let defaults = { showMousePosition: false, showProgressIndicator: true, jumpStep: 5.0, + muteVideo: true, }; export default new Settings({ diff --git a/resources/assets/js/videos/videoContainer.vue b/resources/assets/js/videos/videoContainer.vue index 2422f5f52..6ba753606 100644 --- a/resources/assets/js/videos/videoContainer.vue +++ b/resources/assets/js/videos/videoContainer.vue @@ -701,7 +701,7 @@ export default { this.initAnnotationFilters(); this.restoreUrlParams(); - this.video.muted = Settings.get('muteVideo'); + this.video.muted = this.settings.muteVideo; this.video.preload = 'auto'; this.video.addEventListener('error', function (e) { if (e.target.error.code === MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED) { diff --git a/resources/views/manual/tutorials/videos/sidebar.blade.php b/resources/views/manual/tutorials/videos/sidebar.blade.php index 303ae22b0..e05c0fa9d 100644 --- a/resources/views/manual/tutorials/videos/sidebar.blade.php +++ b/resources/views/manual/tutorials/videos/sidebar.blade.php @@ -75,5 +75,9 @@

The mouse position switch controls the display of an additional map overlay that shows the current position of the cursor on the video in pixels.

+ +

+ The mute video switch enables or disables the audio track of the video. +

@endsection