diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-06 10:39:50 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-02-11 09:13:02 +0100 |
commit | 6ec0b75beb9c8bcd84e178912319913b91830da2 (patch) | |
tree | d6fbcb774c5019fc20f42e8f9da4529545fdcbf9 /client/src/standalone | |
parent | 092092969633bbcf6d4891a083ea497a7d5c3154 (diff) | |
download | PeerTube-6ec0b75beb9c8bcd84e178912319913b91830da2.tar.gz PeerTube-6ec0b75beb9c8bcd84e178912319913b91830da2.tar.zst PeerTube-6ec0b75beb9c8bcd84e178912319913b91830da2.zip |
Fallback HLS to webtorrent
Diffstat (limited to 'client/src/standalone')
-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) |