"rsromeo" wrote:
Hi - trying to learn something new. What exactly do I need to do to implement resume playing on my video? I know roVideoScreen has SetPositionNotificationPeriod and isPlaybackPosition() but not sure how to use them to resume playback. I'm guessing I need to have a button pressed event that gets the position and then somehow store the position in the registry? Can someone help clue me in on what I need to do? A code snippet would be very helpful. Thanks.
"rsromeo" wrote:
thanks TheEndless. I understand everything you said except confused on where/how I store the value from isPlaybackPosition() so I can refer to it later to use in the PlayStart attribute? In other words, I want to start a movie, pause it, leave the channel, come back later and resume playing. I'm guessing its stored with roRegistry?
"TheEndless" wrote:
In the channel where I implemented it, each video had a short unique ID, so I just stored a separate key in the registry named after the video ID with the position stored as a string. That made it easy to retrieve when the video was re-launched without having to parse a string with multiple values in it. I don't know if there are any negative implications to that approach, though...
"rsromeo" wrote:
I got it working. I went with storing in the registry. When playback finishes, I delete the key. Seems to work well. Thanks for your help! 🙂
"TheEndless" wrote:
As a tip, you may want to wait to store it until they're a certain percentage into the file, and delete if when they're a certain percentage from the end. I'm not sure what your content is, but a lot of folks will stop watching a video during the credits. No reason to resume at that point. 😉
"dynamitemedia" wrote:
i stop at the credits all the time in netflix and that is the last position shown.
so when i go in to watch family guy it always remembers that i stopped at the credits and it shows that.
so what would you do to change that? check the content length and if ends so many seconds from the end make a new start position of "0" ?
thats interesting, at least if you have movies with ending credits, which i don't, lol