mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 16:33:01 -06:00
Fix: should not send call events when playing empty audio stream
This commit is contained in:
parent
798fae505e
commit
48df618d93
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue