Skip to content

Commit

Permalink
Fixed: Canceling out of a recording file edit selection does not work.
Browse files Browse the repository at this point in the history
  • Loading branch information
klausj committed Feb 10, 2022
1 parent ad004f3 commit 69694c6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This project was generated with [Angular CLI](https://github.com/angular/angular

### Install NPM package
Speechrecorder module is available as NPM package.
Add `"speechrecorderng": "2.21.8"` to the `dependencies` array property in the `package.json` file of your application. Run `npm install` to install the package.
Add `"speechrecorderng": "2.21.9"` to the `dependencies` array property in the `package.json` file of your application. Run `npm install` to install the package.
### Module integration
Add SpeechRecorderNg module to imports property of your `AppModule` annotation. The module main component `SpeechRecorder` should be activated by an Angular route.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-speech-recorder-ng",
"version": "2.21.8",
"version": "2.21.9",
"author": {
"name": "Klaus Jänsch",
"email": "klausj@phonetik.uni-muenchen.de"
Expand Down
2 changes: 1 addition & 1 deletion projects/speechrecorderng/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "speechrecorderng",
"version": "2.21.8",
"version": "2.21.9",
"peerDependencies": {
"@angular/animations": "~13.2.1",
"@angular/cdk": "~13.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,18 @@ protected loadedRecfile() {
if(this.audioClip) {
let ab=this.audioClip.buffer;
let s = this.audioClip.selection
if (s && ab && this.recordingFile?.recordingFileId) {
let sr= ab.sampleRate;
let sf = s.startFrame;
let ef = s.endFrame;
this.recordingFileService.saveEditSelection(this.recordingFile.recordingFileId, sr, sf, ef).subscribe((value) => {},
if (ab && this.recordingFile?.recordingFileId) {

let sr= null;
let sf=null;
let ef=null;
if(s) {
sr= ab.sampleRate;
sf = s.startFrame;
ef = s.endFrame;
}
this.recordingFileService.saveEditSelection(this.recordingFile.recordingFileId, sr, sf, ef).subscribe((value) => {
},
() => {
this.dialog.open(MessageDialog, {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class RecordingFileService {
return wobs;
}

saveEditSelection(recordingFileId: string | number,editSampleRate:number,editStartFrame:number,editEndFrame:number): Observable<RecordingFile | null> {
saveEditSelection(recordingFileId: string | number,editSampleRate:number|null,editStartFrame:number|null,editEndFrame:number|null): Observable<RecordingFile | null> {
let recUrl = this.apiEndPoint + RecordingFileService.RECOFILE_API_CTX + '/' + recordingFileId;
if (this.config && this.config.apiType === ApiType.FILES) {
// for development and demo
Expand Down
2 changes: 1 addition & 1 deletion projects/speechrecorderng/src/lib/spr.module.version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION='2.21.8'
export const VERSION='2.21.9'

0 comments on commit 69694c6

Please sign in to comment.