File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,15 @@ PlasmoidItem {
4040 readonly property bool isConnecting: root .daemonState === " connecting"
4141 readonly property bool needsPIN: root .daemonState === " pin_required"
4242 readonly property bool isBusy: root .daemonState === " discovering"
43+ readonly property bool hasAnyStreamingTarget: {
44+ var streams = root .streamList || []
45+ for (var i = 0 ; i < streams .length ; i++ ) {
46+ if (streams[i].state === " streaming" ) {
47+ return true
48+ }
49+ }
50+ return false
51+ }
4352 readonly property bool hasAnyAudioStream: {
4453 var streams = root .streamList || []
4554 for (var i = 0 ; i < streams .length ; i++ ) {
@@ -266,6 +275,17 @@ PlasmoidItem {
266275 root .runCtl ([" discover" ], " discover" )
267276 }
268277 }
278+ Controls .ToolButton {
279+ icon .name : " media-playback-stop"
280+ display: Controls .ToolButton .IconOnly
281+ visible: root .hasAnyStreamingTarget
282+ enabled: ! root .isBusy
283+ Controls .ToolTip .text : " Stop streaming to all targets"
284+ Controls .ToolTip .visible : hovered
285+ onClicked: {
286+ root .runCtl ([" disconnect" ], " disconnect" )
287+ }
288+ }
269289 Controls .ToolButton {
270290 icon .name : root .allAudioStreamsMuted ? " audio-volume-muted" : " audio-volume-high"
271291 display: Controls .ToolButton .IconOnly
You can’t perform that action at this time.
0 commit comments