mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-07-29 23:59:32 +00:00
feat: update playback progress persistence interval to 60 seconds for improved performance
This commit is contained in:
parent
2c2481d7d8
commit
2ff6cf6f82
1 changed files with 3 additions and 1 deletions
|
|
@ -44,6 +44,8 @@ import kotlinx.coroutines.Job
|
|||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
private const val PlaybackProgressPersistIntervalMs = 60_000L
|
||||
|
||||
@Composable
|
||||
fun PlayerScreen(
|
||||
title: String,
|
||||
|
|
@ -496,7 +498,7 @@ fun PlayerScreen(
|
|||
}
|
||||
|
||||
val now = WatchProgressClock.nowEpochMs()
|
||||
if (now - lastProgressPersistEpochMs < 5_000L) {
|
||||
if (now - lastProgressPersistEpochMs < PlaybackProgressPersistIntervalMs) {
|
||||
return@LaunchedEffect
|
||||
}
|
||||
lastProgressPersistEpochMs = now
|
||||
|
|
|
|||
Loading…
Reference in a new issue