Show in the UI how long the user has been streaming for. Closes #59

This commit is contained in:
Gabe Kangas
2020-07-18 15:06:54 -07:00
parent addfce2ec9
commit 8ba0b6d7ce
6 changed files with 49 additions and 14 deletions

View File

@@ -68,7 +68,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).Seconds()
timeSinceLastConnected := time.Since(_stats.LastConnectTime.Time).Seconds()
if timeSinceLastConnected < float64(config.Config.GetVideoSegmentSecondsLength()*4.0) {
return false
}