- this.videoService
- .getVideo(uuid)
- .pipe(catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ])))
- .subscribe(video => {
- const startTime = this.route.snapshot.queryParams.start
- this.onVideoFetched(video, startTime)
- .catch(err => this.handleError(err))
- })
+ forkJoin(
+ this.videoService.getVideo(uuid),
+ this.videoCaptionService.listCaptions(uuid)
+ )
+ .pipe(
+ catchError(err => this.restExtractor.redirectTo404IfNotFound(err, [ 400, 404 ]))
+ )
+ .subscribe(([ video, captionsResult ]) => {
+ const startTime = this.route.snapshot.queryParams.start
+ this.onVideoFetched(video, captionsResult.data, startTime)
+ .catch(err => this.handleError(err))
+ })