From 717b31f3fd11f78ea2e702bf49fafb26cadacd86 Mon Sep 17 00:00:00 2001 From: JdM Date: Sat, 20 May 2023 15:36:12 +0200 Subject: [PATCH] Auto display of subtitles if enabled --- src/components/VideoPlayer.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue index 1d5d5cb1..c643b055 100644 --- a/src/components/VideoPlayer.vue +++ b/src/components/VideoPlayer.vue @@ -587,6 +587,11 @@ export default { const rate = this.getPreferenceNumber("rate", 1); videoEl.playbackRate = rate; videoEl.defaultPlaybackRate = rate; + + const autoDisplayCaptions = this.getPreferenceBoolean("autoDisplayCaptions", false); + if (autoDisplayCaptions) { + this.$player.setTextTrackVisibility(!this.$player.isTextTrackVisible()); + } }); // expand the player to fullscreen when the fullscreen query equals true