Auto display of subtitles if enabled

This commit is contained in:
JdM 2023-05-20 15:36:12 +02:00
parent 006067b019
commit 717b31f3fd

View file

@ -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