Service: Continue Watching Service - EyevinnOSC/community GitHub Wiki
The Continue Watching Service is an open source REST API that tracks the watch position for users across an OTT or video-on-demand platform. Built on Redis-compatible storage, it records what a user was watching and at what position, so your application can offer a seamless "resume from where you left off" experience. Available as an open web service in Eyevinn Open Source Cloud.
- If you have not already done so, sign up for an Eyevinn OSC account
The Continue Watching Service uses a Redis-compatible store (Valkey) to persist watch state. Navigate to the Valkey service in the Eyevinn OSC web console. Click Create valkey, enter a name (e.g. continuestore), and click Create. Wait for the instance status to turn green.
Once running, open the instance and note the External IP and External Port.
Navigate to the Continue Watching Service. Click Create continue-watching-api and fill in:
-
Name: a name for your instance (alphanumeric only, e.g.
mywatchtracker) - RedisHost: the external IP of your Valkey instance
-
RedisPort: the external port (optional — defaults to
6379)
Leave RedisUsername and RedisPassword empty unless your Valkey instance has authentication configured.
Click Create and wait for the instance to reach running status.
The service exposes a simple REST API. Your application POSTs a watch event when a user pauses or navigates away, and GETs the last position when a user returns to content.
curl -X PUT https://<your-instance-url>/api/v1/users/<userId>/progress/<contentId> \
-H "Content-Type: application/json" \
-d '{"position": 1234}'-
userId— unique identifier for the user -
contentId— unique identifier for the content item (e.g. episode ID) -
position— playback position in seconds
curl https://<your-instance-url>/api/v1/users/<userId>/progress/<contentId>Example response:
{
"userId": "user-abc",
"contentId": "episode-42",
"position": 1234
}curl https://<your-instance-url>/api/v1/users/<userId>/progressReturns a list of all content items the user has watched with their last recorded positions.
# Create a Valkey instance
osc create valkey-io-valkey continuestore
# Get the Valkey instance details to find the host and port
osc describe valkey-io-valkey continuestore
# Create the Continue Watching Service
osc create eyevinn-continue-watching-api mywatchtracker \
-o RedisHost="<external-ip>" \
-o RedisPort="<external-port>"- Continue Watching API on GitHub
- Valkey — Redis-compatible storage used by this service