Skip to content

Instantly share code, notes, and snippets.

@dougcooper
Last active May 8, 2023 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dougcooper/3ab8f5f406c441ede9c8c8f268c4e042 to your computer and use it in GitHub Desktop.
Save dougcooper/3ab8f5f406c441ede9c8c8f268c4e042 to your computer and use it in GitHub Desktop.
how to set a node property with wireplumber script
vlc_om = ObjectManager {
Interest {
type = 'node',
Constraint { 'node.name', 'matches', 'VLC*' },
},
}
vlc_om:connect('object-added', function(om,node)
Log.message('VLC input connected')
node.properties['priority.session'] = 1050
end)
vlc_om:activate()
@dougcooper
Copy link
Author

adding this script to /etc/wireplumber/main.lua.d gives the following error

W 17:36:21.676514              wplua ../git/lib/wplua/wplua.c:49:_wplua_errhandler: [string "90-set-node-property.lua"]:4: attempt to call a nil value (global 'Constraint')
stack traceback:
        [string "90-set-node-property.lua"]:4: in local 'chunk'
        [string "sandbox.lua"]:109: in function 'sandbox'
Runtime error while loading '90-set-node-property.lua'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment