mirror of
https://github.com/chuot/rdio-scanner.git
synced 2026-08-13 16:33:01 -06:00
Change handling of skip delay on client
This commit is contained in:
parent
46c1e4f82e
commit
0f21e399ac
|
|
@ -3,6 +3,8 @@
|
||||||
- Add load-tr to load Trunk Recorder talkgroups csv.
|
- Add load-tr to load Trunk Recorder talkgroups csv.
|
||||||
- Move back keypadsBeeps presets to backend.
|
- Move back keypadsBeeps presets to backend.
|
||||||
- Change config.options.useDimmer to config.options.dimmerDelay.
|
- Change config.options.useDimmer to config.options.dimmerDelay.
|
||||||
|
- Fix potential error in handling keypadBeeps styles.
|
||||||
|
- Change handling of skip delay on client.
|
||||||
|
|
||||||
# Version 4.6
|
# Version 4.6
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ export class AppRdioScannerService implements OnDestroy {
|
||||||
private liveFeedMapPriorToHoldTalkgroup: RdioScannerLiveFeedMap | undefined;
|
private liveFeedMapPriorToHoldTalkgroup: RdioScannerLiveFeedMap | undefined;
|
||||||
private liveFeedPaused = false;
|
private liveFeedPaused = false;
|
||||||
|
|
||||||
|
private skipDelay = false;
|
||||||
|
|
||||||
private webSocket: WebSocket | undefined;
|
private webSocket: WebSocket | undefined;
|
||||||
private webSocketMessagePending = false;
|
private webSocketMessagePending = false;
|
||||||
|
|
||||||
|
|
@ -349,8 +351,8 @@ export class AppRdioScannerService implements OnDestroy {
|
||||||
this.event.emit({ pause: this.liveFeedPaused });
|
this.event.emit({ pause: this.liveFeedPaused });
|
||||||
}
|
}
|
||||||
|
|
||||||
play(call?: RdioScannerCall | undefined, options?: { delay?: boolean }): void {
|
play(call?: RdioScannerCall | undefined): void {
|
||||||
if (this.liveFeedPaused) {
|
if (this.liveFeedPaused || this.skipDelay) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} else if (call?.audio) {
|
} else if (call?.audio) {
|
||||||
|
|
@ -379,7 +381,6 @@ export class AppRdioScannerService implements OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.audioContext?.decodeAudioData(arrayBuffer, (buffer) => {
|
this.audioContext?.decodeAudioData(arrayBuffer, (buffer) => {
|
||||||
timer(options?.delay ? 1000 : 0).subscribe(() => {
|
|
||||||
if (!this.audioContext || this.audioSource || !this.call) {
|
if (!this.audioContext || this.audioSource || !this.call) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -403,7 +404,6 @@ export class AppRdioScannerService implements OnDestroy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
}, () => {
|
}, () => {
|
||||||
this.event.emit({ call: this.call, queue: this.callQueue.length });
|
this.event.emit({ call: this.call, queue: this.callQueue.length });
|
||||||
|
|
||||||
|
|
@ -425,7 +425,7 @@ export class AppRdioScannerService implements OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
replay(): void {
|
replay(): void {
|
||||||
this.play(this.call || this.callPrevious, { delay: false });
|
this.play(this.call || this.callPrevious);
|
||||||
}
|
}
|
||||||
|
|
||||||
searchCalls(options: RdioScannerSearchOptions): void {
|
searchCalls(options: RdioScannerSearchOptions): void {
|
||||||
|
|
@ -435,7 +435,18 @@ export class AppRdioScannerService implements OnDestroy {
|
||||||
skip(options?: { delay?: boolean }): void {
|
skip(options?: { delay?: boolean }): void {
|
||||||
this.stop();
|
this.stop();
|
||||||
|
|
||||||
this.play(undefined, options);
|
if (options?.delay) {
|
||||||
|
this.skipDelay = true;
|
||||||
|
|
||||||
|
timer(1000).subscribe(() => {
|
||||||
|
this.skipDelay = false;
|
||||||
|
|
||||||
|
this.play();
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stop(options?: { emit?: boolean }): void {
|
stop(options?: { emit?: boolean }): void {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue