mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 16:33:01 -06:00
Use an empty audio stream to reset audio server
This commit is contained in:
parent
8a80d0f2c6
commit
798fae505e
|
|
@ -240,7 +240,7 @@ export class AppRadioService implements OnDestroy {
|
||||||
|
|
||||||
stop(): void {
|
stop(): void {
|
||||||
if (this._call.current) {
|
if (this._call.current) {
|
||||||
this._audio.src = 'data:audio/aac;base64,//FsQAOf/N4CAExhdmM1OC4zNS4xMDAAAjBADv/xbEADn/zeAgBMYXZjNTguMzUuMTAwAAIwQA4=';
|
this._audio.src = this._getEmptyAudioStream();
|
||||||
|
|
||||||
this._call.previous = this._call.current;
|
this._call.previous = this._call.current;
|
||||||
this._call.current = null;
|
this._call.current = null;
|
||||||
|
|
@ -329,7 +329,7 @@ export class AppRadioService implements OnDestroy {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this._audio = new Audio();
|
this._audio = new Audio(this._getEmptyAudioStream());
|
||||||
|
|
||||||
this._audio.autoplay = true;
|
this._audio.autoplay = true;
|
||||||
|
|
||||||
|
|
@ -390,6 +390,10 @@ export class AppRadioService implements OnDestroy {
|
||||||
this._emitQueueEvent();
|
this._emitQueueEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _getEmptyAudioStream(): string {
|
||||||
|
return 'data:audio/aac;base64,//FsQAOf/N4CAExhdmM1OC4zNS4xMDAAAjBADv/xbEADn/zeAgBMYXZjNTguMzUuMTAwAAIwQA4=';
|
||||||
|
}
|
||||||
|
|
||||||
private _readAvoids(): void {
|
private _readAvoids(): void {
|
||||||
const avoids = this._readLocalStorage(LOCAL_STORAGE_KEY.avoids);
|
const avoids = this._readLocalStorage(LOCAL_STORAGE_KEY.avoids);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue