elseif command == "snapshot" then
common.snapshot()
elseif command == "volume" then
- vlc.volume.set(tonumber(val))
+ common.volume(val)
elseif command == "seek" then
common.seek(val)
elseif command == "key" then
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
function volume(name,client,value)
if value then
- vlc.volume.set(value)
+ common.volume(value)
else
client:append(tostring(vlc.volume.get()))
end