1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 23:02:37 +00:00
mpv/TOOLS/lua/audio-hotplug-test.lua

14 lines
415 B
Lua
Raw Normal View History

local utils = require("mp.utils")
mp.observe_property("audio-device-list", "native", function(name, val)
print("Audio device list changed:")
for index, e in ipairs(val) do
print(" - '" .. e.name .. "' (" .. e.description .. ")")
end
end)
mp.observe_property("audio-out-detected-device", "native", function(name, val)
print("Detected audio device changed:")
print(" - '" .. val)
end)