blob: 68e09773c682bd5e0af6a638b81198978cd401d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
-- Test script for property change notification mechanism.
function format_property_val(v)
if type(v) == "table" then
return mp.format_table(v) -- undocumented function; might be removed
else
return tostring(v)
end
end
for i,name in ipairs(mp.get_property_native("property-list")) do
mp.observe_property(name, "native", function(name, val)
print("property '" .. name .. "' changed to '" ..
format_property_val(val) .. "'")
end)
end
|