Open gitofleonardo opened 2 years 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!
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:
.${md5_string_of_video_parent_directory_id}
. It's a hidden file, and the reason to use a parent directory's id is that the id will never be changed after the directory is created, I guess..${md5_string_of_video_id}
. And this file stores video's current playback position.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:
PreviewVideoActivity
tosensorLandscape
;PreviewVideoActivity
;I don't know whether point 1 and point 2 are acceptable for most people or not, but for me they are very helpful.