Svallinns locale fix
This commit is contained in:
parent
9f0a9da85c
commit
49aab11acb
|
@ -385,7 +385,9 @@ export default Vue.extend({
|
|||
.captionTracks
|
||||
|
||||
if (typeof captionTracks !== 'undefined') {
|
||||
const standardLocale = localStorage.getItem('locale').replace('_', '-')
|
||||
const locale = localStorage.getItem('locale')
|
||||
if (locale !== null) {
|
||||
const standardLocale = locale.replace('_', '-')
|
||||
const noLocaleCaption = !captionTracks.some(track =>
|
||||
track.languageCode === standardLocale && track.kind !== 'asr'
|
||||
)
|
||||
|
@ -394,6 +396,7 @@ export default Vue.extend({
|
|||
const baseUrl = result.player_response.captions.playerCaptionsRenderer.baseUrl
|
||||
this.tryAddingTranslatedLocaleCaption(captionTracks, standardLocale, baseUrl)
|
||||
}
|
||||
}
|
||||
|
||||
this.captionHybridList = this.createCaptionPromiseList(captionTracks)
|
||||
|
||||
|
|
Loading…
Reference in New Issue