MediaIPC: added stop action.

- Be aware that stop can't be resumed with play, from my testing once
stopped the media is no longer available.
This commit is contained in:
ItsLemmy
2025-10-16 21:32:24 -04:00
parent 9f7d4d274d
commit e352cc26ce
2 changed files with 11 additions and 0 deletions
+4
View File
@@ -215,6 +215,10 @@ Item {
MediaService.play()
}
function stop() {
MediaService.stop()
}
function pause() {
MediaService.pause()
}
+7
View File
@@ -200,6 +200,13 @@ Singleton {
}
}
function stop() {
let target = currentPlayer ? (currentPlayer._controlTarget || currentPlayer) : null
if (target) {
target.stop()
}
}
function pause() {
let target = currentPlayer ? (currentPlayer._controlTarget || currentPlayer) : null
if (target && target.canPause) {