mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2025-10-31 04:32:01 +00:00 
			
		
		
		
	refactor: simplify and fix audio language selection
This commit is contained in:
		| @@ -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); | ||||
|                     } | ||||
|  | ||||
|   | ||||
| @@ -212,7 +212,7 @@ | ||||
|         <input id="chkAutoLoop" v-model="selectedAutoLoop" class="ml-1.5" type="checkbox" @change="onChange($event)" /> | ||||
|         <br /> | ||||
|         <label for="chkAutoPlay"><strong v-text="`${$t('actions.auto_play_next_video')}:`" /></label> | ||||
|         <select id="chkAutoPlay" v-model="selectedAutoPlay" class="ml-1.5 select" @change="onChange($event)"> | ||||
|         <select id="chkAutoPlay" v-model="selectedAutoPlay" class="select ml-1.5" @change="onChange($event)"> | ||||
|             <option value="0">none</option> | ||||
|             <option value="1">playlist only</option> | ||||
|             <option value="2">playlist and recommendations</option> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Bnyro
					Bnyro