Skip to content

Commit

Permalink
adding an emit for when process is killed
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj-Bapat committed May 13, 2021
1 parent 982f85e commit c030d52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service/platform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}

Expand Down

0 comments on commit c030d52

Please sign in to comment.