Don't check for captions during a live video

This commit is contained in:
Preston 2020-09-07 11:26:52 -04:00
parent f70e47c26f
commit 842bc2f4e9
1 changed files with 8 additions and 6 deletions

View File

@ -226,13 +226,15 @@ export default Vue.extend({
this.videoDislikeCount = result.videoDetails.dislikes this.videoDislikeCount = result.videoDetails.dislikes
this.isLive = result.player_response.videoDetails.isLiveContent this.isLive = result.player_response.videoDetails.isLiveContent
const captionTracks = if (!this.isLive) {
result.player_response.captions && const captionTracks =
result.player_response.captions.playerCaptionsTracklistRenderer result.player_response.captions &&
.captionTracks result.player_response.captions.playerCaptionsTracklistRenderer
.captionTracks
if (typeof captionTracks !== 'undefined') { if (typeof captionTracks !== 'undefined') {
await this.createCaptionUrls(captionTracks) await this.createCaptionUrls(captionTracks)
}
} }
if (this.videoDislikeCount === null) { if (this.videoDislikeCount === null) {