Rework player state handling in the frontend #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pr closes #22.
We are not able to distinguish between a user interaction and an incomming new state. We thought that was an issue, but in the real live it was not an issue, because the watch on the state only triggers if the state differs from the old state and not if an state is set. Therefore our flags introduced the bug instead of preventing it. Also the state was only set to the player on state changes, BUT it was sent out every time it updates (also if it stays the same) to all other ones. This in combination with the unused seconds offset resulted in the jitter that was observed before our last "fix". We also need to be careful that we don't update a state twice at once because e.g. the pause and seconds changed. But this should also be fixed now. Yay.