1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 04:45:33 +00:00
mpv/TOOLS/lua/observe-all.lua
wm4 3295caca3d lua: add a function that formats Lua values as strings
Yep, Lua is so crappy that the stdlib doesn't provide anything like
this.

Repurposes the undocumented mp.format_table() function and moves it to
mp.utils.
2014-11-29 00:03:46 +01:00

11 lines
334 B
Lua

-- Test script for property change notification mechanism.
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 '" ..
utils.to_string(val) .. "'")
end)
end