diff options
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-rw-r--r-- | client/src/standalone/videos/embed.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index e4f723079..78c5e5592 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -195,10 +195,11 @@ export class PeerTubeEmbed { | |||
195 | const { | 195 | const { |
196 | videoResponse, | 196 | videoResponse, |
197 | captionsPromise, | 197 | captionsPromise, |
198 | chaptersPromise, | ||
198 | storyboardsPromise | 199 | storyboardsPromise |
199 | } = await this.videoFetcher.loadVideo({ videoId: uuid, videoPassword: this.videoPassword }) | 200 | } = await this.videoFetcher.loadVideo({ videoId: uuid, videoPassword: this.videoPassword }) |
200 | 201 | ||
201 | return this.buildVideoPlayer({ videoResponse, captionsPromise, storyboardsPromise, forceAutoplay }) | 202 | return this.buildVideoPlayer({ videoResponse, captionsPromise, chaptersPromise, storyboardsPromise, forceAutoplay }) |
202 | } catch (err) { | 203 | } catch (err) { |
203 | 204 | ||
204 | if (await this.handlePasswordError(err)) this.loadVideoAndBuildPlayer({ ...options }) | 205 | if (await this.handlePasswordError(err)) this.loadVideoAndBuildPlayer({ ...options }) |
@@ -210,9 +211,10 @@ export class PeerTubeEmbed { | |||
210 | videoResponse: Response | 211 | videoResponse: Response |
211 | storyboardsPromise: Promise<Response> | 212 | storyboardsPromise: Promise<Response> |
212 | captionsPromise: Promise<Response> | 213 | captionsPromise: Promise<Response> |
214 | chaptersPromise: Promise<Response> | ||
213 | forceAutoplay: boolean | 215 | forceAutoplay: boolean |
214 | }) { | 216 | }) { |
215 | const { videoResponse, captionsPromise, storyboardsPromise, forceAutoplay } = options | 217 | const { videoResponse, captionsPromise, chaptersPromise, storyboardsPromise, forceAutoplay } = options |
216 | 218 | ||
217 | const videoInfoPromise = videoResponse.json() | 219 | const videoInfoPromise = videoResponse.json() |
218 | .then(async (videoInfo: VideoDetails) => { | 220 | .then(async (videoInfo: VideoDetails) => { |
@@ -233,11 +235,13 @@ export class PeerTubeEmbed { | |||
233 | { video, live, videoFileToken }, | 235 | { video, live, videoFileToken }, |
234 | translations, | 236 | translations, |
235 | captionsResponse, | 237 | captionsResponse, |
238 | chaptersResponse, | ||
236 | storyboardsResponse | 239 | storyboardsResponse |
237 | ] = await Promise.all([ | 240 | ] = await Promise.all([ |
238 | videoInfoPromise, | 241 | videoInfoPromise, |
239 | this.translationsPromise, | 242 | this.translationsPromise, |
240 | captionsPromise, | 243 | captionsPromise, |
244 | chaptersPromise, | ||
241 | storyboardsPromise, | 245 | storyboardsPromise, |
242 | this.buildPlayerIfNeeded() | 246 | this.buildPlayerIfNeeded() |
243 | ]) | 247 | ]) |
@@ -260,6 +264,7 @@ export class PeerTubeEmbed { | |||
260 | const loadOptions = await this.playerOptionsBuilder.getPlayerLoadOptions({ | 264 | const loadOptions = await this.playerOptionsBuilder.getPlayerLoadOptions({ |
261 | video, | 265 | video, |
262 | captionsResponse, | 266 | captionsResponse, |
267 | chaptersResponse, | ||
263 | translations, | 268 | translations, |
264 | 269 | ||
265 | storyboardsResponse, | 270 | storyboardsResponse, |