fix(play): fixes ep null issue (#1233)

* fix(play): fixes ep null issue

* chore(play): fixing formatting

* chore(play): update syntax

* chore(play): updates

* fix(play): updated fix

* fix(play): updated fix

---------

Co-authored-by: rsreerama3 <rsreerama3@gatech.edu>
This commit is contained in:
Rohan Sreerama
2025-06-05 11:57:35 -07:00
committed by GitHub
parent 25f58d2e43
commit e686a11808

View File

@@ -48,7 +48,7 @@ class TaskPlay extends Task {
*/
ep.once('playback-start', (evt) => {
this.logger.debug({evt}, 'Play got playback-start');
this.cs.stickyEventEmitter.once('uuid_break', (t) => {
this.cs.stickyEventEmitter?.once('uuid_break', (t) => {
if (t?.taskId === this.taskId) {
this.logger.debug(`Play got kill-playback, executing uuid_break, taskId: ${t?.taskId}`);
this.ep.api('uuid_break', this.ep.uuid).catch((err) => this.logger.info(err, 'Error killing audio'));