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.isLive = result.player_response.videoDetails.isLiveContent
const captionTracks =
result.player_response.captions &&
result.player_response.captions.playerCaptionsTracklistRenderer
.captionTracks
if (!this.isLive) {
const captionTracks =
result.player_response.captions &&
result.player_response.captions.playerCaptionsTracklistRenderer
.captionTracks
if (typeof captionTracks !== 'undefined') {
await this.createCaptionUrls(captionTracks)
if (typeof captionTracks !== 'undefined') {
await this.createCaptionUrls(captionTracks)
}
}
if (this.videoDislikeCount === null) {