diff options
author | Chocobozzz <me@florianbigard.com> | 2019-11-29 14:10:24 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-11-29 14:14:47 +0100 |
commit | 43c66a91dfe5b8e101047b815ab2da8512a00904 (patch) | |
tree | 6a5d9e439e280d535baf48171c84f91be59909b9 /client/src/assets/player/peertube-player-manager.ts | |
parent | 20f1ec8d9d356bf961d3672c3ec771745fd4ce36 (diff) | |
download | PeerTube-43c66a91dfe5b8e101047b815ab2da8512a00904.tar.gz PeerTube-43c66a91dfe5b8e101047b815ab2da8512a00904.tar.zst PeerTube-43c66a91dfe5b8e101047b815ab2da8512a00904.zip |
Add ability to disable P2P in HLS player too
Diffstat (limited to 'client/src/assets/player/peertube-player-manager.ts')
-rw-r--r-- | client/src/assets/player/peertube-player-manager.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index bda718cff..7c7c9ad2a 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts | |||
@@ -18,6 +18,7 @@ import { getCompleteLocale, getShortLocale, is18nLocale, isDefaultLocale } from | |||
18 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' | 18 | import { segmentValidatorFactory } from './p2p-media-loader/segment-validator' |
19 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' | 19 | import { segmentUrlBuilderFactory } from './p2p-media-loader/segment-url-builder' |
20 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' | 20 | import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' |
21 | import { getStoredP2PEnabled } from './peertube-player-local-storage' | ||
21 | 22 | ||
22 | // Change 'Playback Rate' to 'Speed' (smaller for our settings menu) | 23 | // Change 'Playback Rate' to 'Speed' (smaller for our settings menu) |
23 | videojsUntyped.getComponent('PlaybackRateMenuButton').prototype.controlText_ = 'Speed' | 24 | videojsUntyped.getComponent('PlaybackRateMenuButton').prototype.controlText_ = 'Speed' |
@@ -245,7 +246,8 @@ export class PeertubePlayerManager { | |||
245 | segmentValidator: segmentValidatorFactory(options.p2pMediaLoader.segmentsSha256Url), | 246 | segmentValidator: segmentValidatorFactory(options.p2pMediaLoader.segmentsSha256Url), |
246 | rtcConfig: getRtcConfig(), | 247 | rtcConfig: getRtcConfig(), |
247 | requiredSegmentsPriority: 5, | 248 | requiredSegmentsPriority: 5, |
248 | segmentUrlBuilder: segmentUrlBuilderFactory(redundancyUrlManager) | 249 | segmentUrlBuilder: segmentUrlBuilderFactory(redundancyUrlManager), |
250 | useP2P: getStoredP2PEnabled() | ||
249 | }, | 251 | }, |
250 | segments: { | 252 | segments: { |
251 | swarmId: p2pMediaLoaderOptions.playlistUrl | 253 | swarmId: p2pMediaLoaderOptions.playlistUrl |