mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-28 23:42:51 -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)
|
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) {
|
function setVolume(percentage) {
|
||||||
if (!root.sink?.audio) {
|
if (!root.sink?.audio) {
|
||||||
return "No audio sink available";
|
return "No audio sink available";
|
||||||
|
|||||||
Reference in New Issue
Block a user