From 8ef866071f8109719e68647141d4c9e138438585 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 29 Jun 2023 14:22:13 +0200 Subject: [PATCH] Fix fetching storyboard of password protected video --- .../src/app/+videos/+video-watch/video-watch.component.ts | 2 +- client/src/app/shared/shared-main/video/video.service.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts index 43744789d..54e0649ba 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts @@ -287,7 +287,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { forkJoin([ videoAndLiveObs, this.videoCaptionService.listCaptions(videoId, videoPassword), - this.videoService.getStoryboards(videoId), + this.videoService.getStoryboards(videoId, videoPassword), this.userService.getAnonymousOrLoggedUser() ]).subscribe({ next: ([ { video, live, videoFileToken }, captionsResult, storyboards, loggedInOrAnonymousUser ]) => { diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts index c2e3d7511..4e8b84dfc 100644 --- a/client/src/app/shared/shared-main/video/video.service.ts +++ b/client/src/app/shared/shared-main/video/video.service.ts @@ -347,9 +347,11 @@ export class VideoService { // --------------------------------------------------------------------------- - getStoryboards (videoId: string | number) { + getStoryboards (videoId: string | number, videoPassword: string) { + const headers = VideoPasswordService.buildVideoPasswordHeader(videoPassword) + return this.authHttp - .get<{ storyboards: Storyboard[] }>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/storyboards') + .get<{ storyboards: Storyboard[] }>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/storyboards', { headers }) .pipe( map(({ storyboards }) => storyboards), catchError(err => { -- 2.41.0