X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fassets%2Fplayer%2Fpeertube-player-manager.ts;h=fcf0d0f4158eb42c573c5523d1635c1167386f63;hb=cb5c2abc99c2e222fe18621f79cb68b805678e15;hp=c1953043e354721fb53f843143ed7e94a23f1389;hpb=053aed43fb255b4ae4324a845534f2f562c3b6cc;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index c1953043e..fcf0d0f41 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts @@ -35,7 +35,8 @@ import { VideoJSPluginOptions } from './peertube-videojs-typings' import { TranslationsManager } from './translations-manager' -import { buildVideoOrPlaylistEmbed, buildVideoLink, copyToClipboard, getRtcConfig, isSafari, isIOS } from './utils' +import { buildVideoOrPlaylistEmbed, buildVideoLink, getRtcConfig, isSafari, isIOS } from './utils' +import { copyToClipboard } from '../../root-helpers/utils' // Change 'Playback Rate' to 'Speed' (smaller for our settings menu) (videojs.getComponent('PlaybackRateMenuButton') as any).prototype.controlText_ = 'Speed' @@ -98,6 +99,8 @@ export interface CommonOptions extends CustomizationOptions { videoViewUrl: string embedUrl: string + isLive: boolean + language?: string videoCaptions: VideoJSCaption[] @@ -220,13 +223,14 @@ export class PeertubePlayerManager { const plugins: VideoJSPluginOptions = { peertube: { mode, - autoplay, // Use peertube plugin autoplay because we get the file by webtorrent + autoplay, // Use peertube plugin autoplay because we could get the file by webtorrent videoViewUrl: commonOptions.videoViewUrl, videoDuration: commonOptions.videoDuration, userWatching: commonOptions.userWatching, subtitle: commonOptions.subtitle, videoCaptions: commonOptions.videoCaptions, - stopTime: commonOptions.stopTime + stopTime: commonOptions.stopTime, + isLive: commonOptions.isLive } } @@ -323,7 +327,7 @@ export class PeertubePlayerManager { const p2pMediaLoaderConfig = { loader: { trackerAnnounce, - segmentValidator: segmentValidatorFactory(options.p2pMediaLoader.segmentsSha256Url), + segmentValidator: segmentValidatorFactory(options.p2pMediaLoader.segmentsSha256Url, options.common.isLive), rtcConfig: getRtcConfig(), requiredSegmentsPriority: 1, segmentUrlBuilder: segmentUrlBuilderFactory(redundancyUrlManager),