speechrecorderng 2.25.2 → 2.25.3

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.
@@ -2061,6 +2061,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2061
2061
  class AudioClip {
2062
2062
  constructor(buffer) {
2063
2063
  this._selection = null;
2064
+ this._levelInfos = null;
2064
2065
  this.selectionObservers = new Array();
2065
2066
  this._buffer = buffer;
2066
2067
  }
@@ -2082,6 +2083,12 @@ class AudioClip {
2082
2083
  selObs(this);
2083
2084
  }
2084
2085
  }
2086
+ get levelInfos() {
2087
+ return this._levelInfos;
2088
+ }
2089
+ set levelInfos(value) {
2090
+ this._levelInfos = value;
2091
+ }
2085
2092
  addSelectionObserver(selectionObserver, init = false) {
2086
2093
  let obsAlreadyInList = this.selectionObservers.find((obs) => (obs === selectionObserver));
2087
2094
  if (!obsAlreadyInList) {
@@ -5825,13 +5832,14 @@ class LevelBar {
5825
5832
  }
5826
5833
  }
5827
5834
  set displayLevelInfos(levelInfos) {
5828
- this._staticLevelInfos = levelInfos;
5829
5835
  if (levelInfos) {
5836
+ this._staticLevelInfos = levelInfos;
5830
5837
  this.dbValues = levelInfos.bufferLevelInfos.map((li) => {
5831
5838
  return li.powerLevelsDB();
5832
5839
  });
5833
5840
  }
5834
5841
  else {
5842
+ this._staticLevelInfos = null;
5835
5843
  this.dbValues = new Array();
5836
5844
  }
5837
5845
  this.layoutStatic();
@@ -7528,7 +7536,6 @@ let BasicRecorder = class BasicRecorder {
7528
7536
  this.uploadStatus = 'ok';
7529
7537
  this.audioSignalCollapsed = true;
7530
7538
  this.peakLevelInDb = MIN_DB_LEVEL;
7531
- this.displayLevelInfos = null;
7532
7539
  this.displayAudioClip = null;
7533
7540
  this.audioFetchSubscription = null;
7534
7541
  this.destroyed = false;
@@ -8643,17 +8650,14 @@ class SessionManager extends BasicRecorder {
8643
8650
  showRecording() {
8644
8651
  this.controlAudioPlayer.stop();
8645
8652
  if (this.displayAudioClip) {
8646
- this.levelMeasure.calcBufferLevelInfos(this.displayAudioClip.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
8647
- this.displayLevelInfos = levelInfos;
8653
+ let dap = this.displayAudioClip;
8654
+ this.levelMeasure.calcBufferLevelInfos(dap.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
8655
+ dap.levelInfos = levelInfos;
8648
8656
  this.changeDetectorRef.detectChanges();
8649
8657
  });
8650
8658
  this.playStartAction.disabled = false;
8651
8659
  }
8652
8660
  else {
8653
- // TODO
8654
- // Setting to null does not trigger a change if it was null before (happens after nextitem() in AUTOPROGRESS mode)
8655
- // The level bar display does not clear, it shows the last captured stream
8656
- this.displayLevelInfos = null;
8657
8661
  this.playStartAction.disabled = true;
8658
8662
  // Collapse audio signal display if open
8659
8663
  if (!this.audioSignalCollapsed) {
@@ -8682,6 +8686,8 @@ class SessionManager extends BasicRecorder {
8682
8686
  this.applyPrompt();
8683
8687
  }
8684
8688
  if (isNonrecording) {
8689
+ this.displayRecFile = null;
8690
+ this.displayRecFileVersion = 0;
8685
8691
  this.startStopSignalState = 4 /* OFF */;
8686
8692
  }
8687
8693
  else {
@@ -8703,13 +8709,13 @@ class SessionManager extends BasicRecorder {
8703
8709
  this.displayRecFileVersion = 0;
8704
8710
  }
8705
8711
  }
8706
- if (!temporary) {
8707
- this.showRecording();
8708
- }
8709
8712
  if (!this.readonly) {
8710
8713
  this.startStopSignalState = 0 /* IDLE */;
8711
8714
  }
8712
8715
  }
8716
+ if (!temporary) {
8717
+ this.showRecording();
8718
+ }
8713
8719
  this.updateStartActionDisableState();
8714
8720
  this.updateNavigationActions();
8715
8721
  }
@@ -9107,7 +9113,7 @@ SessionManager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
9107
9113
 
9108
9114
 
9109
9115
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}" [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
9110
- <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
9116
+ <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
9111
9117
  <div fxLayout="row">
9112
9118
  <spr-recordingitemcontrols fxFlex="10 0 1"
9113
9119
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -9161,7 +9167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
9161
9167
 
9162
9168
 
9163
9169
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}" [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
9164
- <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
9170
+ <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
9165
9171
  <div fxLayout="row">
9166
9172
  <spr-recordingitemcontrols fxFlex="10 0 1"
9167
9173
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -11729,17 +11735,14 @@ class AudioRecorder extends BasicRecorder {
11729
11735
  showRecording() {
11730
11736
  this.controlAudioPlayer.stop();
11731
11737
  if (this.displayAudioClip) {
11732
- this.levelMeasure.calcBufferLevelInfos(this.displayAudioClip.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
11733
- this.displayLevelInfos = levelInfos;
11738
+ let dap = this.displayAudioClip;
11739
+ this.levelMeasure.calcBufferLevelInfos(dap.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
11740
+ dap.levelInfos = levelInfos;
11734
11741
  this.changeDetectorRef.detectChanges();
11735
11742
  });
11736
11743
  this.playStartAction.disabled = false;
11737
11744
  }
11738
11745
  else {
11739
- // TODO
11740
- // Setting to null does not trigger a change if it was null before (happens after nextitem() in AUTOPROGRESS mode)
11741
- // The level bar display does not clear, it shows the last captured stream
11742
- this.displayLevelInfos = null;
11743
11746
  this.playStartAction.disabled = true;
11744
11747
  // Collapse audio signal display if open
11745
11748
  if (!this.audioSignalCollapsed) {
@@ -11955,7 +11958,7 @@ AudioRecorder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
11955
11958
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}"
11956
11959
  [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
11957
11960
  <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()"
11958
- [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
11961
+ [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
11959
11962
  <div fxLayout="row">
11960
11963
  <spr-recordingitemcontrols fxFlex="10 0 1"
11961
11964
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -12021,7 +12024,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
12021
12024
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}"
12022
12025
  [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
12023
12026
  <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()"
12024
- [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
12027
+ [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
12025
12028
  <div fxLayout="row">
12026
12029
  <spr-recordingitemcontrols fxFlex="10 0 1"
12027
12030
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -12315,7 +12318,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
12315
12318
  }]
12316
12319
  }] });
12317
12320
 
12318
- const VERSION = '2.25.2';
12321
+ const VERSION = '2.25.3';
12319
12322
 
12320
12323
  /*
12321
12324
  * Public API Surface of speechrecorderng