git.videolan.org
/
vlc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add vlc_GetActionId().
[vlc.git]
/
share
/
lua
/
intf
/
modules
/
common.lua
diff --git
a/share/lua/intf/modules/common.lua
b/share/lua/intf/modules/common.lua
index
f0a1aa2
..
c02d4e7
100644
(file)
--- a/
share/lua/intf/modules/common.lua
+++ b/
share/lua/intf/modules/common.lua
@@
-23,7
+23,13
@@
end
-- Trigger a hotkey
function hotkey(arg)
-- 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
end
-- Take a video snapshot
@@
-85,3
+91,11
@@
function seek(value)
vlc.var.set(input,"time",tonumber(value))
end
end
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