Version 4.7.5

This commit is contained in:
Chrystian Huot 2020-09-30 13:12:58 -04:00
parent 4154959931
commit 2227e4a994
10 changed files with 153 additions and 109 deletions

View file

@ -7,19 +7,29 @@
- Remove Config.options.useGroup, but the feature remains. - Remove Config.options.useGroup, but the feature remains.
- Bug fixes. - Bug fixes.
## Version 4.7.1 _v4.7.1_
- Fix crash on client when access to talkgroups is restricted with a password. - Fix crash on client when access to talkgroups is restricted with a password.
## Version 4.7.2 _v4.7.2_
- Fix Keypad beeps not working on iOS. - Fix Keypad beeps not working on iOS.
- Fix pause not going off due to the above bug. - Fix pause not going off due to the above bug.
## Version 4.7.3 _v4.7.3_
- Fix websocket not connection on ssl. - Fix websocket not connection on ssl.
## Version 4.7.4 _v4.7.4_
- Fix display width too wide when long talkgroup name. - Fix display width too wide when long talkgroup name.
_v4.7.5_
- Fix playback mode getting mixed up if clicking too fast on play.
- Fix side panels background color inheritance.
- Node modules update.
# Version 4.6 # Version 4.6
- Fix documentation in regards to load-rrd in install-github.md. - Fix documentation in regards to load-rrd in install-github.md.

View file

@ -1,6 +1,6 @@
{ {
"name": "rdio-scanner-client", "name": "rdio-scanner-client",
"version": "4.7.4", "version": "4.7.5",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -243,9 +243,9 @@
} }
}, },
"@angular/cdk": { "@angular/cdk": {
"version": "10.2.2", "version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-10.2.2.tgz", "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-10.2.3.tgz",
"integrity": "sha512-DVMnj7QY1prZblRjYfDeyEH79p1TDI0JGgg2D2BAWwzMoPKCgVCqy1uRuvi+WNhYoDR3QJJJ8tXLKucUoShuIw==", "integrity": "sha512-ne3uSnWLQyUfYQ32zTvDauudyPONRPPBSbdOzFSsvFQuPxUcMQ3mFHJuq2OXei47TfSatmmyuKSuw9EtmTRbQw==",
"requires": { "requires": {
"parse5": "^5.0.0", "parse5": "^5.0.0",
"tslib": "^2.0.0" "tslib": "^2.0.0"
@ -524,9 +524,9 @@
} }
}, },
"@angular/material": { "@angular/material": {
"version": "10.2.2", "version": "10.2.3",
"resolved": "https://registry.npmjs.org/@angular/material/-/material-10.2.2.tgz", "resolved": "https://registry.npmjs.org/@angular/material/-/material-10.2.3.tgz",
"integrity": "sha512-xRt8FsjY/MdC/dMBhitCXmOfXo4uhzLZ+kBqkKwY8gBsJ7FjhJIPbe/kRPBuzvVkVphrEfi/pMeDOge8v5ETbA==", "integrity": "sha512-xqMC1A/CVX7RESnVm5EcK46MVXe1ROSMOf1RBuUeS6K+fnvx8kUxwmUcSY3LNREvW5hncFup7+MxSPfeFxv71A==",
"requires": { "requires": {
"tslib": "^2.0.0" "tslib": "^2.0.0"
} }

View file

@ -2,12 +2,12 @@
"author": "Chrystian Huot <chrystian.huot@saubeo.solutions>", "author": "Chrystian Huot <chrystian.huot@saubeo.solutions>",
"dependencies": { "dependencies": {
"@angular/animations": "^10.1.3", "@angular/animations": "^10.1.3",
"@angular/cdk": "^10.2.2", "@angular/cdk": "^10.2.3",
"@angular/common": "~10.1.3", "@angular/common": "~10.1.3",
"@angular/compiler": "~10.1.3", "@angular/compiler": "~10.1.3",
"@angular/core": "~10.1.3", "@angular/core": "~10.1.3",
"@angular/forms": "~10.1.3", "@angular/forms": "~10.1.3",
"@angular/material": "^10.2.2", "@angular/material": "^10.2.3",
"@angular/platform-browser": "~10.1.3", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~10.1.3", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/service-worker": "~10.1.3", "@angular/service-worker": "~10.1.3",
@ -32,5 +32,5 @@
"build": "ng build --base-href ./ --prod", "build": "ng build --base-href ./ --prod",
"start": "ng serve" "start": "ng serve"
}, },
"version": "4.7.4" "version": "4.7.5"
} }

View file

@ -162,17 +162,10 @@ export class AppRdioScannerMainComponent implements OnDestroy, OnInit {
if (this.auth) { if (this.auth) {
this.authFocus(); this.authFocus();
} else {
if (this.playbackMode) {
this.appRdioScannerService.beep(RdioScannerBeepStyle.Deactivate);
this.appRdioScannerService.stopPlaybackMode();
} else { } else {
this.appRdioScannerService.beep(this.livefeedOffline ? RdioScannerBeepStyle.Activate : RdioScannerBeepStyle.Deactivate); this.appRdioScannerService.beep(this.livefeedOffline ? RdioScannerBeepStyle.Activate : RdioScannerBeepStyle.Deactivate);
this.appRdioScannerService.livefeed(); this.appRdioScannerService.livefeed();
}
this.updateDimmer(); this.updateDimmer();
} }

View file

@ -4,7 +4,6 @@
display: block; display: block;
height: 100%; height: 100%;
min-width: 320px; min-width: 320px;
}
.mat-sidenav { .mat-sidenav {
background-color: inherit; background-color: inherit;
@ -24,3 +23,4 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
} }
}

View file

@ -19,7 +19,7 @@
import { DOCUMENT } from '@angular/common'; import { DOCUMENT } from '@angular/common';
import { EventEmitter, Inject, Injectable, OnDestroy } from '@angular/core'; import { EventEmitter, Inject, Injectable, OnDestroy } from '@angular/core';
import { interval, timer } from 'rxjs'; import { interval, Subscription, timer } from 'rxjs';
import { takeWhile } from 'rxjs/operators'; import { takeWhile } from 'rxjs/operators';
import { import {
RdioScannerAvoidOptions, RdioScannerAvoidOptions,
@ -88,8 +88,9 @@ export class AppRdioScannerService implements OnDestroy {
private livefeedPaused = false; private livefeedPaused = false;
private playbackList: RdioScannerPlaybackList | undefined; private playbackList: RdioScannerPlaybackList | undefined;
private playbackPending: string | undefined;
private skipDelay = false; private skipDelay: Subscription | undefined;
private websocket: WebSocket | undefined; private websocket: WebSocket | undefined;
@ -314,12 +315,15 @@ export class AppRdioScannerService implements OnDestroy {
} }
} }
livefeed(status: boolean = !(this.livefeedMode === RdioScannerLivefeedMode.Online)): void { livefeed(): void {
if (status) { if (this.livefeedMode === RdioScannerLivefeedMode.Offline) {
this.startLivefeed(); this.startLivefeed();
} else { } else if (this.livefeedMode === RdioScannerLivefeedMode.Online) {
this.stopLivefeed(); this.stopLivefeed();
} else if (this.livefeedMode === RdioScannerLivefeedMode.Playback) {
this.stopPlaybackMode();
} }
} }
@ -328,7 +332,15 @@ export class AppRdioScannerService implements OnDestroy {
} }
loadAndPlay(id: string): void { loadAndPlay(id: string): void {
this.stop({ emit: false }); if (this.skipDelay) {
this.skipDelay.unsubscribe();
this.skipDelay = undefined;
}
this.playbackPending = id;
this.stop();
if (this.livefeedMode === RdioScannerLivefeedMode.Offline) { if (this.livefeedMode === RdioScannerLivefeedMode.Offline) {
this.livefeedMode = RdioScannerLivefeedMode.Playback; this.livefeedMode = RdioScannerLivefeedMode.Playback;
@ -427,12 +439,17 @@ export class AppRdioScannerService implements OnDestroy {
}); });
} }
queue(call: RdioScannerCall): void { queue(call: RdioScannerCall, options?: { priority?: boolean }): void {
if (!call?.audio) { if (!call?.audio) {
return; return;
} }
if (options?.priority) {
this.callQueue.unshift(call);
} else {
this.callQueue.push(call); this.callQueue.push(call);
}
if (this.audioSource || this.call || this.livefeedPaused || this.skipDelay) { if (this.audioSource || this.call || this.livefeedPaused || this.skipDelay) {
this.event.emit({ this.event.emit({
@ -453,27 +470,26 @@ export class AppRdioScannerService implements OnDestroy {
} }
skip(options?: { delay?: boolean }): void { skip(options?: { delay?: boolean }): void {
this.stop(); const play = () => {
if (options?.delay) {
this.skipDelay = true;
timer(1000).subscribe(() => {
this.skipDelay = false;
if (this.livefeedMode === RdioScannerLivefeedMode.Playback) { if (this.livefeedMode === RdioScannerLivefeedMode.Playback) {
this.playbackNextCall(); this.playbackNextCall();
} else { } else {
this.play(); this.play();
} }
};
this.stop();
if (options?.delay) {
this.skipDelay = timer(1000).subscribe(() => {
this.skipDelay = undefined;
play();
}); });
} else if (this.livefeedMode === RdioScannerLivefeedMode.Playback) {
this.playbackNextCall();
} else { } else {
this.play(); play();
} }
} }
@ -493,25 +509,18 @@ export class AppRdioScannerService implements OnDestroy {
} }
if (typeof options?.emit !== 'boolean' || options.emit) { if (typeof options?.emit !== 'boolean' || options.emit) {
if (this.livefeedMode === RdioScannerLivefeedMode.Playback) { this.event.emit({ call: this.call });
this.event.emit({ call: undefined });
} else {
this.event.emit({ call: undefined, queue: this.callQueue.length });
}
} }
} }
stopPlaybackMode(): void { stopPlaybackMode(): void {
if (this.livefeedMode === RdioScannerLivefeedMode.Playback) {
this.livefeedMode = RdioScannerLivefeedMode.Offline; this.livefeedMode = RdioScannerLivefeedMode.Offline;
this.cleanQueue(); this.clearQueue();
this.stop({ emit: false }); this.event.emit({ livefeedMode: this.livefeedMode, queue: 0 });
this.event.emit({ call: this.call, livefeedMode: this.livefeedMode, queue: this.callQueue.length }); this.stop();
}
} }
toggleGroup(label: string): void { toggleGroup(label: string): void {
@ -609,10 +618,6 @@ export class AppRdioScannerService implements OnDestroy {
} }
private cleanQueue(): void { private cleanQueue(): void {
if (this.livefeedMode === RdioScannerLivefeedMode.Playback) {
this.callQueue.splice(0, this.callQueue.length);
} else {
this.callQueue = this.callQueue.filter((call: RdioScannerCall) => { this.callQueue = this.callQueue.filter((call: RdioScannerCall) => {
return this.livefeedMap && this.livefeedMap[call.system] && this.livefeedMap[call.system][call.talkgroup]; return this.livefeedMap && this.livefeedMap[call.system] && this.livefeedMap[call.system][call.talkgroup];
}); });
@ -623,6 +628,9 @@ export class AppRdioScannerService implements OnDestroy {
this.skip(); this.skip();
} }
} }
private clearQueue(): void {
this.callQueue.splice(0, this.callQueue.length);
} }
private closeWebsocket(): void { private closeWebsocket(): void {
@ -719,6 +727,11 @@ export class AppRdioScannerService implements OnDestroy {
if (message[2] === WebsocketCallFlag.Download) { if (message[2] === WebsocketCallFlag.Download) {
this.download(message[1]); this.download(message[1]);
} else if (message[2] === WebsocketCallFlag.Play && message[1]?.id === this.playbackPending) {
this.playbackPending = undefined;
this.queue(this.transformCall(message[1]), { priority: true });
} else { } else {
this.queue(this.transformCall(message[1])); this.queue(this.transformCall(message[1]));
} }
@ -777,7 +790,7 @@ export class AppRdioScannerService implements OnDestroy {
} }
private playbackNextCall(): void { private playbackNextCall(): void {
if (this.call || !this.playbackList || this.livefeedMode !== RdioScannerLivefeedMode.Playback) { if (this.call || this.livefeedMode !== RdioScannerLivefeedMode.Playback || !this.playbackList || this.playbackPending) {
return; return;
} }
@ -903,7 +916,7 @@ export class AppRdioScannerService implements OnDestroy {
private stopLivefeed(): void { private stopLivefeed(): void {
this.livefeedMode = RdioScannerLivefeedMode.Offline; this.livefeedMode = RdioScannerLivefeedMode.Offline;
this.callQueue.splice(0, this.callQueue.length); this.clearQueue();
this.event.emit({ livefeedMode: this.livefeedMode, queue: 0 }); this.event.emit({ livefeedMode: this.livefeedMode, queue: 0 });

View file

@ -424,11 +424,11 @@ export class AppRdioScannerSearchComponent implements OnDestroy {
} }
stop(): void { stop(): void {
if (this.livefeedOnline) { if (this.livefeedPlayback) {
this.appRdioScannerService.stop();
} else if (this.livefeedPlayback) {
this.appRdioScannerService.stopPlaybackMode(); this.appRdioScannerService.stopPlaybackMode();
} else {
this.appRdioScannerService.stop();
} }
} }

View file

@ -11,5 +11,5 @@
"start": "node run", "start": "node run",
"update": "node update" "update": "node update"
}, },
"version": "4.7.4" "version": "4.7.5"
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "rdio-scanner-server", "name": "rdio-scanner-server",
"version": "4.7.4", "version": "4.7.5",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@ -702,6 +702,16 @@
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==" "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ=="
}, },
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"block-stream": { "block-stream": {
"version": "0.0.9", "version": "0.0.9",
"resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
@ -1855,9 +1865,9 @@
"dev": true "dev": true
}, },
"eslint": { "eslint": {
"version": "7.9.0", "version": "7.10.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.9.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.10.0.tgz",
"integrity": "sha512-V6QyhX21+uXp4T+3nrNfI3hQNBDa/P8ga7LoQOenwrlEFXrEnUEE+ok1dMtaS3b6rmLXhT1TkTIsG75HMLbknA==", "integrity": "sha512-BDVffmqWl7JJXqCjAK6lWtcQThZB/aP1HXSH1JKwGwv0LQEdvpR7qzNrUT487RM39B5goWuboFad5ovMBmD8yA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",
@ -1868,7 +1878,7 @@
"debug": "^4.0.1", "debug": "^4.0.1",
"doctrine": "^3.0.0", "doctrine": "^3.0.0",
"enquirer": "^2.3.5", "enquirer": "^2.3.5",
"eslint-scope": "^5.1.0", "eslint-scope": "^5.1.1",
"eslint-utils": "^2.1.0", "eslint-utils": "^2.1.0",
"eslint-visitor-keys": "^1.3.0", "eslint-visitor-keys": "^1.3.0",
"espree": "^7.3.0", "espree": "^7.3.0",
@ -2287,6 +2297,13 @@
"flat-cache": "^2.0.1" "flat-cache": "^2.0.1"
} }
}, },
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"fill-range": { "fill-range": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
@ -3854,6 +3871,13 @@
} }
} }
}, },
"nan": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
"dev": true,
"optional": true
},
"nanomatch": { "nanomatch": {
"version": "1.2.13", "version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@ -6369,7 +6393,11 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true, "dev": true,
"optional": true "optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
}, },
"glob-parent": { "glob-parent": {
"version": "3.1.0", "version": "3.1.0",

View file

@ -20,7 +20,7 @@
"ws": "^7.3.1" "ws": "^7.3.1"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^7.9.0", "eslint": "^7.10.0",
"webpack": "^4.44.2", "webpack": "^4.44.2",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.3.12",
"webpack-node-externals": "^2.5.2" "webpack-node-externals": "^2.5.2"
@ -39,5 +39,5 @@
"build": "webpack", "build": "webpack",
"start": "nodemon" "start": "nodemon"
}, },
"version": "4.7.4" "version": "4.7.5"
} }