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: farmer activity video playback resume #237

Merged
merged 5 commits into from
Feb 23, 2024
Merged

Conversation

OchiengPaul442
Copy link
Collaborator

@OchiengPaul442 OchiengPaul442 commented Feb 20, 2024

Description

  • This update refines the play method to address a malfunction in the video player. Previously, if a user initiated video playback, terminated the player, and then attempted to replay the video, the player would not operate as expected.
  • Focused on rectifying the playback resumption issue for the player on Android devices. This fix ensures a seamless user experience by enabling the video to resume from the point where it was paused, even after the player has been closed.

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

@OchiengPaul442 OchiengPaul442 added the bug Something isn't working label Feb 20, 2024
@OchiengPaul442 OchiengPaul442 added ready for review and removed work in progress bug Something isn't working labels Feb 20, 2024
Copy link
Collaborator

@chrismclarke chrismclarke left a 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!

@chrismclarke chrismclarke merged commit 4a7ace9 into main Feb 23, 2024
3 checks passed
@chrismclarke chrismclarke deleted the ft-video-playback-bug branch February 23, 2024 06:22
@chrismclarke chrismclarke added the Tool: Farmer Activity Updates related to Farmer Activity tool label Feb 29, 2024
@chrismclarke chrismclarke changed the title farmer activity video playback resume fix: farmer activity video playback resume Feb 29, 2024
@github-actions github-actions bot added fix and removed Tool: Farmer Activity Updates related to Farmer Activity tool labels Feb 29, 2024
@chrismclarke chrismclarke added the Tool: Farmer Activity Updates related to Farmer Activity tool label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix ready for review Tool: Farmer Activity Updates related to Farmer Activity tool
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

bug(android) - farmer activity video playback resume
2 participants