From 61895eccfb56f785750666463132f56775c67cf1 Mon Sep 17 00:00:00 2001 From: bonswouar Date: Sun, 15 Dec 2024 11:44:14 +0100 Subject: [PATCH] fix: wrong selection of default audio language it would always fallback to "en" as the loop was over array keys not values --- src/components/VideoPlayer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue index 1b80d7d2d0..5cb3a310ce 100644 --- a/src/components/VideoPlayer.vue +++ b/src/components/VideoPlayer.vue @@ -613,7 +613,7 @@ export default { // Set the audio language const prefLang = this.getPreferenceString("hl", "en").substr(0, 2); var lang = "en"; - for (var l in player.getAudioLanguages()) { + for (var l of player.getAudioLanguages()) { if (l == prefLang) { lang = l; return;