Fix issue with recent live streams not being playable and update credits link in about

This commit is contained in:
Preston 2021-04-30 17:43:12 -04:00
parent 5322280b2f
commit 29cdae7f8e
2 changed files with 10 additions and 4 deletions

View File

@ -69,7 +69,7 @@ export default Vue.extend({
{
icon: 'users',
title: this.$t('About.Credits'),
content: `${this.$t('About.FreeTube is made possible by')} <a href="https://github.com/FreeTubeApp/FreeTube/wiki/Credits">${this.$t('About.these people and projects')}</a>`
content: `${this.$t('About.FreeTube is made possible by')} <a href="https://docs.freetubeapp.io/credits/">${this.$t('About.these people and projects')}</a>`
},
{
icon: 'heart',

View File

@ -291,7 +291,7 @@ export default Vue.extend({
this.videoLikeCount = isNaN(result.videoDetails.likes) ? 0 : result.videoDetails.likes
this.videoDislikeCount = isNaN(result.videoDetails.dislikes) ? 0 : result.videoDetails.dislikes
}
this.isLive = result.player_response.videoDetails.isLive
this.isLive = result.player_response.videoDetails.isLive || result.player_response.videoDetails.isLiveContent
this.isLiveContent = result.player_response.videoDetails.isLiveContent
this.isUpcoming = result.player_response.videoDetails.isUpcoming ? result.player_response.videoDetails.isUpcoming : false
@ -359,8 +359,14 @@ export default Vue.extend({
} else {
this.videoLengthSeconds = parseInt(result.videoDetails.lengthSeconds)
if (result.player_response.streamingData !== undefined) {
if (typeof (result.player_response.streamingData.formats) !== 'undefined') {
this.videoSourceList = result.player_response.streamingData.formats.reverse()
this.downloadLinks = result.formats.map((format) => {
} else {
this.videoSourceList = result.player_response.streamingData.adaptiveFormats.reverse()
}
this.downloadLinks = result.formats.filter((format) => {
return typeof format.mimeType !== 'undefined'
}).map((format) => {
const qualityLabel = format.qualityLabel || format.bitrate
const itag = format.itag
const fps = format.fps ? (format.fps + 'fps') : 'kbps'