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