From 4f0db62170398c542d23fcee3812f0887901f977 Mon Sep 17 00:00:00 2001 From: Thongrapee Panyapatiphan Date: Fri, 25 Feb 2022 06:24:45 +0700 Subject: Add stop command (#540) Co-authored-by: Max Isom --- src/services/player.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/services') 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); } -- cgit v1.2.3