aboutsummaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorThongrapee Panyapatiphan <[email protected]>2022-02-25 06:24:45 +0700
committerGitHub <[email protected]>2022-02-24 17:24:45 -0600
commit4f0db62170398c542d23fcee3812f0887901f977 (patch)
tree2fceb554c7376c627dd4b96ba41ed1b2a2429140 /src/services
parent237086245bb1e2363562c4d0ec7aec8e9f596d24 (diff)
downloadmuse-4f0db62170398c542d23fcee3812f0887901f977.tar.xz
muse-4f0db62170398c542d23fcee3812f0887901f977.zip
Add stop command (#540)
Co-authored-by: Max Isom <[email protected]>
Diffstat (limited to 'src/services')
-rw-r--r--src/services/player.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/services/player.ts b/src/services/player.ts
index 79ef2bb..c315089 100644
--- a/src/services/player.ts
+++ b/src/services/player.ts
@@ -342,6 +342,12 @@ export default class {
return this.queueSize() === 0;
}
+ stop(): void {
+ this.disconnect();
+ this.queuePosition = 0;
+ this.queue = [];
+ }
+
private getHashForCache(url: string): string {
return hasha(url);
}