]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix fetching storyboard of password protected video
authorChocobozzz <me@florianbigard.com>
Thu, 29 Jun 2023 12:22:13 +0000 (14:22 +0200)
committerChocobozzz <me@florianbigard.com>
Thu, 29 Jun 2023 12:22:13 +0000 (14:22 +0200)
client/src/app/+videos/+video-watch/video-watch.component.ts
client/src/app/shared/shared-main/video/video.service.ts

index 43744789d18c3b6ccf324336286a3a2827f1188b..54e0649ba3a2f630700bd593d778daea47020de0 100644 (file)
@@ -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 ]) => {
index c2e3d75111d3f134ef7bac803aa0572b536e862b..4e8b84dfc9fe7268da67ba0ee195add3942bd682 100644 (file)
@@ -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 => {