Skip to content

Lua extension function playing_changed doesn't seem to be called on MacOS

I'm trying to make a simple extension that would respond to VLC starting and stopping playback. This should be achieved by listing playing-listener in the capabilities field returned from the descriptor function. However, the playing_changed function never seems to be called.

In the code below, I'm registering both input-listener and playing-listener—and I'm getting messages from input_changed but not playing_changed. Other than that, I'm not seeing anything particular regarding extensions in the ‘Window→Messages’ dialog, only a bunch of ‘Trying Lua scripts in such and such directory’ and ‘Trying Lua playlist script’.

VLC version 3.0.8 Vetinari (Intel 64bit), “Compiled by d-fu with clang 9.1.0 (clang-902.0.39.2) (Aug 14 2019 20:10:56).”

Same with the nightly version vlc-3.0.9-20190919-0701, “Compiled by jenkins with clang 10.0.1 (clang-1001.0.46.4) (Sep 19 2019 06:58:04).”

MacOSX 10.13.6.

Nightly vlc-4.0.0-20190919-0418-dev doesn't seem to call input_changed either.

Not sure if this works on Windows or Linux, but in the forums I didn't find any mentions of the problem.

The extension script:

function descriptor()
    return {
        title = "Now playing",
        capabilities = {"input-listener", "playing-listener"}
    }
end

function activate()
end

function deactivate()
end

function input_changed()
    vlc.msg.info("[Now Playing] input_changed")
end

function playing_changed()
    vlc.msg.info("[Now Playing] playing_changed")
end
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information