Page 1 of 1

Sample video player app - resume

PostPosted: Tue Jun 16, 2015 11:04 am
by edunn_1
One of the requirements for an app to be accepted on LG is the resume function for videos. I've been looking over my app and trying to figure out how to accomplish this.

What my app is, is essentially a variation of the sample video player app. I've created a new index.html file which has the menu of videos, then when someone selects a video from the menu, I pass the URL of the video to load in the link, which is then read and processed by the samp video player app.

The problem is how to put a resume function in the app. Each video I have is about 2 min long. If someone selects a video to play, then hits back, then selects the video again, none of that information is currently retained. (The current time code & the previously watched video.)

So problem 1 is knowing what the current time code is.
Problem 2 is passing a variable back to the index.html file when the back key is pressed.
Problem 3 is passing the timecode variable back to video.html if the video is resumed.

Is it possble I'm going about the app in entirely the wrong way? Should I even be using seperate html files for different screens? It seemed sensible when I started, but now I hate to have all my work undone because I can't resume a 2 min video in the middle.

Any ideas anyone?

I know I should be able to grab the current time by assigning a variable to document.getElementById(videoid).currentTime;
Then in theory I can store that information along with the current video ID into local storage.

The problem is how do I let the app know when the normal back button is pressed, so that it knows to save the data?

Sample video player app - resume

PostPosted: Tue Jun 30, 2015 10:23 am
by edunn_1
I'm still nowhere with this. Can anyone point me to a document that describes how to impliment a video resume feature? This is a requirement for LG, so there must be a solution somewhere I'm just not seeing.