From c030d52013239a8c2e3425a43db3eca49a5c356a Mon Sep 17 00:00:00 2001 From: rhulkb27 Date: Thu, 13 May 2021 12:24:16 -0700 Subject: [PATCH] adding an emit for when process is killed --- service/platform/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service/platform/index.js b/service/platform/index.js index 1e7c6fcd..3b678c67 100644 --- a/service/platform/index.js +++ b/service/platform/index.js @@ -183,8 +183,10 @@ class Player extends events.EventEmitter { } async stop() { - if (this._child) + if (this._child) { + this.emit('stopChain'); // emitted when stop is called, lets agent know to stop playing current audio and all subsequent audios this._child.kill(); + } } }