diff options
Diffstat (limited to 'client/src/standalone/videos')
-rw-r--r-- | client/src/standalone/videos/embed.ts | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts index 1e58d42d9..c5c46d0c5 100644 --- a/client/src/standalone/videos/embed.ts +++ b/client/src/standalone/videos/embed.ts | |||
@@ -311,7 +311,10 @@ class PeerTubeEmbed { | |||
311 | videoCaptions, | 311 | videoCaptions, |
312 | inactivityTimeout: 1500, | 312 | inactivityTimeout: 1500, |
313 | videoViewUrl: this.getVideoUrl(videoId) + '/views', | 313 | videoViewUrl: this.getVideoUrl(videoId) + '/views', |
314 | |||
314 | playerElement: this.videoElement, | 315 | playerElement: this.videoElement, |
316 | onPlayerElementChange: (element: HTMLVideoElement) => this.videoElement = element, | ||
317 | |||
315 | videoDuration: videoInfo.duration, | 318 | videoDuration: videoInfo.duration, |
316 | enableHotkeys: true, | 319 | enableHotkeys: true, |
317 | peertubeLink: true, | 320 | peertubeLink: true, |
@@ -321,6 +324,10 @@ class PeerTubeEmbed { | |||
321 | serverUrl: window.location.origin, | 324 | serverUrl: window.location.origin, |
322 | language: navigator.language, | 325 | language: navigator.language, |
323 | embedUrl: window.location.origin + videoInfo.embedPath | 326 | embedUrl: window.location.origin + videoInfo.embedPath |
327 | }, | ||
328 | |||
329 | webtorrent: { | ||
330 | videoFiles: videoInfo.files | ||
324 | } | 331 | } |
325 | } | 332 | } |
326 | 333 | ||
@@ -336,12 +343,6 @@ class PeerTubeEmbed { | |||
336 | videoFiles: videoInfo.files | 343 | videoFiles: videoInfo.files |
337 | } as P2PMediaLoaderOptions | 344 | } as P2PMediaLoaderOptions |
338 | }) | 345 | }) |
339 | } else { | ||
340 | Object.assign(options, { | ||
341 | webtorrent: { | ||
342 | videoFiles: videoInfo.files | ||
343 | } | ||
344 | }) | ||
345 | } | 346 | } |
346 | 347 | ||
347 | this.player = await PeertubePlayerManager.initialize(this.mode, options) | 348 | this.player = await PeertubePlayerManager.initialize(this.mode, options) |