Don't select track if safari.

Closes #1793
Closes #1748
This commit is contained in:
Kavin 2022-12-06 17:31:34 +00:00
parent 6787ab82ff
commit 69eef12275
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -491,16 +491,20 @@ export default {
if (qualityConds) this.$player.configure("abr.enabled", false); if (qualityConds) this.$player.configure("abr.enabled", false);
player.load(uri, 0, mime).then(() => { player.load(uri, 0, mime).then(() => {
// Set the audio language const isSafari = window.navigator?.vendor?.includes("Apple");
const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
var lang = "en"; if (!isSafari) {
for (var l in player.getAudioLanguages()) { // Set the audio language
if (l == prefLang) { const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
lang = l; var lang = "en";
return; for (var l in player.getAudioLanguages()) {
if (l == prefLang) {
lang = l;
return;
}
} }
player.selectAudioLanguage(lang);
} }
player.selectAudioLanguage(lang);
if (qualityConds) { if (qualityConds) {
var leastDiff = Number.MAX_VALUE; var leastDiff = Number.MAX_VALUE;