File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
app/src/main/java/live/mehiz/mpvkt/ui/player/controls Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -408,10 +408,12 @@ fun PlayerControls(
408408 ) {
409409 val invertDuration by playerPreferences.invertDuration.collectAsState()
410410 val readAhead by MPVLib .propFloat[" demuxer-cache-time" ].collectAsState()
411+ val remaining by MPVLib .propFloat[" playtime-remaining" ].collectAsState()
411412 val preciseSeeking by playerPreferences.preciseSeeking.collectAsState()
412413 SeekbarWithTimers (
413414 position = position?.toFloat() ? : 0f ,
414415 duration = duration?.toFloat() ? : 0f ,
416+ remaining = remaining?.toFloat() ? : 0f ,
415417 readAheadValue = readAhead ? : 0f ,
416418 onValueChange = {
417419 isSeeking = true
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import live.mehiz.mpvkt.ui.theme.spacing
3232fun SeekbarWithTimers (
3333 position : Float ,
3434 duration : Float ,
35+ remaining : Float ,
3536 readAheadValue : Float ,
3637 onValueChange : (Float ) -> Unit ,
3738 onValueChangeFinished : () -> Unit ,
@@ -74,7 +75,7 @@ fun SeekbarWithTimers(
7475 ),
7576 )
7677 VideoTimer (
77- value = if (timersInverted.second) position - duration else duration,
78+ value = if (timersInverted.second) - remaining else duration,
7879 isInverted = timersInverted.second,
7980 onClick = {
8081 clickEvent()
@@ -114,6 +115,7 @@ private fun PreviewSeekBar() {
114115 SeekbarWithTimers (
115116 5f ,
116117 20f ,
118+ 15f ,
117119 4f ,
118120 {},
119121 {},
You can’t perform that action at this time.
0 commit comments