How to create continuously automatically updated value in lua VLC Player extension?
Posted: 27 Mar 2017 14:08
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:
One of the solutions I've tried is to use a while loop:
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.
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:
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
I need a compatible solution with the latest version of VLC player.