diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index da990e87..1a0d6475 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -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 { diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index dc6d78b0..71fdefee 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -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'