mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-01-25 21:19:54 +00:00
Merge pull request #4138 from johnpc/fix/audio-language-menu
fix: fix audio language selection on Safari
This commit is contained in:
@@ -617,15 +617,11 @@ export default {
|
||||
player
|
||||
.load(uri, startTime, mime)
|
||||
.then(() => {
|
||||
const isSafari = window.navigator?.vendor?.includes("Apple");
|
||||
|
||||
// Set the audio language
|
||||
let lang = "en";
|
||||
if (!isSafari) {
|
||||
// Set the audio language
|
||||
const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
|
||||
if (player.getAudioLanguages().includes(prefLang)) lang = prefLang;
|
||||
player.selectAudioLanguage(lang);
|
||||
}
|
||||
const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
|
||||
if (player.getAudioLanguages().includes(prefLang)) lang = prefLang;
|
||||
player.selectAudioLanguage(lang);
|
||||
|
||||
const audioLanguages = player.getAudioLanguages();
|
||||
if (audioLanguages.length > 1) {
|
||||
|
||||
Reference in New Issue
Block a user