How to display a clickable OSD message?

Discuss your Lua playlist, album art and interface scripts.
uioporqwerty
New Cone
New Cone
Posts: 3
Joined: 04 Nov 2022 02:12

How to display a clickable OSD message?

Postby uioporqwerty » 04 Nov 2022 02:26

Perhaps I'm missing something since this is my first extension. But I've ensured that I have OSD enabled in VLC 3.x and I'd like to run an extension that will display a simple message to the user and then detect if the message has been clicked by the user. Is that possible?

I've tried adding `vlc.osd.message("testing",vlc.osd.channel_register(),"top-left",10*1000000)` to my `input_changed`method, but I never see any OSD message at all. I've seen some code floating around on github that attaches event listeners, is it possible to attach an "on click" event listener to an OSD?

uioporqwerty
New Cone
New Cone
Posts: 3
Joined: 04 Nov 2022 02:12

Re: How to display a clickable OSD message?

Postby uioporqwerty » 04 Nov 2022 02:52

If I do the above, I'm getting an error on channel_register that says "Unable to find vout"

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

Re: How to display a clickable OSD message?

Postby mederi » 20 Nov 2022 21:27

No.

dam3313
New Cone
New Cone
Posts: 1
Joined: 07 Mar 2023 22:03

Re: How to display a clickable OSD message?

Postby dam3313 » 07 Mar 2023 22:12

If I run vlc with this command line :

Code: Select all

vlc.exe --lua-intf=test_intf --input-slave=media1.ts --sout-all --sout #display media2.ts
the lua call :

Code: Select all

local channel = vlc.osd.channel_register()
return the error : "Unable to find vout"
Does someone know how to solve it ?

Alaric
Developer
Developer
Posts: 36
Joined: 27 Apr 2022 18:37

Re: How to display a clickable OSD message?

Postby Alaric » 09 Mar 2023 13:13

Most likely the vout handled by the display stream output isn't shared to the player. Are you sure you need to use stream output here? Wouldn't it work simply with:

Code: Select all

vlc.exe --lua-intf=test_intf --input-slave=media1.ts media2.ts


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 1 guest