diff options
Diffstat (limited to 'client/src/standalone/videos/shared/video-fetcher.ts')
-rw-r--r-- | client/src/standalone/videos/shared/video-fetcher.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/standalone/videos/shared/video-fetcher.ts b/client/src/standalone/videos/shared/video-fetcher.ts index 9149d946e..c52861189 100644 --- a/client/src/standalone/videos/shared/video-fetcher.ts +++ b/client/src/standalone/videos/shared/video-fetcher.ts | |||
@@ -36,9 +36,10 @@ export class VideoFetcher { | |||
36 | } | 36 | } |
37 | 37 | ||
38 | const captionsPromise = this.loadVideoCaptions({ videoId, videoPassword }) | 38 | const captionsPromise = this.loadVideoCaptions({ videoId, videoPassword }) |
39 | const chaptersPromise = this.loadVideoChapters({ videoId, videoPassword }) | ||
39 | const storyboardsPromise = this.loadStoryboards(videoId) | 40 | const storyboardsPromise = this.loadStoryboards(videoId) |
40 | 41 | ||
41 | return { captionsPromise, storyboardsPromise, videoResponse } | 42 | return { captionsPromise, chaptersPromise, storyboardsPromise, videoResponse } |
42 | } | 43 | } |
43 | 44 | ||
44 | loadLive (video: VideoDetails) { | 45 | loadLive (video: VideoDetails) { |
@@ -64,6 +65,10 @@ export class VideoFetcher { | |||
64 | return this.http.fetch(this.getVideoUrl(videoId) + '/captions', { optionalAuth: true }, videoPassword) | 65 | return this.http.fetch(this.getVideoUrl(videoId) + '/captions', { optionalAuth: true }, videoPassword) |
65 | } | 66 | } |
66 | 67 | ||
68 | private loadVideoChapters ({ videoId, videoPassword }: { videoId: string, videoPassword?: string }): Promise<Response> { | ||
69 | return this.http.fetch(this.getVideoUrl(videoId) + '/chapters', { optionalAuth: true }, videoPassword) | ||
70 | } | ||
71 | |||
67 | private getVideoUrl (id: string) { | 72 | private getVideoUrl (id: string) { |
68 | return window.location.origin + '/api/v1/videos/' + id | 73 | return window.location.origin + '/api/v1/videos/' + id |
69 | } | 74 | } |