add verb:status for play events (#274)

This commit is contained in:
Dave Horton
2023-03-03 15:56:50 -05:00
committed by GitHub
parent 3084a9d6ba
commit 4919c05181

View File

@@ -37,6 +37,7 @@ class TaskPlay extends Task {
}, this.timeoutSecs * 1000);
}
try {
this.notifyStatus({event: 'start-playback'});
while (!this.killed && (this.loop === 'forever' || this.loop--) && this.ep.connected) {
if (cs.isInConference) {
const {memberId, confName, confUuid} = cs;
@@ -80,7 +81,8 @@ class TaskPlay extends Task {
this.killPlayToConfMember(this.ep, memberId, confName);
}
else {
await this.ep.api('uuid_break', this.ep.uuid).catch((err) => this.logger.info(err, 'Error killing audio'));
this.notifyStatus({event: 'kill-playback'});
this.ep.api('uuid_break', this.ep.uuid).catch((err) => this.logger.info(err, 'Error killing audio'));
}
}
}