Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix fetching storyboard of password protected video

Chocobozzz8ef866071f81
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 43744789d1..54e0649ba3 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 c2e3d75111..4e8b84dfc9 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 => {