mirror of
https://github.com/TeamPiped/Piped.git
synced 2026-01-26 05:29:56 +00:00
fix: enable audio language selection on Safari
Removes the Safari-specific check that was preventing selectAudioLanguage() from being called. This was causing: 1. Videos defaulting to first audio track instead of preferred language 2. Language menu not appearing in player overflow menu Fixes #4090
This commit is contained in:
@@ -617,15 +617,11 @@ export default {
|
|||||||
player
|
player
|
||||||
.load(uri, startTime, mime)
|
.load(uri, startTime, mime)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
const isSafari = window.navigator?.vendor?.includes("Apple");
|
// Set the audio language
|
||||||
|
|
||||||
let lang = "en";
|
let lang = "en";
|
||||||
if (!isSafari) {
|
const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
|
||||||
// Set the audio language
|
if (player.getAudioLanguages().includes(prefLang)) lang = prefLang;
|
||||||
const prefLang = this.getPreferenceString("hl", "en").substr(0, 2);
|
player.selectAudioLanguage(lang);
|
||||||
if (player.getAudioLanguages().includes(prefLang)) lang = prefLang;
|
|
||||||
player.selectAudioLanguage(lang);
|
|
||||||
}
|
|
||||||
|
|
||||||
const audioLanguages = player.getAudioLanguages();
|
const audioLanguages = player.getAudioLanguages();
|
||||||
if (audioLanguages.length > 1) {
|
if (audioLanguages.length > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user