mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
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:
@@ -215,6 +215,10 @@ Item {
|
||||
MediaService.play()
|
||||
}
|
||||
|
||||
function stop() {
|
||||
MediaService.stop()
|
||||
}
|
||||
|
||||
function pause() {
|
||||
MediaService.pause()
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user