Skip to content
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

Fix activity tracking for Exo Player #81

Merged
merged 5 commits into from
Feb 5, 2024
Merged

Conversation

damontecres
Copy link
Owner

Closes #80

I had thought it was just a UI glitch that scene resume times weren't updating, but turns out the new player in #62 did not implement the tracking at all.

This PR adds the tracking to the new player if tracking is enabled server side. Additionally, a rough implementation copy of the tracking from the server is added to increment play count, except the timer runs every 10s instead 1s. This change only applies to the new ExoPlayer, not the old default player.

Also scene details are fetched every time on the video details page instead of using the caller's data (which might be outdated). This ensures the latest resume time is available.

@damontecres damontecres added the bug Something isn't working label Feb 4, 2024
@damontecres damontecres merged commit 621f8b8 into main Feb 5, 2024
2 checks passed
@damontecres damontecres deleted the bugfix/track-activity branch February 5, 2024 00:37
damontecres added a commit that referenced this pull request Feb 25, 2024
In #81, scene details were updated to fetch during `onResume` which
meant that all of the markers, performers, etc would be reset. This
meant everything could flash for a second. Also meant that the selected
item would revert to the beginning of the list.

So this PR moves the initial fetch of scene data to `onViewCreated` and
does a refresh in `onResume` so those UI glitches won't happen.

This PR also moves some of the UI initialization to _before_ fetching
the scene data and removes the temporary background image so there isn't
a strange color swap.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] - Does not update scene progress
1 participant