Add captions to download links
This commit is contained in:
parent
654c83dc88
commit
1086d7b516
|
@ -334,6 +334,22 @@ export default Vue.extend({
|
||||||
|
|
||||||
return object
|
return object
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let captionLinks = result.playerResponse.captions
|
||||||
|
|
||||||
|
if (typeof captionLinks !== 'undefined') {
|
||||||
|
captionLinks = captionLinks.playerCaptionsTracklistRenderer.captionTracks.map((caption) => {
|
||||||
|
const label = `${caption.name.simpleText} (${caption.languageCode}) - text/vtt`
|
||||||
|
const object = {
|
||||||
|
url: caption.baseUrl,
|
||||||
|
label: label
|
||||||
|
}
|
||||||
|
|
||||||
|
return object
|
||||||
|
})
|
||||||
|
|
||||||
|
this.downloadLinks = this.downloadLinks.concat(captionLinks)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// video might be region locked or something else. This leads to no formats being available
|
// video might be region locked or something else. This leads to no formats being available
|
||||||
this.showToast({
|
this.showToast({
|
||||||
|
|
Loading…
Reference in New Issue