Anton Shilov
10/19/2021, 2:31 PMTransition
on a more granular level rather than current/target state? I'm trying to use Transition.playTimeNanos
and Transition.totalDurationNanos
. But total duration is calculated only in seek mode, which as I assume is reserved for tooling.
cc @Doris Liuval progress = derivedStateOf {
if (transition.totalDurationNanos != 0L)
// total duration is always 0 unles you're in a seek mode
transition.playTimeNanos / transition.totalDurationNanos
else 0L
}
Zach Klippenstein (he/him) [MOD]
10/19/2021, 5:06 PMAnton Shilov
10/20/2021, 8:17 AMDoris Liu
10/25/2021, 7:15 PMTransition
? Note that total duration of a Transition is subject to change when the transition gets interrupted. Therefore totalDurationNanos
is more meaningful in the seeking scenario, where Transition
disables its interruption handling mechanism.