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([
|
forkJoin([
|
||||||
videoAndLiveObs,
|
videoAndLiveObs,
|
||||||
this.videoCaptionService.listCaptions(videoId, videoPassword),
|
this.videoCaptionService.listCaptions(videoId, videoPassword),
|
||||||
this.videoService.getStoryboards(videoId),
|
this.videoService.getStoryboards(videoId, videoPassword),
|
||||||
this.userService.getAnonymousOrLoggedUser()
|
this.userService.getAnonymousOrLoggedUser()
|
||||||
]).subscribe({
|
]).subscribe({
|
||||||
next: ([ { video, live, videoFileToken }, captionsResult, storyboards, loggedInOrAnonymousUser ]) => {
|
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
|
return this.authHttp
|
||||||
.get<{ storyboards: Storyboard[] }>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/storyboards')
|
.get<{ storyboards: Storyboard[] }>(VideoService.BASE_VIDEO_URL + '/' + videoId + '/storyboards', { headers })
|
||||||
.pipe(
|
.pipe(
|
||||||
map(({ storyboards }) => storyboards),
|
map(({ storyboards }) => storyboards),
|
||||||
catchError(err => {
|
catchError(err => {
|
||||||
|
|
Loading…
Reference in New Issue