kyu
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2016
11:16 AM
video position automatically rolls back after seek is set
Hello, I am writing a custom video player using "Video" node https://sdkdocs.roku.com/display/sdkdoc/Video and I am running into a weird issue.
So I am capturing the fastforward/rewind key and moving the position of the video when those keys are pressed. But every time I set video.seek to a certain number, say 20. After the video is resumed, I found out that video.position is rollbacked automatically to like 19. I also have a timer to show the current time. So my timer will be like 20, 19, 20, 21, etc. I don't know why this auto rollback is happening and I can't google anything userful. So I am here hoping I could get some help. Thank you!
I also tried to set seek to a float like this
So I am capturing the fastforward/rewind key and moving the position of the video when those keys are pressed. But every time I set video.seek to a certain number, say 20. After the video is resumed, I found out that video.position is rollbacked automatically to like 19. I also have a timer to show the current time. So my timer will be like 20, 19, 20, 21, etc. I don't know why this auto rollback is happening and I can't google anything userful. So I am here hoping I could get some help. Thank you!
I also tried to set seek to a float like this
m.video.seek = cdbl(20)but it didn't help.
2 REPLIES 2

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2016
11:30 AM
Re: video position automatically rolls back after seek is se
What format is your video? With HLS (and possibly SmoothStreaming and DASH), the Roku will only resume at a segment boundary, so you can't seek into a segment. In your example, if the segment starts at 19 seconds and is 10 seconds long, if you seek to anything between 19 and 29 seconds, it will resume at 19.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
kyu
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2016
12:05 PM
Re: video position automatically rolls back after seek is se
Thank you! I see your point. Our video is in mp4 format. But sounds like that is the reason.