mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-12 04:29:49 +01:00
Check for more live stream qualities.
This commit is contained in:
parent
7886e3b360
commit
650cc4c0ba
@ -232,14 +232,29 @@ export default Vue.extend({
|
||||
if (typeof (format.mimeType) !== 'undefined') {
|
||||
return format.mimeType.includes('video/ts')
|
||||
}
|
||||
|
||||
return format.itag === 300 || format.itag === 301
|
||||
}).map((format) => {
|
||||
let qualityLabel
|
||||
|
||||
if (format.itag === 300) {
|
||||
qualityLabel = '720p'
|
||||
} else if (format.itag === 301) {
|
||||
qualityLabel = '1080p'
|
||||
} else {
|
||||
qualityLabel = format.qualityLabel
|
||||
}
|
||||
return {
|
||||
url: format.url,
|
||||
type: 'application/x-mpegURL',
|
||||
label: 'Dash',
|
||||
qualityLabel: format.qualityLabel
|
||||
qualityLabel: qualityLabel
|
||||
}
|
||||
}).reverse()
|
||||
}).sort((a, b) => {
|
||||
const qualityA = parseInt(a.qualityLabel.replace('p', ''))
|
||||
const qualityB = parseInt(b.qualityLabel.replace('p', ''))
|
||||
return qualityA - qualityB
|
||||
})
|
||||
|
||||
this.activeSourceList = this.videoSourceList
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user