WebMoviePlayer - Time out for session.

I want to set a time out on my web movie form. So to do that i need the length of the movie?

I tested and if the timeout happens while the movie is playing it takes the application off line, however the audio continues to play.

So I figured if I knew the length the movie I could set the timeout to the length of the movie +5 minutes. However if the user pauses the movie walks away for a while comes back that method won’t work.

It doesn’t seem there’s an event in the movie player to trigger when the movie finishes.

So I’m not exactly sure how to handle this. Of course I could always have a button they press to go to something else that would terminate the session.

Anybody have any good ideas for this one?

I have been searching all over and have not been able to find the way to read the length of a video file. The desktop movie player has a duration property, but the web video player does not!

The HTML5 player has duration and position (currentTime) : http://www.w3schools.com/tags/ref_av_dom.asp

Are you saying that I shouldn’t use the WebMoviePlayer?

I am not saying that. I am saying you can get the length of a video file by loading it into an HTML Video tag.

According to the LR, “The WebMoviePlayer uses the HTML5 video capabilities of the client browser, if available. If HTML5 is not supported, it falls back to the Flash player. If Flash is used, it requires Flash 9.0.32 or later.”.

If indeed Xojo Web was using the HTML5 tag, adding duration and position would be easy as pie.

Yet, I just created a small project and in Chrome 46 on Mac, it uses Flash. I looked at Adobe documentation for the Flash plugin. I could be wrong, but it simply does not seem to provide duration and position.

Seems to me you could relatively easily use an HTML5 video player off WebPage to get the duration you need, while retaining the WebMoviePlayer.

On the long run, though, I am convinced Flash is a dead end and HTML5 is the way to the future. Let alone in iOS, where Flash is very unwelcome. Look also at the Google moves against Flash apps.