Fix issue where Invidious DASH files were not being played correctly.

This commit is contained in:
PrestonN 2021-10-12 17:03:22 -04:00
parent 523a28d0f7
commit 2acd3261c4
2 changed files with 9 additions and 5 deletions

View File

@ -1065,7 +1065,7 @@ export default Vue.extend({
this.activeAdaptiveFormats.push(adaptiveFormat)
fps = adaptiveFormat.fps
fps = adaptiveFormat.fps ? adaptiveFormat.fps : 30
qualityLabel = adaptiveFormat.qualityLabel ? adaptiveFormat.qualityLabel : quality.height + 'p'
bitrate = quality.bitrate
} else {

View File

@ -431,12 +431,12 @@ export default Vue.extend({
}
if (typeof result.player_response.streamingData.adaptiveFormats !== 'undefined') {
const adaptiveFormats = result.player_response.streamingData.adaptiveFormats
this.adaptiveFormats = adaptiveFormats
if (this.proxyVideos) {
this.dashSrc = await this.createInvidiousDashManifest()
} else {
const adaptiveFormats = result.player_response.streamingData.adaptiveFormats
this.dashSrc = await this.createLocalDashManifest(adaptiveFormats)
this.adaptiveFormats = adaptiveFormats
}
this.audioSourceList = result.player_response.streamingData.adaptiveFormats.filter((format) => {
@ -544,7 +544,11 @@ export default Vue.extend({
this.videoPublished = result.published * 1000
this.videoDescriptionHtml = result.descriptionHtml
this.recommendedVideos = result.recommendedVideos
this.adaptiveFormats = result.adaptiveFormats
this.adaptiveFormats = result.adaptiveFormats.map((format) => {
format.bitrate = parseInt(format.bitrate)
format.height = parseInt(format.resolution.replace('p', ''))
return format
})
this.isLive = result.liveNow
this.captionHybridList = result.captions.map(caption => {
caption.url = this.currentInvidiousInstance + caption.url
@ -1040,7 +1044,7 @@ export default Vue.extend({
},
createInvidiousDashManifest: function () {
let url = `${this.currentInvidiousInstance}/api/manifest/dash/id/${this.videoId}.mpd`
let url = `${this.currentInvidiousInstance}/api/manifest/dash/id/${this.videoId}`
if (this.proxyVideos || !this.usingElectron) {
url = url + '?local=true'