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
|
@@ -8826,6 +8826,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
8826
8826
|
args: ['window:keydown', ['$event']]
|
|
8827
8827
|
}] } });
|
|
8828
8828
|
|
|
8829
|
+
class RecorderComponent {
|
|
8830
|
+
}
|
|
8831
|
+
|
|
8829
8832
|
/**
|
|
8830
8833
|
* Created by klausj on 17.06.2017.
|
|
8831
8834
|
*/
|
|
@@ -8874,8 +8877,9 @@ var Mode;
|
|
|
8874
8877
|
Mode[Mode["SINGLE_SESSION"] = 0] = "SINGLE_SESSION";
|
|
8875
8878
|
Mode[Mode["DEMO"] = 1] = "DEMO";
|
|
8876
8879
|
})(Mode || (Mode = {}));
|
|
8877
|
-
class SpeechrecorderngComponent {
|
|
8880
|
+
class SpeechrecorderngComponent extends RecorderComponent {
|
|
8878
8881
|
constructor(route, router, changeDetectorRef, sessionsService, projectService, scriptService, recFilesService, uploader) {
|
|
8882
|
+
super();
|
|
8879
8883
|
this.route = route;
|
|
8880
8884
|
this.router = router;
|
|
8881
8885
|
this.changeDetectorRef = changeDetectorRef;
|
|
@@ -9256,7 +9260,7 @@ class SpeechrecorderngComponent {
|
|
|
9256
9260
|
}
|
|
9257
9261
|
}
|
|
9258
9262
|
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 });
|
|
9259
|
-
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: `
|
|
9263
|
+
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: `
|
|
9260
9264
|
<app-sprrecordingsession [projectName]="project?.name" [dataSaved]="dataSaved"></app-sprrecordingsession>
|
|
9261
9265
|
`, isInline: true, styles: [":host{flex:2;display:flex;flex-direction:column;min-height:0}\n"], components: [{ type: SessionManager, selector: "app-sprrecordingsession", inputs: ["projectName", "dataSaved"] }] });
|
|
9262
9266
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngComponent, decorators: [{
|
|
@@ -10921,11 +10925,11 @@ class Item {
|
|
|
10921
10925
|
}
|
|
10922
10926
|
}
|
|
10923
10927
|
class AudioRecorder extends BasicRecorder {
|
|
10924
|
-
constructor(changeDetectorRef,
|
|
10928
|
+
constructor(changeDetectorRef, renderer, route, dialog, projectService, sessionService, recFileService, uploader, config) {
|
|
10925
10929
|
super(dialog, sessionService);
|
|
10926
10930
|
this.changeDetectorRef = changeDetectorRef;
|
|
10927
|
-
this.route = route;
|
|
10928
10931
|
this.renderer = renderer;
|
|
10932
|
+
this.route = route;
|
|
10929
10933
|
this.dialog = dialog;
|
|
10930
10934
|
this.projectService = projectService;
|
|
10931
10935
|
this.sessionService = sessionService;
|
|
@@ -10946,6 +10950,7 @@ class AudioRecorder extends BasicRecorder {
|
|
|
10946
10950
|
//selectedItemIdx: number;
|
|
10947
10951
|
this._displayRecFile = null;
|
|
10948
10952
|
this.displayRecFileVersion = 0;
|
|
10953
|
+
//super(injector);
|
|
10949
10954
|
this.status = 1 /* IDLE */;
|
|
10950
10955
|
this.audio = document.getElementById('audio');
|
|
10951
10956
|
if (this.config && this.config.enableUploadRecordings != null) {
|
|
@@ -10954,25 +10959,23 @@ class AudioRecorder extends BasicRecorder {
|
|
|
10954
10959
|
if (this.config && this.config.enableDownloadRecordings != null) {
|
|
10955
10960
|
this.enableDownloadRecordings = this.config.enableDownloadRecordings;
|
|
10956
10961
|
}
|
|
10957
|
-
this.init();
|
|
10962
|
+
//this.init();
|
|
10958
10963
|
}
|
|
10959
10964
|
ngAfterViewInit() {
|
|
10960
|
-
this.route.queryParams.subscribe((params) => {
|
|
10961
|
-
if (params['sessionId']) {
|
|
10962
|
-
this.fetchSession(params['sessionId']);
|
|
10963
|
-
}
|
|
10964
|
-
});
|
|
10965
10965
|
this.streamLevelMeasure.levelListener = this.liveLevelDisplay;
|
|
10966
10966
|
this.streamLevelMeasure.peakLevelListener = (peakLvlInDb) => {
|
|
10967
10967
|
this.peakLevelInDb = peakLvlInDb;
|
|
10968
10968
|
this.changeDetectorRef.detectChanges();
|
|
10969
10969
|
};
|
|
10970
10970
|
}
|
|
10971
|
+
ready() {
|
|
10972
|
+
return this.dataSaved && !this.isActive();
|
|
10973
|
+
}
|
|
10971
10974
|
ngOnDestroy() {
|
|
10972
10975
|
this.destroyed = true;
|
|
10973
10976
|
// TODO stop capture /playback
|
|
10974
10977
|
}
|
|
10975
|
-
|
|
10978
|
+
ngOnInit() {
|
|
10976
10979
|
this.transportActions.startAction.disabled = true;
|
|
10977
10980
|
this.transportActions.stopAction.disabled = true;
|
|
10978
10981
|
this.transportActions.nextAction.disabled = true;
|
|
@@ -11022,7 +11025,7 @@ class AudioRecorder extends BasicRecorder {
|
|
|
11022
11025
|
return;
|
|
11023
11026
|
}
|
|
11024
11027
|
else {
|
|
11025
|
-
this.controlAudioPlayer = new AudioPlayer(context, this);
|
|
11028
|
+
//this.controlAudioPlayer = new AudioPlayer(context, this);
|
|
11026
11029
|
this.ac = new AudioCapture(context);
|
|
11027
11030
|
if (this.ac) {
|
|
11028
11031
|
this.transportActions.startAction.onAction = () => this.startItem();
|
|
@@ -11099,43 +11102,6 @@ class AudioRecorder extends BasicRecorder {
|
|
|
11099
11102
|
isDefaultAudioTestSessionOverwriteingProjectRequirements() {
|
|
11100
11103
|
return ((this._session != null) && (this._session.type === 'TEST_DEF_A') && (this.audioDevices != null) && this.audioDevices.length > 0);
|
|
11101
11104
|
}
|
|
11102
|
-
fetchSession(sessionId) {
|
|
11103
|
-
//Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'statusMsg: Player initialized.'. Current value: 'statusMsg: Fetching session info...'.
|
|
11104
|
-
// params.subscribe seems not to be asynchronous
|
|
11105
|
-
// this.sm.statusAlertType='info';
|
|
11106
|
-
// this.sm.statusMsg = 'Fetching session info...';
|
|
11107
|
-
// this.sm.statusWaiting=true;
|
|
11108
|
-
let sessObs = this.sessionService.sessionObserver(sessionId);
|
|
11109
|
-
if (sessObs) {
|
|
11110
|
-
sessObs.subscribe(sess => {
|
|
11111
|
-
//this.setSession(sess);
|
|
11112
|
-
this.statusAlertType = 'info';
|
|
11113
|
-
this.statusMsg = 'Received session info.';
|
|
11114
|
-
this.statusWaiting = false;
|
|
11115
|
-
this.session = sess;
|
|
11116
|
-
if (sess.project) {
|
|
11117
|
-
//console.debug("Session associated project: "+sess.project)
|
|
11118
|
-
this.projectService.projectObservable(sess.project).subscribe(project => {
|
|
11119
|
-
this.project = project;
|
|
11120
|
-
this.fetchRecordings(sess);
|
|
11121
|
-
}, reason => {
|
|
11122
|
-
this.statusMsg = reason;
|
|
11123
|
-
this.statusAlertType = 'error';
|
|
11124
|
-
this.statusWaiting = false;
|
|
11125
|
-
console.error("Error fetching project config: " + reason);
|
|
11126
|
-
});
|
|
11127
|
-
}
|
|
11128
|
-
else {
|
|
11129
|
-
console.info("Session has no associated project. Using default configuration.");
|
|
11130
|
-
}
|
|
11131
|
-
}, (reason) => {
|
|
11132
|
-
this.statusMsg = reason;
|
|
11133
|
-
this.statusAlertType = 'error';
|
|
11134
|
-
this.statusWaiting = false;
|
|
11135
|
-
console.error("Error fetching session " + reason);
|
|
11136
|
-
});
|
|
11137
|
-
}
|
|
11138
|
-
}
|
|
11139
11105
|
fetchRecordings(sess) {
|
|
11140
11106
|
this.statusAlertType = 'info';
|
|
11141
11107
|
this.statusMsg = 'Fetching infos of recordings...';
|
|
@@ -11605,8 +11571,8 @@ class AudioRecorder extends BasicRecorder {
|
|
|
11605
11571
|
}
|
|
11606
11572
|
}
|
|
11607
11573
|
}
|
|
11608
|
-
AudioRecorder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorder, deps: [{ token: i0.ChangeDetectorRef }, { token:
|
|
11609
|
-
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: `
|
|
11574
|
+
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 });
|
|
11575
|
+
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: `
|
|
11610
11576
|
<app-warningbar [show]="isTestSession()" warningText="Test recording only!"></app-warningbar>
|
|
11611
11577
|
<app-warningbar [show]="isDefaultAudioTestSession()"
|
|
11612
11578
|
warningText="This test uses default audio device! Regular sessions may require a particular audio device (microphone)!"></app-warningbar>
|
|
@@ -11662,7 +11628,7 @@ AudioRecorder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
11662
11628
|
[ready]="dataSaved && !isActive()"></app-readystateindicator>
|
|
11663
11629
|
</div>
|
|
11664
11630
|
</div>
|
|
11665
|
-
`, 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"] }] });
|
|
11631
|
+
`, 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"] }] });
|
|
11666
11632
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorder, decorators: [{
|
|
11667
11633
|
type: Component,
|
|
11668
11634
|
args: [{
|
|
@@ -11732,8 +11698,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
11732
11698
|
flex-direction: column;
|
|
11733
11699
|
margin: 0;
|
|
11734
11700
|
padding: 0;
|
|
11701
|
+
height: 100%;
|
|
11735
11702
|
min-height: 0px;
|
|
11736
|
-
|
|
11737
11703
|
/* Prevents horizontal scroll bar on swipe right */
|
|
11738
11704
|
overflow: hidden;
|
|
11739
11705
|
}`, `.ricontrols {
|
|
@@ -11762,11 +11728,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
11762
11728
|
]
|
|
11763
11729
|
}]
|
|
11764
11730
|
}], ctorParameters: function () {
|
|
11765
|
-
return [{ type: i0.ChangeDetectorRef }, { type:
|
|
11731
|
+
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: [{
|
|
11766
11732
|
type: Inject,
|
|
11767
11733
|
args: [SPEECHRECORDER_CONFIG]
|
|
11768
11734
|
}] }];
|
|
11769
|
-
}, propDecorators: {
|
|
11735
|
+
}, propDecorators: { _project: [{
|
|
11736
|
+
type: Input
|
|
11737
|
+
}], projectName: [{
|
|
11770
11738
|
type: Input
|
|
11771
11739
|
}], recorderCombiPane: [{
|
|
11772
11740
|
type: ViewChild,
|
|
@@ -11782,11 +11750,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
11782
11750
|
}], onKeyDown: [{
|
|
11783
11751
|
type: HostListener,
|
|
11784
11752
|
args: ['window:keydown', ['$event']]
|
|
11753
|
+
}] } });
|
|
11754
|
+
class AudioRecorderComponent extends RecorderComponent {
|
|
11755
|
+
constructor(injector, route, router, changeDetectorRef, sessionService, projectService, recFilesService) {
|
|
11756
|
+
super();
|
|
11757
|
+
this.injector = injector;
|
|
11758
|
+
this.route = route;
|
|
11759
|
+
this.router = router;
|
|
11760
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
11761
|
+
this.sessionService = sessionService;
|
|
11762
|
+
this.projectService = projectService;
|
|
11763
|
+
this.recFilesService = recFilesService;
|
|
11764
|
+
this.dataSaved = true;
|
|
11765
|
+
}
|
|
11766
|
+
ngOnInit() {
|
|
11767
|
+
//super.ngOnInit();
|
|
11768
|
+
let audioContext = AudioContextProvider.audioContextInstance();
|
|
11769
|
+
if (audioContext) {
|
|
11770
|
+
this.controlAudioPlayer = new AudioPlayer(audioContext, this.ar);
|
|
11771
|
+
}
|
|
11772
|
+
this.ar.controlAudioPlayer = this.controlAudioPlayer;
|
|
11773
|
+
}
|
|
11774
|
+
ngAfterViewInit() {
|
|
11775
|
+
this.route.queryParams.subscribe((params) => {
|
|
11776
|
+
if (params['sessionId']) {
|
|
11777
|
+
this.fetchSession(params['sessionId']);
|
|
11778
|
+
}
|
|
11779
|
+
});
|
|
11780
|
+
this.route.params.subscribe((params) => {
|
|
11781
|
+
let routeParamsId = params['id'];
|
|
11782
|
+
if (routeParamsId) {
|
|
11783
|
+
this.fetchSession(routeParamsId);
|
|
11784
|
+
}
|
|
11785
|
+
});
|
|
11786
|
+
}
|
|
11787
|
+
ngOnDestroy() {
|
|
11788
|
+
//super.ngOnDestroy();
|
|
11789
|
+
}
|
|
11790
|
+
fetchSession(sessionId) {
|
|
11791
|
+
//Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'statusMsg: Player initialized.'. Current value: 'statusMsg: Fetching session info...'.
|
|
11792
|
+
// params.subscribe seems not to be asynchronous
|
|
11793
|
+
// this.sm.statusAlertType='info';
|
|
11794
|
+
// this.sm.statusMsg = 'Fetching session info...';
|
|
11795
|
+
// this.sm.statusWaiting=true;
|
|
11796
|
+
let sessObs = this.sessionService.sessionObserver(sessionId);
|
|
11797
|
+
if (sessObs) {
|
|
11798
|
+
sessObs.subscribe(sess => {
|
|
11799
|
+
this.ar.statusAlertType = 'info';
|
|
11800
|
+
this.ar.statusMsg = 'Received session info.';
|
|
11801
|
+
this.ar.statusWaiting = false;
|
|
11802
|
+
this.session = sess;
|
|
11803
|
+
this.ar.session = sess;
|
|
11804
|
+
if (sess.project) {
|
|
11805
|
+
//console.debug("Session associated project: "+sess.project)
|
|
11806
|
+
this.projectService.projectObservable(sess.project).subscribe(project => {
|
|
11807
|
+
this.ar.project = project;
|
|
11808
|
+
this.ar.fetchRecordings(sess);
|
|
11809
|
+
}, reason => {
|
|
11810
|
+
this.ar.statusMsg = reason;
|
|
11811
|
+
this.ar.statusAlertType = 'error';
|
|
11812
|
+
this.ar.statusWaiting = false;
|
|
11813
|
+
console.error("Error fetching project config: " + reason);
|
|
11814
|
+
});
|
|
11815
|
+
}
|
|
11816
|
+
else {
|
|
11817
|
+
console.info("Session has no associated project. Using default configuration.");
|
|
11818
|
+
}
|
|
11819
|
+
}, (reason) => {
|
|
11820
|
+
this.ar.statusMsg = reason;
|
|
11821
|
+
this.ar.statusAlertType = 'error';
|
|
11822
|
+
this.ar.statusWaiting = false;
|
|
11823
|
+
console.error("Error fetching session " + reason);
|
|
11824
|
+
});
|
|
11825
|
+
}
|
|
11826
|
+
}
|
|
11827
|
+
ready() {
|
|
11828
|
+
return this.dataSaved && !this.ar.isActive();
|
|
11829
|
+
}
|
|
11830
|
+
}
|
|
11831
|
+
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 });
|
|
11832
|
+
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: `
|
|
11833
|
+
<app-audiorecorder [projectName]="_project?.name" [dataSaved]="dataSaved"></app-audiorecorder>
|
|
11834
|
+
`, 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"] }] });
|
|
11835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AudioRecorderComponent, decorators: [{
|
|
11836
|
+
type: Component,
|
|
11837
|
+
args: [{
|
|
11838
|
+
selector: 'app-audiorecorder-comp',
|
|
11839
|
+
providers: [SessionService],
|
|
11840
|
+
template: `
|
|
11841
|
+
<app-audiorecorder [projectName]="_project?.name" [dataSaved]="dataSaved"></app-audiorecorder>
|
|
11842
|
+
`,
|
|
11843
|
+
styles: [`:host{
|
|
11844
|
+
flex: 2;
|
|
11845
|
+
display: flex;
|
|
11846
|
+
height: 100%;
|
|
11847
|
+
flex-direction: column;
|
|
11848
|
+
min-height:0;
|
|
11849
|
+
|
|
11850
|
+
}`]
|
|
11851
|
+
}]
|
|
11852
|
+
}], 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: [{
|
|
11853
|
+
type: ViewChild,
|
|
11854
|
+
args: [AudioRecorder, { static: true }]
|
|
11785
11855
|
}] } });
|
|
11786
11856
|
|
|
11787
11857
|
const SPR_ROUTES = [
|
|
11788
11858
|
{ path: 'spr/session/:id', component: SpeechrecorderngComponent },
|
|
11789
|
-
{ path: 'recorder', component:
|
|
11859
|
+
{ path: 'recorder/session/:id', component: AudioRecorderComponent },
|
|
11860
|
+
{ path: 'recorder', component: AudioRecorderComponent },
|
|
11790
11861
|
{ path: 'spr/db/project/:project/session/:sessionId/recordingfile/_view/:recordingFileId', component: RecordingFileViewComponent },
|
|
11791
11862
|
{ path: 'spr/db/project/:project/session/:sessionId/recordingfile/_edit/:recordingFileId', component: RecordingFileUI },
|
|
11792
11863
|
{ path: 'spr/db/project/:project/session/:sessionId/recordingfile/_view', component: RecordingFileViewComponent },
|
|
@@ -11814,20 +11885,20 @@ class SpeechrecorderngModule {
|
|
|
11814
11885
|
}
|
|
11815
11886
|
SpeechrecorderngModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11816
11887
|
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,
|
|
11817
|
-
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] });
|
|
11888
|
+
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] });
|
|
11818
11889
|
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]] });
|
|
11819
11890
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: SpeechrecorderngModule, decorators: [{
|
|
11820
11891
|
type: NgModule,
|
|
11821
11892
|
args: [{
|
|
11822
11893
|
declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
|
|
11823
|
-
ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder],
|
|
11894
|
+
ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, AudioRecorderComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder],
|
|
11824
11895
|
exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder],
|
|
11825
11896
|
imports: [RouterModule.forChild(SPR_ROUTES), FlexLayoutModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule],
|
|
11826
11897
|
providers: [SessionService, ProjectService, ScriptService, RecordingService, RecordingFileService, SpeechRecorderUploader]
|
|
11827
11898
|
}]
|
|
11828
11899
|
}] });
|
|
11829
11900
|
|
|
11830
|
-
const VERSION = '2.23.
|
|
11901
|
+
const VERSION = '2.23.8';
|
|
11831
11902
|
|
|
11832
11903
|
/*
|
|
11833
11904
|
* Public API Surface of speechrecorderng
|
|
@@ -11837,5 +11908,5 @@ const VERSION = '2.23.7';
|
|
|
11837
11908
|
* Generated bundle index. Do not edit.
|
|
11838
11909
|
*/
|
|
11839
11910
|
|
|
11840
|
-
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 };
|
|
11911
|
+
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 };
|
|
11841
11912
|
//# sourceMappingURL=speechrecorderng.mjs.map
|