-
Notifications
You must be signed in to change notification settings - Fork 2
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: farmer activity video playback resume #237
Conversation
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.
Thanks for working through all this @OchiengPaul442 , I can appreciate getting an android workflow operational to even recreate the problem was quite a challenge.
The playback resume feature works well, I like your idea of persisting to storage (to potentially track progress across multiple videos and app restarts), I'll write a follow-up issue to avoid this PR getting too cluttered.
I noticed a strange bug when running the videos, perhaps you did too - after playing the video the app gets locked into landscape mode. I've tried adding the Screen Orientation native plugin to give us a bit more control over the orientation
However.... turns out the video-player plugin had already noted the screen orientation bug and issued a fix (as per https://github.com/jepiqueau/capacitor-video-player/issues/136
) so I've updated the package, although testing myself I think still need to manually force the orientation to 'unlock' following playback to ensure orientation corrects. Changes pushed in 634fa7c
I also realise now we have multiple developers working on native testing (who will each have their own local IP) it would be really nice to implement a cleaner system for exposing the local development instead of manual comment/edit of the config file. I'll see if I can figure something out a better implementation as a follow-up.
But altogether nice work!
Description
NB: If the user navigates back to the Farm activity window, the current pause time is reset, and playback starts from the beginning. However, we could potentially use local storage, which is supported on both desktop and mobile platforms, to track the playback times for different videos. This would allow us to resume playback from the last paused position even though the user closed the app.
Discussion
Screenshots / Videos
Screen_recording_20240220_193525.mp4