This commit is contained in:
Damocles 2026-04-12 19:05:24 +02:00
parent 367520df6a
commit b80071db5c
2 changed files with 33 additions and 11 deletions

View file

@ -9,21 +9,27 @@ Row {
// Only detect active client streams, not hardware sources/devices // Only detect active client streams, not hardware sources/devices
readonly property bool _videoCapture: { readonly property bool _videoCapture: {
if (!Pipewire.nodes) return false; if (!Pipewire.nodes)
return false;
for (const node of Pipewire.nodes.values) { for (const node of Pipewire.nodes.values) {
if (!node.isStream) continue; if (!node.isStream)
continue;
const mc = node.properties?.["media.class"] ?? ""; const mc = node.properties?.["media.class"] ?? "";
if (mc === "Stream/Input/Video" || mc === "Stream/Output/Video") return true; if (mc === "Stream/Input/Video" || mc === "Stream/Output/Video")
return true;
} }
return false; return false;
} }
readonly property bool _audioIn: { readonly property bool _audioIn: {
if (!Pipewire.nodes) return false; if (!Pipewire.nodes)
return false;
for (const node of Pipewire.nodes.values) { for (const node of Pipewire.nodes.values) {
if (!node.isStream) continue; if (!node.isStream)
continue;
const mc = node.properties?.["media.class"] ?? ""; const mc = node.properties?.["media.class"] ?? "";
if (mc === "Stream/Input/Audio") return true; if (mc === "Stream/Input/Audio")
return true;
} }
return false; return false;
} }
@ -51,8 +57,16 @@ Row {
SequentialAnimation on opacity { SequentialAnimation on opacity {
running: root._videoCapture running: root._videoCapture
loops: Animation.Infinite loops: Animation.Infinite
NumberAnimation { to: 0.4; duration: 600; easing.type: Easing.InOutQuad } NumberAnimation {
NumberAnimation { to: 1; duration: 600; easing.type: Easing.InOutQuad } to: 0.4
duration: 600
easing.type: Easing.InOutQuad
}
NumberAnimation {
to: 1
duration: 600
easing.type: Easing.InOutQuad
}
} }
} }
@ -77,8 +91,16 @@ Row {
SequentialAnimation on opacity { SequentialAnimation on opacity {
running: root._audioIn running: root._audioIn
loops: Animation.Infinite loops: Animation.Infinite
NumberAnimation { to: 0.4; duration: 600; easing.type: Easing.InOutQuad } NumberAnimation {
NumberAnimation { to: 1; duration: 600; easing.type: Easing.InOutQuad } to: 0.4
duration: 600
easing.type: Easing.InOutQuad
}
NumberAnimation {
to: 1
duration: 600
easing.type: Easing.InOutQuad
}
} }
} }
} }