mirror of
https://github.com/mpv-player/mpv
synced 2024-12-11 09:25:56 +00:00
411109f484
This is just natural, but it's also not that obvious.
15 lines
566 B
Lua
15 lines
566 B
Lua
-- Test script for property change notification mechanism.
|
|
-- Note that watching/reading some properties can be very expensive, or
|
|
-- require the player to synchronously wait on network (when playing
|
|
-- remote files), so you should in general only watch properties you
|
|
-- are interested in.
|
|
|
|
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
|