mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 14:52:43 +00:00
3295caca3d
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.
11 lines
334 B
Lua
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
|