1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-25 14:02:53 -05:00

audio: recreate media players on pipewire device change

This commit is contained in:
bbedward
2026-01-08 23:35:42 -05:00
parent 5ae2cd1dfb
commit a283017f26

View File

@@ -510,6 +510,16 @@ Singleton {
objects: Pipewire.nodes.values.filter(node => node.audio && !node.isStream)
}
Connections {
target: Pipewire
function onDefaultAudioSinkChanged() {
if (soundsAvailable) {
Qt.callLater(root.destroySoundPlayers);
Qt.callLater(root.createSoundPlayers);
}
}
}
function setVolume(percentage) {
if (!root.sink?.audio) {
return "No audio sink available";