aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-player-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/peertube-player-manager.ts')
-rw-r--r--client/src/assets/player/peertube-player-manager.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts
index 814253188..ba0a6ab80 100644
--- a/client/src/assets/player/peertube-player-manager.ts
+++ b/client/src/assets/player/peertube-player-manager.ts
@@ -388,6 +388,7 @@ export class PeertubePlayerManager {
388 private static addWebTorrentOptions (plugins: VideoJSPluginOptions, options: PeertubePlayerManagerOptions) { 388 private static addWebTorrentOptions (plugins: VideoJSPluginOptions, options: PeertubePlayerManagerOptions) {
389 const commonOptions = options.common 389 const commonOptions = options.common
390 const webtorrentOptions = options.webtorrent 390 const webtorrentOptions = options.webtorrent
391 const p2pMediaLoaderOptions = options.p2pMediaLoader
391 392
392 const autoplay = this.getAutoPlayValue(commonOptions.autoplay) === 'play' 393 const autoplay = this.getAutoPlayValue(commonOptions.autoplay) === 'play'
393 ? true 394 ? true
@@ -397,7 +398,11 @@ export class PeertubePlayerManager {
397 autoplay, 398 autoplay,
398 videoDuration: commonOptions.videoDuration, 399 videoDuration: commonOptions.videoDuration,
399 playerElement: commonOptions.playerElement, 400 playerElement: commonOptions.playerElement,
400 videoFiles: webtorrentOptions.videoFiles, 401 videoFiles: webtorrentOptions.videoFiles.length !== 0
402 ? webtorrentOptions.videoFiles
403 // The WebTorrent plugin won't be able to play these files, but it will fallback to HTTP mode
404 : p2pMediaLoaderOptions.videoFiles,
405 fallbackVideoFiles: p2pMediaLoaderOptions.videoFiles,
401 startTime: commonOptions.startTime 406 startTime: commonOptions.startTime
402 } 407 }
403 408