aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-05-14 11:35:54 +0200
committerChocobozzz <me@florianbigard.com>2019-05-14 11:35:54 +0200
commit656591660527e8ba48d496c8d6b34598f869ea05 (patch)
treef5d8ee245dc5046888b5610562165e448af539d4 /client/src/app/videos/+video-watch
parent39e6a5cbec21d5fa2e29be3e6f1c3e88726136ec (diff)
downloadPeerTube-656591660527e8ba48d496c8d6b34598f869ea05.tar.gz
PeerTube-656591660527e8ba48d496c8d6b34598f869ea05.tar.zst
PeerTube-656591660527e8ba48d496c8d6b34598f869ea05.zip
Use HLS by default if enabled
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts
index 0532e7de7..b147b75b0 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -423,7 +423,15 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
423 } 423 }
424 } 424 }
425 425
426 const mode: PlayerMode = urlOptions.playerMode === 'p2p-media-loader' ? 'p2p-media-loader' : 'webtorrent' 426 let mode: PlayerMode
427
428 if (urlOptions.playerMode) {
429 if (urlOptions.playerMode === 'p2p-media-loader') mode = 'p2p-media-loader'
430 else mode = 'webtorrent'
431 } else {
432 if (this.video.hasHlsPlaylist()) mode = 'p2p-media-loader'
433 else mode = 'webtorrent'
434 }
427 435
428 if (mode === 'p2p-media-loader') { 436 if (mode === 'p2p-media-loader') {
429 const hlsPlaylist = this.video.getHlsPlaylist() 437 const hlsPlaylist = this.video.getHlsPlaylist()