polling input.time and converting it

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Shadow2531
Blank Cone
Blank Cone
Posts: 13
Joined: 01 Apr 2007 12:04

polling input.time and converting it

Postby Shadow2531 » 09 Jun 2009 13:27

Looking at <http://www.videolan.org/doc/play-howto/ ... l#id310965> (version > 0.8.5.1), I can see there's an option to get the video position in milliseconds via the input.time getter. However, I have 2 questions.

1. Is there a way to pass the plugin a callback function that the plugin calls (at some interval) to show time updates? Or, do I have to use setInterval in JS to poll input.time?

For example, plugin.onpositionchange = function(ps) {alert(ps + "ms");};

2. input.time returns in milliseconds. However, I want it in years (optional) + days + hours + minutes + seconds + milliseconds. I can do this in JS, but does the plugin offer any way for it to do the conversion?

For example, an input.position object that had getYearPart, getDayPart, getHourPart, getSecondPart and getMillisecondPart functions would be great. Yet, I don't see anything like that.

Thanks

thannoy
Big Cone-huna
Big Cone-huna
Posts: 601
Joined: 20 Mar 2008 09:44
VLC version: 0.9.8a & 1.0-git
Operating System: GNU/Linux Fedora10
Location: France
Contact:

Re: polling input.time and converting it

Postby thannoy » 09 Jun 2009 13:38

I think the answer is "no" for both questions. I don't think such JS callback mecanism exists nor I think you cas ask the plugin to convert the time.

Shadow2531
Blank Cone
Blank Cone
Posts: 13
Joined: 01 Apr 2007 12:04

Re: polling input.time and converting it

Postby Shadow2531 » 16 Jun 2009 02:26

Thanks.

It'd be cool if you could though.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 3 guests