Skip to content

Commit

Permalink
Uptime is send only when time shift <= 30 seconds (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ authored Jul 24, 2023
1 parent fb7140f commit bf00809
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ internal class CommandersActStreaming(
}

private fun notifyUptime(position: Duration) {
if (getTimeshift(position) > LIVE_EDGE_THRESHOLD) return
notifyEvent(MediaEventType.Uptime, position)
}

Expand Down Expand Up @@ -194,5 +195,6 @@ internal class CommandersActStreaming(
internal var UPTIME_PERIOD = 60.seconds
internal var POS_PERIOD = 30.seconds
private const val VALID_SEEK_THRESHOLD: Long = 1000L
private val LIVE_EDGE_THRESHOLD = 60.seconds
}
}

0 comments on commit bf00809

Please sign in to comment.