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

Discuss your Lua playlist, album art and interface scripts.
omareg94
New Cone
New Cone
Posts: 4
Joined: 21 Mar 2017 19:18

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

Postby omareg94 » 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:
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.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

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

Postby mederi » 27 Mar 2017 15:38

There is no solution.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 12 guests