mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 16:33:01 -06:00
Fix audio stalling issue when switching to other app on android
This commit is contained in:
parent
ae19c079f7
commit
44cb5a4ca6
|
|
@ -363,6 +363,8 @@ export class AppRadioService implements OnDestroy {
|
||||||
|
|
||||||
this._audio.onplay = () => startHandler();
|
this._audio.onplay = () => startHandler();
|
||||||
|
|
||||||
|
this._audio.onstalled = () => this._audio.play();
|
||||||
|
|
||||||
this._audio.ontimeupdate = () => progressHandler();
|
this._audio.ontimeupdate = () => progressHandler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -461,24 +463,28 @@ export class AppRadioService implements OnDestroy {
|
||||||
transform: (call: RadioCall) => this.transform(call),
|
transform: (call: RadioCall) => this.transform(call),
|
||||||
};
|
};
|
||||||
|
|
||||||
const avoids = Object.keys(this._avoids).map((sys: string) => +sys).reduce((sel: any, sys: number) => {
|
const avoids = Object.keys(this._avoids)
|
||||||
const tgs = Object.keys(this._avoids[sys]).map((tg: string) => +tg).filter((tg: number) => this._avoids[sys][tg]);
|
.map((sys: string) => +sys)
|
||||||
|
.reduce((sel: any, sys: number) => {
|
||||||
|
const tgs = Object.keys(this._avoids[sys])
|
||||||
|
.map((tg: string) => +tg)
|
||||||
|
.filter((tg: number) => this._avoids[sys][tg]);
|
||||||
|
|
||||||
if (tgs.length) {
|
if (tgs.length) {
|
||||||
sel.push({
|
sel.push({
|
||||||
$and: [
|
$and: [
|
||||||
{
|
{
|
||||||
system: { $ne: sys },
|
system: { $ne: sys },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
talkgroup: { $nin: tgs },
|
talkgroup: { $nin: tgs },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return sel;
|
return sel;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const selector = avoids.length ? { $or: avoids } : {};
|
const selector = avoids.length ? { $or: avoids } : {};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue