mirror of https://github.com/mpv-player/mpv
TOOLS/lua/observe-all: explicitly observe all options
This commit is contained in:
parent
f4db6b8479
commit
b9153ee177
|
@ -6,9 +6,17 @@
|
||||||
|
|
||||||
local utils = require("mp.utils")
|
local utils = require("mp.utils")
|
||||||
|
|
||||||
for i,name in ipairs(mp.get_property_native("property-list")) do
|
function observe(name)
|
||||||
mp.observe_property(name, "native", function(name, val)
|
mp.observe_property(name, "native", function(name, val)
|
||||||
print("property '" .. name .. "' changed to '" ..
|
print("property '" .. name .. "' changed to '" ..
|
||||||
utils.to_string(val) .. "'")
|
utils.to_string(val) .. "'")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for i,name in ipairs(mp.get_property_native("property-list")) do
|
||||||
|
observe(name)
|
||||||
|
end
|
||||||
|
|
||||||
|
for i,name in ipairs(mp.get_property_native("options")) do
|
||||||
|
observe("options/" .. name)
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue