-- Trigger a hotkey
function hotkey(arg)
- vlc.var.set( vlc.object.libvlc(), "key-pressed", vlc.config.get( arg ) )
+ local id = vlc.misc.action_id( arg )
+ if id ~= nil then
+ vlc.var.set( vlc.object.libvlc(), "key-action", id )
+ return true
+ else
+ return false
+ end
end
-- Take a video snapshot
vlc.var.set(input,"time",tonumber(value))
end
end
+
+function volume(value)
+ if type(value)=="string" and string.sub(value,1,1) == "+" or string.sub(value,1,1) == "-" then
+ vlc.volume.set(vlc.volume.get()+tonumber(value))
+ else
+ vlc.volume.set(tostring(value))
+ end
+end