Table of contents:
|Table of Contents|
When it comes to streaming media, content bookmarking refers to the idea of recording a user's playback position on the content in your channel so that later on they will be able to continue watching from precisely where they left off.
This guide provides simple instructions on two different ways to bookmark media content, either in your service's backend or locally in the device's registry.
Retrieving playback position
It is important to know that video playback position (or "timestamp") can be retrieved via the position field in the video node.
m.video = m.top.findNode("MyVideo") TimeStamp = m.video.position
Storing timestamps for cross-platform retrieval
It is best practice to store the timestamp of a user's bookmark position in the service's backend, so that it can be retrieved on any platform, not just Roku.
This should be done on a 30 second timer to ensure functionality across all devices.
Storing timestamps on-device for local retrieval
While it is ideal to store timestamps in your backend service, it is also possible to store it locally on a Roku device's registry. With this approach, a user will only be able to resume watching from their last playback position if they use the same Roku device. The timestamp won't be accessible on other platforms.