diff --git a/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue
index 5cb3a310..76de3aeb 100644
--- a/src/components/VideoPlayer.vue
+++ b/src/components/VideoPlayer.vue
@@ -609,16 +609,11 @@ export default {
.then(() => {
const isSafari = window.navigator?.vendor?.includes("Apple");
+ let lang = "en";
if (!isSafari) {
// Set the audio language
const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
- var lang = "en";
- for (var l of player.getAudioLanguages()) {
- if (l == prefLang) {
- lang = l;
- return;
- }
- }
+ if (player.getAudioLanguages().includes(prefLang)) lang = prefLang;
player.selectAudioLanguage(lang);
}
diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue
index 00afd9c0..fb03dd77 100644
--- a/src/components/WatchVideo.vue
+++ b/src/components/WatchVideo.vue
@@ -212,7 +212,7 @@
-