Run caption logic earlier to avoid subtitles from not showing up.
This commit is contained in:
		
							parent
							
								
									3b4cf386a8
								
							
						
					
					
						commit
						80b60f6d32
					
				| 
						 | 
				
			
			@ -241,6 +241,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 (typeof captionTracks !== 'undefined') {
 | 
			
		||||
            await this.createCaptionUrls(captionTracks)
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if (this.videoDislikeCount === null) {
 | 
			
		||||
            this.videoDislikeCount = 0
 | 
			
		||||
          }
 | 
			
		||||
| 
						 | 
				
			
			@ -321,15 +330,6 @@ export default Vue.extend({
 | 
			
		|||
            this.createLocalStoryboardUrls(templateUrl)
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          const captionTracks =
 | 
			
		||||
            result.player_response.captions &&
 | 
			
		||||
            result.player_response.captions.playerCaptionsTracklistRenderer
 | 
			
		||||
              .captionTracks
 | 
			
		||||
 | 
			
		||||
          if (typeof captionTracks !== 'undefined') {
 | 
			
		||||
            await this.createCaptionUrls(captionTracks)
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          this.isLoading = false
 | 
			
		||||
        })
 | 
			
		||||
        .catch(err => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue