Fix continuous play not playing next call when a call has invalid audio

This commit is contained in:
Chrystian Huot 2020-05-29 12:36:24 -04:00
parent 349d5b2b64
commit bdc704a82c

View file

@ -308,7 +308,7 @@ export class AppRdioScannerService implements OnDestroy {
call = this.callQueue.shift(); call = this.callQueue.shift();
} }
if (call?.audio?.data?.length) { if (call?.audio) {
const arrayBuffer = new ArrayBuffer(call.audio.data.length); const arrayBuffer = new ArrayBuffer(call.audio.data.length);
const arrayBufferView = new Uint8Array(arrayBuffer); const arrayBufferView = new Uint8Array(arrayBuffer);
@ -342,7 +342,7 @@ export class AppRdioScannerService implements OnDestroy {
}, 500); }, 500);
}).catch(() => this.skip()); }).catch(() => this.skip());
}, () => { }, () => {
this.event.emit({ call: null, queue: this.callQueue.length }); this.event.emit({ call, queue: this.callQueue.length });
this.skip(); this.skip();
}); });