mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-19 08:22:00 +00:00
parent
247a4f4122
commit
7a5c531a24
1 changed files with 24 additions and 3 deletions
|
|
@ -228,6 +228,7 @@ fun PlayerScreen(
|
||||||
val keepScreenAwake = errorMessage == null &&
|
val keepScreenAwake = errorMessage == null &&
|
||||||
(playbackSnapshot.isPlaying || (shouldPlay && playbackSnapshot.isLoading))
|
(playbackSnapshot.isPlaying || (shouldPlay && playbackSnapshot.isLoading))
|
||||||
EnterImmersivePlayerMode(keepScreenAwake = keepScreenAwake)
|
EnterImmersivePlayerMode(keepScreenAwake = keepScreenAwake)
|
||||||
|
var isScrubbingTimeline by remember { mutableStateOf(false) }
|
||||||
var scrubbingPositionMs by remember { mutableStateOf<Long?>(null) }
|
var scrubbingPositionMs by remember { mutableStateOf<Long?>(null) }
|
||||||
var pausedOverlayVisible by remember { mutableStateOf(false) }
|
var pausedOverlayVisible by remember { mutableStateOf(false) }
|
||||||
var gestureFeedback by remember { mutableStateOf<GestureFeedbackState?>(null) }
|
var gestureFeedback by remember { mutableStateOf<GestureFeedbackState?>(null) }
|
||||||
|
|
@ -600,6 +601,7 @@ fun PlayerScreen(
|
||||||
controlsVisible = false
|
controlsVisible = false
|
||||||
lockedOverlayVisible = false
|
lockedOverlayVisible = false
|
||||||
pausedOverlayVisible = false
|
pausedOverlayVisible = false
|
||||||
|
isScrubbingTimeline = false
|
||||||
scrubbingPositionMs = null
|
scrubbingPositionMs = null
|
||||||
gestureMessageJob?.cancel()
|
gestureMessageJob?.cancel()
|
||||||
gestureFeedback = null
|
gestureFeedback = null
|
||||||
|
|
@ -1228,6 +1230,7 @@ fun PlayerScreen(
|
||||||
playerController = null
|
playerController = null
|
||||||
playerControllerSourceUrl = null
|
playerControllerSourceUrl = null
|
||||||
playbackSnapshot = PlayerPlaybackSnapshot()
|
playbackSnapshot = PlayerPlaybackSnapshot()
|
||||||
|
isScrubbingTimeline = false
|
||||||
scrubbingPositionMs = null
|
scrubbingPositionMs = null
|
||||||
liveGestureFeedback = null
|
liveGestureFeedback = null
|
||||||
renderedGestureFeedback = null
|
renderedGestureFeedback = null
|
||||||
|
|
@ -1325,8 +1328,22 @@ fun PlayerScreen(
|
||||||
initialSeekApplied = true
|
initialSeekApplied = true
|
||||||
}
|
}
|
||||||
|
|
||||||
LaunchedEffect(controlsVisible, playbackSnapshot.isPlaying, playbackSnapshot.isLoading, showParentalGuide, errorMessage) {
|
LaunchedEffect(
|
||||||
if (!controlsVisible || !playbackSnapshot.isPlaying || playbackSnapshot.isLoading || showParentalGuide || errorMessage != null) {
|
controlsVisible,
|
||||||
|
isScrubbingTimeline,
|
||||||
|
playbackSnapshot.isPlaying,
|
||||||
|
playbackSnapshot.isLoading,
|
||||||
|
showParentalGuide,
|
||||||
|
errorMessage,
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
!controlsVisible ||
|
||||||
|
isScrubbingTimeline ||
|
||||||
|
!playbackSnapshot.isPlaying ||
|
||||||
|
playbackSnapshot.isLoading ||
|
||||||
|
showParentalGuide ||
|
||||||
|
errorMessage != null
|
||||||
|
) {
|
||||||
return@LaunchedEffect
|
return@LaunchedEffect
|
||||||
}
|
}
|
||||||
delay(3500)
|
delay(3500)
|
||||||
|
|
@ -1794,8 +1811,12 @@ fun PlayerScreen(
|
||||||
parentalWarnings = parentalWarnings,
|
parentalWarnings = parentalWarnings,
|
||||||
showParentalGuide = showParentalGuide,
|
showParentalGuide = showParentalGuide,
|
||||||
onParentalGuideAnimationComplete = { showParentalGuide = false },
|
onParentalGuideAnimationComplete = { showParentalGuide = false },
|
||||||
onScrubChange = { positionMs -> scrubbingPositionMs = positionMs },
|
onScrubChange = { positionMs ->
|
||||||
|
isScrubbingTimeline = true
|
||||||
|
scrubbingPositionMs = positionMs
|
||||||
|
},
|
||||||
onScrubFinished = { positionMs ->
|
onScrubFinished = { positionMs ->
|
||||||
|
isScrubbingTimeline = false
|
||||||
scrubbingPositionMs = null
|
scrubbingPositionMs = null
|
||||||
playerController?.seekTo(positionMs)
|
playerController?.seekTo(positionMs)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue