feat: play verb url support single or array list url (#158)

* feat: update time-series 0.11.12

* feat: support play verb url in plain text or array

* fix: review comment

Co-authored-by: Dave Horton <daveh@beachdognet.com>
This commit is contained in:
xquanluu
2022-08-25 15:09:48 +07:00
committed by GitHub
parent 4f0439dad9
commit 127432f2ec
14 changed files with 323 additions and 20 deletions

View File

@@ -24,7 +24,13 @@ class TaskPlay extends Task {
while (!this.killed && (this.loop === 'forever' || this.loop--) && this.ep.connected) {
if (cs.isInConference) {
const {memberId, confName, confUuid} = cs;
await this.playToConfMember(this.ep, memberId, confName, confUuid, this.url);
if (Array.isArray(this.url)) {
for (const playUrl of this.url) {
await this.playToConfMember(this.ep, memberId, confName, confUuid, playUrl);
}
} else {
await this.playToConfMember(this.ep, memberId, confName, confUuid, this.url);
}
}
else await ep.play(this.url);
}