Page 1 of 1

How to create continuously automatically updated value in lua VLC Player extension?

Posted: 27 Mar 2017 14:08
by omareg94
I'm writing a VLC extension using lua (CurrentTimeMilliseconds.lua) in order to show current video position time (with milliseconds part) in a popup window. I need the text shown to be updated automatically without using any buttons or auto-clicker software (like AHK) in order to call the function that updates the shown value.

Simply, I need this value to be continously updated automatically from inside lua (without the help of any 3rd party software) as the video time position changes:
Image

One of the solutions I've tried is to use a while loop:

Code: Select all

function Get_time() while true do local input=vlc.object.input() if input then text_time:set_text(Time2string(vlc.var.get(input,"time"))) end end end
But this makes VLC player freeze and not responding when I activate my extension.

I need a compatible solution with the latest version of VLC player.

Re: How to create continuously automatically updated value in lua VLC Player extension?

Posted: 27 Mar 2017 15:38
by mederi
There is no solution.