diff options
Diffstat (limited to 'TOOLS/lua/observe-all.lua')
-rw-r--r-- | TOOLS/lua/observe-all.lua | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/TOOLS/lua/observe-all.lua b/TOOLS/lua/observe-all.lua index 68e09773c6..9bfdf44992 100644 --- a/TOOLS/lua/observe-all.lua +++ b/TOOLS/lua/observe-all.lua @@ -1,16 +1,10 @@ -- 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 +local utils = require("mp.utils") 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) .. "'") + utils.to_string(val) .. "'") end) end |