HTML5 Video that remembers where a user left off?


(Adam) #1

Is there a simple way to accomplish this. I generally use Joe’s HTML5 Video stack which works great. But as my topic suggests I’m looking for a way for longer clips to remember where a user left them if that same user come back to the clip at a later time?

Thanks for any thoughts.


(Brandon Scott Corlett) #2

There are a couple ways you could approach this.

Can you be more specific as to how this will be used so that the best solution can be proposed?


(Adam) #3

Thanks Brandon. Pretty basic really. Building a site with thumbnail images that link to video files. Any navigation away from that video page and then back re-starts the clip. Was just hoping there was an easy way to have the last position in the clip remembered so it could be resumed.


(Brandon Scott Corlett) #4

I’m on my phone at the moment, but to get the ball rolling I can describe the type of solution would imagine.

You can use JS to get the current time of the video. You can then post upper current time to a PHP script that will save it as a session variable.

When you load a page again you use the session variable to start the video.

Alternatively, you could use cookies instead of session-variables.

https://www.w3schools.com/tags/av_prop_currenttime.asp


(Jannis from inStacks Software) #5

… He asked for a simple way …


(Brandon Scott Corlett) #6

Simple is relative and so far it is the simplest proposed solution. :grin:


(Adam) #7

Thanks Guys,

Brandon, your solution is a bit above my pay grade though I’m certainly willing to take a whack at it after doing some research. I guess I was kind of hoping Joe Workman would just add a click box on the Stack that says “Resume” or “Start from Beginning”. I can hope…


(Brandon Scott Corlett) #8

:wink: that’s why I said I would “get the ball rolling” in hopes that if the blueprint is laid out then someone may pick it up and run with it.


(system) #9

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.