-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ui): tap video duration to toggle remaining time counter #878
Conversation
Why is this draft? do you want a review? |
@fire-light42 i thought you will ask some minor changes, anyway it can be merged, undrafting it now |
The code looked fine, HOWEVER when testing it I found that it was unsynced af making it feel shitty and it does not save the setting between runs. The first issue can be solved by binding the update to the text change of the position set by exo, this also removes the need to a looper exoPosition.doOnTextChanged { _, _, _, _ ->
updateRemainingTime()
} and dont forget val remainingTimeSeconds = (duration - position + 500) / 1000 // this is due to rounding The second issue can be solved with a PreferenceDelegate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
so i made and tested these desired changes , now it is going with sync properly and i also replaced the comment // cs is ott itself to cs3 is media center itself so that it dont provoke any unwanted heat or issue. can you tell me about this method, what does _ _ _ do, do they ignore parameters that are not present. playerBinding?.exoPosition?.doOnTextChanged { _, _, _, _ ->
updateRemainingTime()
}```
|
because i experimented first with, and turned update function to
but it crashed |
app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt
Outdated
Show resolved
Hide resolved
} catch (e: Exception) { | ||
logError(e) | ||
} | ||
|
||
if (SettingsFragment.isTrueTvSettings()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setRemainingTimeWatcher(SettingsFragment.isTrueTvSettings() || durationMode)
app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
timeLeft.setOnClickListener { | ||
stopUpdatingRemainingTime() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setRemainingTimeWatcher(false)
@fire-light42 shifted to views