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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user