Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Error between a chapter finish and the beggining of a new one #5

Open
costaalex opened this issue Mar 30, 2021 · 1 comment
Open

Error between a chapter finish and the beggining of a new one #5

costaalex opened this issue Mar 30, 2021 · 1 comment

Comments

@costaalex
Copy link

When the chapter finishes and another one begins naturally, the app crushes because there is a division by 0 in the slider.
Solved by adding 1 millisecond to the denominator so it doesn't start with 0:

components/player.dart file, row 402:
value: position.inMilliseconds / duration.inMilliseconds,
changed to
value: position.inMilliseconds / (duration.inMilliseconds + 1),

@costaalex costaalex changed the title Error on chapter finish Error betthwn a chapter finish and the beggining of a new one Mar 30, 2021
@costaalex costaalex changed the title Error betthwn a chapter finish and the beggining of a new one Error between a chapter finish and the beggining of a new one Mar 30, 2021
@costaalex
Copy link
Author

Actually the solution above doesn't solve the problem completely. Sometimes it crashes anyway when a new chapter begins

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant