educative.io

Educative

How video watch offset is stored?

If we support playing/pausing a video from multiple devices, we will need to store the offset on the server. This will enable the users to start watching a video on any device from the same point where they left off.

I have some trouble understanding, does it mean we need create a user-video watch table to store the offset information? Please advise.

Yeah my understanding is that storage of offset has to live on the server side, as a table. They didn’t get into any schema designs but I was thinking it could look like this:

user_video_log
user_id
video_id ref video
offset

So when you switch devices and access the same video again, this table will return the offset.

1 Like