speechrecorderng 2.23.7 → 2.23.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/recorder_component.mjs +3 -0
- package/esm2020/lib/speechrecorder/session/audiorecorder.mjs +121 -54
- package/esm2020/lib/speechrecorderng.component.mjs +5 -3
- package/esm2020/lib/speechrecorderng.module.mjs +6 -5
- package/esm2020/lib/spr.module.version.mjs +2 -2
- package/esm2020/public-api.mjs +4 -2
- package/fesm2015/speechrecorderng.mjs +131 -60
- package/fesm2015/speechrecorderng.mjs.map +1 -1
- package/fesm2020/speechrecorderng.mjs +131 -60
- package/fesm2020/speechrecorderng.mjs.map +1 -1
- package/lib/recorder_component.d.ts +6 -0
- package/lib/speechrecorder/session/audiorecorder.d.ts +39 -12
- package/lib/speechrecorderng.component.d.ts +2 -1
- package/lib/speechrecorderng.module.d.ts +1 -1
- package/lib/spr.module.version.d.ts +1 -1
- package/package.json +10 -10
- package/public-api.d.ts +4 -1
|
@@ -8807,6 +8807,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
8807
8807
|
args: ['window:keydown', ['$event']]
|
|
8808
8808
|
}] } });
|
|
8809
8809
|
|
|
8810
|
+
class RecorderComponent {
|
|
8811
|
+
}
|
|
8812
|
+
|
|
8810
8813
|
/**
|
|
8811
8814
|
* Created by klausj on 17.06.2017.
|
|
8812
8815
|
*/
|
|
@@ -8853,8 +8856,9 @@ var Mode;
|
|
|
8853
8856
|
Mode[Mode["SINGLE_SESSION"] = 0] = "SINGLE_SESSION";
|
|
8854
8857
|
Mode[Mode["DEMO"] = 1] = "DEMO";
|
|
8855
8858
|
})(Mode || (Mode = {}));
|
|
8856
|
-
class SpeechrecorderngComponent {
|
|
8859
|
+
class SpeechrecorderngComponent extends RecorderComponent {
|
|
8857
8860
|
constructor(route, router, changeDetectorRef, sessionsService, projectService, scriptService, recFilesService, uploader) {
|
|
8861
|
+
super();
|
|
8858
8862
|
this.route = route;
|
|
8859
8863
|
this.router = router;
|
|
8860
8864
|
this.changeDetectorRef = changeDetectorRef;
|
|
@@ -9235,7 +9239,7 @@ class SpeechrecorderngComponent {
|
|
|
9235
9239
|
}
|
|
9236
9240
|
}
|
|
9237
9241
|
SpeechrecorderngComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngComponent, deps: [{ token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i0.ChangeDetectorRef }, { token: SessionService }, { token: ProjectService }, { token: ScriptService }, { token: RecordingService }, { token: SpeechRecorderUploader }], target: i0.ɵɵFactoryTarget.Component });
|
|
9238
|
-
SpeechrecorderngComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SpeechrecorderngComponent, selector: "app-speechrecorder", providers: [SessionService], viewQueries: [{ propertyName: "sm", first: true, predicate: SessionManager, descendants: true, static: true }], ngImport: i0, template: `
|
|
9242
|
+
SpeechrecorderngComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: SpeechrecorderngComponent, selector: "app-speechrecorder", providers: [SessionService], viewQueries: [{ propertyName: "sm", first: true, predicate: SessionManager, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
9239
9243
|
<app-sprrecordingsession [projectName]="project?.name" [dataSaved]="dataSaved"></app-sprrecordingsession>
|
|
9240
9244
|
`, isInline: true, styles: [":host{flex:2;display:flex;flex-direction:column;min-height:0}\n"], components: [{ type: SessionManager, selector: "app-sprrecordingsession", inputs: ["projectName", "dataSaved"] }] });
|
|
9241
9245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngComponent, decorators: [{
|
|
@@ -10893,11 +10897,11 @@ class Item {
|
|
|
10893
10897
|
}
|
|
10894
10898
|
}
|
|
10895
10899
|
class AudioRecorder extends BasicRecorder {
|
|
10896
|
-
constructor(changeDetectorRef,
|
|
10900
|
+
constructor(changeDetectorRef, renderer, route, dialog, projectService, sessionService, recFileService, uploader, config) {
|
|
10897
10901
|
super(dialog, sessionService);
|
|
10898
10902
|
this.changeDetectorRef = changeDetectorRef;
|
|
10899
|
-
this.route = route;
|
|
10900
10903
|
this.renderer = renderer;
|
|
10904
|
+
this.route = route;
|
|
10901
10905
|
this.dialog = dialog;
|
|
10902
10906
|
this.projectService = projectService;
|
|
10903
10907
|
this.sessionService = sessionService;
|
|
@@ -10918,6 +10922,7 @@ class AudioRecorder extends BasicRecorder {
|
|
|
10918
10922
|
//selectedItemIdx: number;
|
|
10919
10923
|
this._displayRecFile = null;
|
|
10920
10924
|
this.displayRecFileVersion = 0;
|
|
10925
|
+
//super(injector);
|
|
10921
10926
|
this.status = 1 /* IDLE */;
|
|
10922
10927
|
this.audio = document.getElementById('audio');
|
|
10923
10928
|
if (this.config && this.config.enableUploadRecordings != null) {
|
|
@@ -10926,25 +10931,23 @@ class AudioRecorder extends BasicRecorder {
|
|
|
10926
10931
|
if (this.config && this.config.enableDownloadRecordings != null) {
|
|
10927
10932
|
this.enableDownloadRecordings = this.config.enableDownloadRecordings;
|
|
10928
10933
|
}
|
|
10929
|
-
this.init();
|
|
10934
|
+
//this.init();
|
|
10930
10935
|
}
|
|
10931
10936
|
ngAfterViewInit() {
|
|
10932
|
-
this.route.queryParams.subscribe((params) => {
|
|
10933
|
-
if (params['sessionId']) {
|
|
10934
|
-
this.fetchSession(params['sessionId']);
|
|
10935
|
-
}
|
|
10936
|
-
});
|
|
10937
10937
|
this.streamLevelMeasure.levelListener = this.liveLevelDisplay;
|
|
10938
10938
|
this.streamLevelMeasure.peakLevelListener = (peakLvlInDb) => {
|
|
10939
10939
|
this.peakLevelInDb = peakLvlInDb;
|
|
10940
10940
|
this.changeDetectorRef.detectChanges();
|
|
10941
10941
|
};
|
|
10942
10942
|
}
|
|
10943
|
+
ready() {
|
|
10944
|
+
return this.dataSaved && !this.isActive();
|
|
10945
|
+
}
|
|
10943
10946
|
ngOnDestroy() {
|
|
10944
10947
|
this.destroyed = true;
|
|
10945
10948
|
// TODO stop capture /playback
|
|
10946
10949
|
}
|
|
10947
|
-
|
|
10950
|
+
ngOnInit() {
|
|
10948
10951
|
this.transportActions.startAction.disabled = true;
|
|
10949
10952
|
this.transportActions.stopAction.disabled = true;
|
|
10950
10953
|
this.transportActions.nextAction.disabled = true;
|
|
@@ -10994,7 +10997,7 @@ class AudioRecorder extends BasicRecorder {
|
|
|
10994
10997
|
return;
|
|
10995
10998
|
}
|
|
10996
10999
|
else {
|
|
10997
|
-
this.controlAudioPlayer = new AudioPlayer(context, this);
|
|
11000
|
+
//this.controlAudioPlayer = new AudioPlayer(context, this);
|
|
10998
11001
|
this.ac = new AudioCapture(context);
|
|
10999
11002
|
if (this.ac) {
|
|
11000
11003
|
this.transportActions.startAction.onAction = () => this.startItem();
|
|
@@ -11071,43 +11074,6 @@ class AudioRecorder extends BasicRecorder {
|
|
|
11071
11074
|
isDefaultAudioTestSessionOverwriteingProjectRequirements() {
|
|
11072
11075
|
return ((this._session != null) && (this._session.type === 'TEST_DEF_A') && (this.audioDevices != null) && this.audioDevices.length > 0);
|
|
11073
11076
|
}
|
|
11074
|
-
fetchSession(sessionId) {
|
|
11075
|
-
//Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'statusMsg: Player initialized.'. Current value: 'statusMsg: Fetching session info...'.
|
|
11076
|
-
// params.subscribe seems not to be asynchronous
|
|
11077
|
-
// this.sm.statusAlertType='info';
|
|
11078
|
-
// this.sm.statusMsg = 'Fetching session info...';
|
|
11079
|
-
// this.sm.statusWaiting=true;
|
|
11080
|
-
let sessObs = this.sessionService.sessionObserver(sessionId);
|
|
11081
|
-
if (sessObs) {
|
|
11082
|
-
sessObs.subscribe(sess => {
|
|
11083
|
-
//this.setSession(sess);
|
|
11084
|
-
this.statusAlertType = 'info';
|
|
11085
|
-
this.statusMsg = 'Received session info.';
|
|
11086
|
-
this.statusWaiting = false;
|
|
11087
|
-
this.session = sess;
|
|
11088
|
-
if (sess.project) {
|
|
11089
|
-
//console.debug("Session associated project: "+sess.project)
|
|
11090
|
-
this.projectService.projectObservable(sess.project).subscribe(project => {
|
|
11091
|
-
this.project = project;
|
|
11092
|
-
this.fetchRecordings(sess);
|
|
11093
|
-
}, reason => {
|
|
11094
|
-
this.statusMsg = reason;
|
|
11095
|
-
this.statusAlertType = 'error';
|
|
11096
|
-
this.statusWaiting = false;
|
|
11097
|
-
console.error("Error fetching project config: " + reason);
|
|
11098
|
-
});
|
|
11099
|
-
}
|
|
11100
|
-
else {
|
|
11101
|
-
console.info("Session has no associated project. Using default configuration.");
|
|
11102
|
-
}
|
|
11103
|
-
}, (reason) => {
|
|
11104
|
-
this.statusMsg = reason;
|
|
11105
|
-
this.statusAlertType = 'error';
|
|
11106
|
-
this.statusWaiting = false;
|
|
11107
|
-
console.error("Error fetching session " + reason);
|
|
11108
|
-
});
|
|
11109
|
-
}
|
|
11110
|
-
}
|
|
11111
11077
|
fetchRecordings(sess) {
|
|
11112
11078
|
this.statusAlertType = 'info';
|
|
11113
11079
|
this.statusMsg = 'Fetching infos of recordings...';
|
|
@@ -11577,8 +11543,8 @@ class AudioRecorder extends BasicRecorder {
|
|
|
11577
11543
|
}
|
|
11578
11544
|
}
|
|
11579
11545
|
}
|
|
11580
|
-
AudioRecorder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorder, deps: [{ token: i0.ChangeDetectorRef }, { token:
|
|
11581
|
-
AudioRecorder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: AudioRecorder, selector: "app-audiorecorder", inputs: { projectName: "projectName", dataSaved: "dataSaved" }, host: { listeners: { "window:keypress": "onKeyPress($event)", "window:keydown": "onKeyDown($event)" } }, providers: [SessionService], viewQueries: [{ propertyName: "recorderCombiPane", first: true, predicate: RecorderCombiPane, descendants: true, static: true }, { propertyName: "liveLevelDisplay", first: true, predicate: LevelBar, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
11546
|
+
AudioRecorder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorder, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i1$1.ActivatedRoute }, { token: i1$2.MatDialog }, { token: ProjectService }, { token: SessionService }, { token: RecordingService }, { token: SpeechRecorderUploader }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
11547
|
+
AudioRecorder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: AudioRecorder, selector: "app-audiorecorder", inputs: { _project: "_project", projectName: "projectName", dataSaved: "dataSaved" }, host: { listeners: { "window:keypress": "onKeyPress($event)", "window:keydown": "onKeyDown($event)" } }, providers: [SessionService], viewQueries: [{ propertyName: "recorderCombiPane", first: true, predicate: RecorderCombiPane, descendants: true, static: true }, { propertyName: "liveLevelDisplay", first: true, predicate: LevelBar, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
11582
11548
|
<app-warningbar [show]="isTestSession()" warningText="Test recording only!"></app-warningbar>
|
|
11583
11549
|
<app-warningbar [show]="isDefaultAudioTestSession()"
|
|
11584
11550
|
warningText="This test uses default audio device! Regular sessions may require a particular audio device (microphone)!"></app-warningbar>
|
|
@@ -11634,7 +11600,7 @@ AudioRecorder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
11634
11600
|
[ready]="dataSaved && !isActive()"></app-readystateindicator>
|
|
11635
11601
|
</div>
|
|
11636
11602
|
</div>
|
|
11637
|
-
`, isInline: true, styles: [":host{flex:2;background:lightgrey;display:flex;flex-direction:column;margin:0;padding:0;min-height:0px;overflow:hidden}\n", ".ricontrols{padding:4px;box-sizing:border-box;height:100%}\n", ".dark{background:darkgray}\n", ".controlpanel{align-content:center;align-items:center;margin:0;padding:20px;min-height:-webkit-min-content;min-height:min-content}\n", ".startstop{width:100%;text-align:center;align-content:center;align-items:center}\n", ".bigbutton{min-width:70px;min-height:50px;font-size:50px;border-radius:20px}\n"], components: [{ type: WarningBar, selector: "app-warningbar", inputs: ["warningText", "show"] }, { type: RecorderCombiPane, selector: "app-recordercombipane", inputs: ["selectDisabled", "selectedRecordingFile", "audioSignalCollapsed", "displayAudioClip", "playStartAction", "playSelectionAction", "autoPlayOnSelectToggleAction", "playStopAction"], outputs: ["selectedRecordingFileChanged"] }, { type: LevelBar, selector: "audio-levelbar", inputs: ["streamingMode", "displayLevelInfos"] }, { type: RecordingItemControls, selector: "spr-recordingitemcontrols", inputs: ["audioSignalCollapsed", "enableDownload", "peakDbLvl", "agc", "audioLoaded", "playStartAction", "playStopAction", "displayLevelInfos"], outputs: ["onShowRecordingDetails", "onDownloadRecording"] }, { type: UploadStatus, selector: "app-uploadstatus", inputs: ["value", "awaitNewUpload", "status"] }, { type: ReadyStateIndicator, selector: "app-readystateindicator", inputs: ["ready"] }, { type: StatusDisplay, selector: "app-sprstatusdisplay", inputs: ["statusAlertType", "statusMsg", "statusWaiting"] }, { type: i3$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$1.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }] });
|
|
11603
|
+
`, isInline: true, styles: [":host{flex:2;background:lightgrey;display:flex;flex-direction:column;margin:0;padding:0;height:100%;min-height:0px;overflow:hidden}\n", ".ricontrols{padding:4px;box-sizing:border-box;height:100%}\n", ".dark{background:darkgray}\n", ".controlpanel{align-content:center;align-items:center;margin:0;padding:20px;min-height:-webkit-min-content;min-height:min-content}\n", ".startstop{width:100%;text-align:center;align-content:center;align-items:center}\n", ".bigbutton{min-width:70px;min-height:50px;font-size:50px;border-radius:20px}\n"], components: [{ type: WarningBar, selector: "app-warningbar", inputs: ["warningText", "show"] }, { type: RecorderCombiPane, selector: "app-recordercombipane", inputs: ["selectDisabled", "selectedRecordingFile", "audioSignalCollapsed", "displayAudioClip", "playStartAction", "playSelectionAction", "autoPlayOnSelectToggleAction", "playStopAction"], outputs: ["selectedRecordingFileChanged"] }, { type: LevelBar, selector: "audio-levelbar", inputs: ["streamingMode", "displayLevelInfos"] }, { type: RecordingItemControls, selector: "spr-recordingitemcontrols", inputs: ["audioSignalCollapsed", "enableDownload", "peakDbLvl", "agc", "audioLoaded", "playStartAction", "playStopAction", "displayLevelInfos"], outputs: ["onShowRecordingDetails", "onDownloadRecording"] }, { type: UploadStatus, selector: "app-uploadstatus", inputs: ["value", "awaitNewUpload", "status"] }, { type: ReadyStateIndicator, selector: "app-readystateindicator", inputs: ["ready"] }, { type: StatusDisplay, selector: "app-sprstatusdisplay", inputs: ["statusAlertType", "statusMsg", "statusWaiting"] }, { type: i3$2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i8.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3$1.DefaultStyleDirective, selector: " [ngStyle], [ngStyle.xs], [ngStyle.sm], [ngStyle.md], [ngStyle.lg], [ngStyle.xl], [ngStyle.lt-sm], [ngStyle.lt-md], [ngStyle.lt-lg], [ngStyle.lt-xl], [ngStyle.gt-xs], [ngStyle.gt-sm], [ngStyle.gt-md], [ngStyle.gt-lg]", inputs: ["ngStyle", "ngStyle.xs", "ngStyle.sm", "ngStyle.md", "ngStyle.lg", "ngStyle.xl", "ngStyle.lt-sm", "ngStyle.lt-md", "ngStyle.lt-lg", "ngStyle.lt-xl", "ngStyle.gt-xs", "ngStyle.gt-sm", "ngStyle.gt-md", "ngStyle.gt-lg"] }, { type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i8.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }] });
|
|
11638
11604
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorder, decorators: [{
|
|
11639
11605
|
type: Component,
|
|
11640
11606
|
args: [{
|
|
@@ -11704,8 +11670,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
11704
11670
|
flex-direction: column;
|
|
11705
11671
|
margin: 0;
|
|
11706
11672
|
padding: 0;
|
|
11673
|
+
height: 100%;
|
|
11707
11674
|
min-height: 0px;
|
|
11708
|
-
|
|
11709
11675
|
/* Prevents horizontal scroll bar on swipe right */
|
|
11710
11676
|
overflow: hidden;
|
|
11711
11677
|
}`, `.ricontrols {
|
|
@@ -11733,10 +11699,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
11733
11699
|
}`
|
|
11734
11700
|
]
|
|
11735
11701
|
}]
|
|
11736
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type:
|
|
11702
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i1$1.ActivatedRoute }, { type: i1$2.MatDialog }, { type: ProjectService }, { type: SessionService }, { type: RecordingService }, { type: SpeechRecorderUploader }, { type: SpeechRecorderConfig, decorators: [{
|
|
11737
11703
|
type: Inject,
|
|
11738
11704
|
args: [SPEECHRECORDER_CONFIG]
|
|
11739
|
-
}] }]; }, propDecorators: {
|
|
11705
|
+
}] }]; }, propDecorators: { _project: [{
|
|
11706
|
+
type: Input
|
|
11707
|
+
}], projectName: [{
|
|
11740
11708
|
type: Input
|
|
11741
11709
|
}], recorderCombiPane: [{
|
|
11742
11710
|
type: ViewChild,
|
|
@@ -11752,11 +11720,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
11752
11720
|
}], onKeyDown: [{
|
|
11753
11721
|
type: HostListener,
|
|
11754
11722
|
args: ['window:keydown', ['$event']]
|
|
11723
|
+
}] } });
|
|
11724
|
+
class AudioRecorderComponent extends RecorderComponent {
|
|
11725
|
+
constructor(injector, route, router, changeDetectorRef, sessionService, projectService, recFilesService) {
|
|
11726
|
+
super();
|
|
11727
|
+
this.injector = injector;
|
|
11728
|
+
this.route = route;
|
|
11729
|
+
this.router = router;
|
|
11730
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
11731
|
+
this.sessionService = sessionService;
|
|
11732
|
+
this.projectService = projectService;
|
|
11733
|
+
this.recFilesService = recFilesService;
|
|
11734
|
+
this.dataSaved = true;
|
|
11735
|
+
}
|
|
11736
|
+
ngOnInit() {
|
|
11737
|
+
//super.ngOnInit();
|
|
11738
|
+
let audioContext = AudioContextProvider.audioContextInstance();
|
|
11739
|
+
if (audioContext) {
|
|
11740
|
+
this.controlAudioPlayer = new AudioPlayer(audioContext, this.ar);
|
|
11741
|
+
}
|
|
11742
|
+
this.ar.controlAudioPlayer = this.controlAudioPlayer;
|
|
11743
|
+
}
|
|
11744
|
+
ngAfterViewInit() {
|
|
11745
|
+
this.route.queryParams.subscribe((params) => {
|
|
11746
|
+
if (params['sessionId']) {
|
|
11747
|
+
this.fetchSession(params['sessionId']);
|
|
11748
|
+
}
|
|
11749
|
+
});
|
|
11750
|
+
this.route.params.subscribe((params) => {
|
|
11751
|
+
let routeParamsId = params['id'];
|
|
11752
|
+
if (routeParamsId) {
|
|
11753
|
+
this.fetchSession(routeParamsId);
|
|
11754
|
+
}
|
|
11755
|
+
});
|
|
11756
|
+
}
|
|
11757
|
+
ngOnDestroy() {
|
|
11758
|
+
//super.ngOnDestroy();
|
|
11759
|
+
}
|
|
11760
|
+
fetchSession(sessionId) {
|
|
11761
|
+
//Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'statusMsg: Player initialized.'. Current value: 'statusMsg: Fetching session info...'.
|
|
11762
|
+
// params.subscribe seems not to be asynchronous
|
|
11763
|
+
// this.sm.statusAlertType='info';
|
|
11764
|
+
// this.sm.statusMsg = 'Fetching session info...';
|
|
11765
|
+
// this.sm.statusWaiting=true;
|
|
11766
|
+
let sessObs = this.sessionService.sessionObserver(sessionId);
|
|
11767
|
+
if (sessObs) {
|
|
11768
|
+
sessObs.subscribe(sess => {
|
|
11769
|
+
this.ar.statusAlertType = 'info';
|
|
11770
|
+
this.ar.statusMsg = 'Received session info.';
|
|
11771
|
+
this.ar.statusWaiting = false;
|
|
11772
|
+
this.session = sess;
|
|
11773
|
+
this.ar.session = sess;
|
|
11774
|
+
if (sess.project) {
|
|
11775
|
+
//console.debug("Session associated project: "+sess.project)
|
|
11776
|
+
this.projectService.projectObservable(sess.project).subscribe(project => {
|
|
11777
|
+
this.ar.project = project;
|
|
11778
|
+
this.ar.fetchRecordings(sess);
|
|
11779
|
+
}, reason => {
|
|
11780
|
+
this.ar.statusMsg = reason;
|
|
11781
|
+
this.ar.statusAlertType = 'error';
|
|
11782
|
+
this.ar.statusWaiting = false;
|
|
11783
|
+
console.error("Error fetching project config: " + reason);
|
|
11784
|
+
});
|
|
11785
|
+
}
|
|
11786
|
+
else {
|
|
11787
|
+
console.info("Session has no associated project. Using default configuration.");
|
|
11788
|
+
}
|
|
11789
|
+
}, (reason) => {
|
|
11790
|
+
this.ar.statusMsg = reason;
|
|
11791
|
+
this.ar.statusAlertType = 'error';
|
|
11792
|
+
this.ar.statusWaiting = false;
|
|
11793
|
+
console.error("Error fetching session " + reason);
|
|
11794
|
+
});
|
|
11795
|
+
}
|
|
11796
|
+
}
|
|
11797
|
+
ready() {
|
|
11798
|
+
return this.dataSaved && !this.ar.isActive();
|
|
11799
|
+
}
|
|
11800
|
+
}
|
|
11801
|
+
AudioRecorderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorderComponent, deps: [{ token: i0.Injector }, { token: i1$1.ActivatedRoute }, { token: i1$1.Router }, { token: i0.ChangeDetectorRef }, { token: SessionService }, { token: ProjectService }, { token: RecordingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11802
|
+
AudioRecorderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: AudioRecorderComponent, selector: "app-audiorecorder-comp", providers: [SessionService], viewQueries: [{ propertyName: "ar", first: true, predicate: AudioRecorder, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
11803
|
+
<app-audiorecorder [projectName]="_project?.name" [dataSaved]="dataSaved"></app-audiorecorder>
|
|
11804
|
+
`, isInline: true, styles: [":host{flex:2;display:flex;height:100%;flex-direction:column;min-height:0}\n"], components: [{ type: AudioRecorder, selector: "app-audiorecorder", inputs: ["_project", "projectName", "dataSaved"] }] });
|
|
11805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorderComponent, decorators: [{
|
|
11806
|
+
type: Component,
|
|
11807
|
+
args: [{
|
|
11808
|
+
selector: 'app-audiorecorder-comp',
|
|
11809
|
+
providers: [SessionService],
|
|
11810
|
+
template: `
|
|
11811
|
+
<app-audiorecorder [projectName]="_project?.name" [dataSaved]="dataSaved"></app-audiorecorder>
|
|
11812
|
+
`,
|
|
11813
|
+
styles: [`:host{
|
|
11814
|
+
flex: 2;
|
|
11815
|
+
display: flex;
|
|
11816
|
+
height: 100%;
|
|
11817
|
+
flex-direction: column;
|
|
11818
|
+
min-height:0;
|
|
11819
|
+
|
|
11820
|
+
}`]
|
|
11821
|
+
}]
|
|
11822
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: i0.ChangeDetectorRef }, { type: SessionService }, { type: ProjectService }, { type: RecordingService }]; }, propDecorators: { ar: [{
|
|
11823
|
+
type: ViewChild,
|
|
11824
|
+
args: [AudioRecorder, { static: true }]
|
|
11755
11825
|
}] } });
|
|
11756
11826
|
|
|
11757
11827
|
const SPR_ROUTES = [
|
|
11758
11828
|
{ path: 'spr/session/:id', component: SpeechrecorderngComponent },
|
|
11759
|
-
{ path: 'recorder', component:
|
|
11829
|
+
{ path: 'recorder/session/:id', component: AudioRecorderComponent },
|
|
11830
|
+
{ path: 'recorder', component: AudioRecorderComponent },
|
|
11760
11831
|
{ path: 'spr/db/project/:project/session/:sessionId/recordingfile/_view/:recordingFileId', component: RecordingFileViewComponent },
|
|
11761
11832
|
{ path: 'spr/db/project/:project/session/:sessionId/recordingfile/_edit/:recordingFileId', component: RecordingFileUI },
|
|
11762
11833
|
{ path: 'spr/db/project/:project/session/:sessionId/recordingfile/_view', component: RecordingFileViewComponent },
|
|
@@ -11784,20 +11855,20 @@ class SpeechrecorderngModule {
|
|
|
11784
11855
|
}
|
|
11785
11856
|
SpeechrecorderngModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11786
11857
|
SpeechrecorderngModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngModule, declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
|
|
11787
|
-
ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder], imports: [i1$1.RouterModule, FlexLayoutModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule], exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder] });
|
|
11858
|
+
ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, AudioRecorderComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder], imports: [i1$1.RouterModule, FlexLayoutModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule], exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder] });
|
|
11788
11859
|
SpeechrecorderngModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngModule, providers: [SessionService, ProjectService, ScriptService, RecordingService, RecordingFileService, SpeechRecorderUploader], imports: [[RouterModule.forChild(SPR_ROUTES), FlexLayoutModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule]] });
|
|
11789
11860
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngModule, decorators: [{
|
|
11790
11861
|
type: NgModule,
|
|
11791
11862
|
args: [{
|
|
11792
11863
|
declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
|
|
11793
|
-
ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder],
|
|
11864
|
+
ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, AudioRecorderComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder],
|
|
11794
11865
|
exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder],
|
|
11795
11866
|
imports: [RouterModule.forChild(SPR_ROUTES), FlexLayoutModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule],
|
|
11796
11867
|
providers: [SessionService, ProjectService, ScriptService, RecordingService, RecordingFileService, SpeechRecorderUploader]
|
|
11797
11868
|
}]
|
|
11798
11869
|
}] });
|
|
11799
11870
|
|
|
11800
|
-
const VERSION = '2.23.
|
|
11871
|
+
const VERSION = '2.23.8';
|
|
11801
11872
|
|
|
11802
11873
|
/*
|
|
11803
11874
|
* Public API Surface of speechrecorderng
|
|
@@ -11807,5 +11878,5 @@ const VERSION = '2.23.7';
|
|
|
11807
11878
|
* Generated bundle index. Do not edit.
|
|
11808
11879
|
*/
|
|
11809
11880
|
|
|
11810
|
-
export { Action, ApiType, AudioClip, AudioClipUIContainer, AudioContextProvider, AudioDisplay, AudioDisplayControl, AudioDisplayPlayer, AudioDisplayScrollPane, AudioPlayer, AudioPlayerEvent, AudioRecorder, EventType, LevelBar, MessageDialog, ProjectService, RecordingFileService, RecordingFileUI, RecordingFileViewComponent, RecordingService, SPEECHRECORDER_CONFIG, ScriptService, ScrollPaneHorizontal, Selection, SessionService, SpeechRecorderConfig, SpeechrecorderngComponent, SpeechrecorderngModule, SprRecordingFile, UUID, VERSION };
|
|
11881
|
+
export { Action, ApiType, AudioClip, AudioClipUIContainer, AudioContextProvider, AudioDisplay, AudioDisplayControl, AudioDisplayPlayer, AudioDisplayScrollPane, AudioPlayer, AudioPlayerEvent, AudioRecorder, AudioRecorderComponent, EventType, LevelBar, MessageDialog, ProjectService, RecorderComponent, RecordingFileService, RecordingFileUI, RecordingFileViewComponent, RecordingService, SPEECHRECORDER_CONFIG, ScriptService, ScrollPaneHorizontal, Selection, SessionService, SpeechRecorderConfig, SpeechrecorderngComponent, SpeechrecorderngModule, SprRecordingFile, UUID, VERSION, WavWriter };
|
|
11811
11882
|
//# sourceMappingURL=speechrecorderng.mjs.map
|