Fix: should not send call events when playing empty audio stream

This commit is contained in:
Chrystian Huot 2019-07-10 08:10:43 -04:00
parent 798fae505e
commit 48df618d93

View file

@ -298,7 +298,7 @@ export class AppRadioService implements OnDestroy {
let watchdog = null; let watchdog = null;
const progressHandler = () => { const progressHandler = () => {
if (playing) { if (this._call.current && playing) {
this._emitTimeEvent(); this._emitTimeEvent();
if (watchdog) { if (watchdog) {
@ -310,14 +310,16 @@ export class AppRadioService implements OnDestroy {
}; };
const startHandler = () => { const startHandler = () => {
playing = true; if (this._call.current) {
playing = true;
this._emitCallEvent(); this._emitCallEvent();
this._emitQueueEvent(); this._emitQueueEvent();
}
}; };
const stopHandler = () => { const stopHandler = () => {
if (playing) { if (this._call.current && playing) {
playing = false; playing = false;
if (watchdog) { if (watchdog) {