diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-04 13:40:02 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-03-09 09:23:10 +0100 |
commit | f443a74649174b2f9347c158e30f8ac7aa3e958a (patch) | |
tree | e423bc4e2307477bda4341037b7fa04ad10adae6 /server/lib/live/live-manager.ts | |
parent | 01dd04cd5ab7b55d2a9af7d0ebf405bee9579b09 (diff) | |
download | PeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.tar.gz PeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.tar.zst PeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.zip |
Add latency setting support
Diffstat (limited to 'server/lib/live/live-manager.ts')
-rw-r--r-- | server/lib/live/live-manager.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts index 21c34a9a4..920d3a5ec 100644 --- a/server/lib/live/live-manager.ts +++ b/server/lib/live/live-manager.ts | |||
@@ -5,9 +5,10 @@ import { createServer as createServerTLS, Server as ServerTLS } from 'tls' | |||
5 | import { | 5 | import { |
6 | computeLowerResolutionsToTranscode, | 6 | computeLowerResolutionsToTranscode, |
7 | ffprobePromise, | 7 | ffprobePromise, |
8 | getLiveSegmentTime, | ||
8 | getVideoStreamBitrate, | 9 | getVideoStreamBitrate, |
9 | getVideoStreamFPS, | 10 | getVideoStreamDimensionsInfo, |
10 | getVideoStreamDimensionsInfo | 11 | getVideoStreamFPS |
11 | } from '@server/helpers/ffmpeg' | 12 | } from '@server/helpers/ffmpeg' |
12 | import { logger, loggerTagsFactory } from '@server/helpers/logger' | 13 | import { logger, loggerTagsFactory } from '@server/helpers/logger' |
13 | import { CONFIG, registerConfigChangedHandler } from '@server/initializers/config' | 14 | import { CONFIG, registerConfigChangedHandler } from '@server/initializers/config' |
@@ -353,7 +354,7 @@ class LiveManager { | |||
353 | .catch(err => logger.error('Cannot federate live video %s.', video.url, { err, ...localLTags })) | 354 | .catch(err => logger.error('Cannot federate live video %s.', video.url, { err, ...localLTags })) |
354 | 355 | ||
355 | PeerTubeSocket.Instance.sendVideoLiveNewState(video) | 356 | PeerTubeSocket.Instance.sendVideoLiveNewState(video) |
356 | }, VIDEO_LIVE.SEGMENT_TIME_SECONDS * 1000 * VIDEO_LIVE.EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION) | 357 | }, getLiveSegmentTime(live.latencyMode) * 1000 * VIDEO_LIVE.EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION) |
357 | } catch (err) { | 358 | } catch (err) { |
358 | logger.error('Cannot save/federate live video %d.', videoId, { err, ...localLTags }) | 359 | logger.error('Cannot save/federate live video %d.', videoId, { err, ...localLTags }) |
359 | } | 360 | } |