nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.2k stars 1.75k forks source link

About video playback history #9081

Open gitofleonardo opened 2 years ago

gitofleonardo commented 2 years ago

Why I need this function

I use nextcloud to store my own data and watch videos. When I watched animes few days ago, I found there was no such function to save my video playback histories, as I often stop watching video to do something else. I don't want to remember the video's current playback position every time I quit the nextcloud app.

Current works I've done

After I forked this repository, I worked on it. And now I've added this function to my own repository. My solution is quite simple:

I admit it's not a very good solution since it might cost a lot of resources for the frequent uploading job.

Better solution

A better solution is to create a durable connection(can be a websocket) with the nextcloud server, and save the video's playback record data to database instead of a file via the connection. But for now I don't know much about the server's code.

Extra works

Actually I modified a lot after I forked the repository:

  1. Change the orientation of PreviewVideoActivity to sensorLandscape;
  2. Hide navigation bar in full screen mode in PreviewVideoActivity;
  3. Fix the bug mentioned in issue https://github.com/nextcloud/android/issues/9060, just because it is too annoying when I debugged my new feature so I fixed it by the way.

I don't know whether point 1 and point 2 are acceptable for most people or not, but for me they are very helpful.

joshtrichards commented 11 months ago

Hi @gitofleonardo - Interesting addition. I'm not at all familiar with how we do our video stuff, but great hacking nonetheless! Don't hesitate to submit PRs for some of your favorite odds and ends along the way. Worst case they'll spur a discussion leading to a more acceptable approach for wider use. Thanks for sharing!