mirror of https://github.com/Chocobozzz/PeerTube
Fix fetching storyboard of password protected video
parent
9cd06903f4
commit
8ef866071f
|
@ -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 ]) => {
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Reference in New Issue