From b9a80709ab2ebed545cbcd8f7b0be2a890f23f30 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 15 Oct 2020 21:36:08 -0700 Subject: [PATCH] Decrease the amount of time before the stream is made available to the player --- core/stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/stats.go b/core/stats.go index 171a30acb..30d7e6fad 100644 --- a/core/stats.go +++ b/core/stats.go @@ -78,7 +78,7 @@ func IsStreamConnected() bool { // Kind of a hack. It takes a handful of seconds between a RTMP connection and when HLS data is available. // So account for that with an artificial buffer of four segments. timeSinceLastConnected := time.Since(_stats.LastConnectTime.Time).Seconds() - if timeSinceLastConnected < float64(config.Config.GetVideoSegmentSecondsLength())*3.0 { + if timeSinceLastConnected < float64(config.Config.GetVideoSegmentSecondsLength())*2.0 { return false }