Check for more live stream qualities.

This commit is contained in:
Preston 2020-06-04 22:44:58 -04:00
parent 7886e3b360
commit 650cc4c0ba
1 changed files with 17 additions and 2 deletions

View File

@ -232,14 +232,29 @@ export default Vue.extend({
if (typeof (format.mimeType) !== 'undefined') { if (typeof (format.mimeType) !== 'undefined') {
return format.mimeType.includes('video/ts') return format.mimeType.includes('video/ts')
} }
return format.itag === 300 || format.itag === 301
}).map((format) => { }).map((format) => {
let qualityLabel
if (format.itag === 300) {
qualityLabel = '720p'
} else if (format.itag === 301) {
qualityLabel = '1080p'
} else {
qualityLabel = format.qualityLabel
}
return { return {
url: format.url, url: format.url,
type: 'application/x-mpegURL', type: 'application/x-mpegURL',
label: 'Dash', 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 this.activeSourceList = this.videoSourceList
} else { } else {