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.
@@ -2065,6 +2065,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2065
2065
  class AudioClip {
2066
2066
  constructor(buffer) {
2067
2067
  this._selection = null;
2068
+ this._levelInfos = null;
2068
2069
  this.selectionObservers = new Array();
2069
2070
  this._buffer = buffer;
2070
2071
  }
@@ -2086,6 +2087,12 @@ class AudioClip {
2086
2087
  selObs(this);
2087
2088
  }
2088
2089
  }
2090
+ get levelInfos() {
2091
+ return this._levelInfos;
2092
+ }
2093
+ set levelInfos(value) {
2094
+ this._levelInfos = value;
2095
+ }
2089
2096
  addSelectionObserver(selectionObserver, init = false) {
2090
2097
  let obsAlreadyInList = this.selectionObservers.find((obs) => (obs === selectionObserver));
2091
2098
  if (!obsAlreadyInList) {
@@ -5833,13 +5840,14 @@ class LevelBar {
5833
5840
  }
5834
5841
  }
5835
5842
  set displayLevelInfos(levelInfos) {
5836
- this._staticLevelInfos = levelInfos;
5837
5843
  if (levelInfos) {
5844
+ this._staticLevelInfos = levelInfos;
5838
5845
  this.dbValues = levelInfos.bufferLevelInfos.map((li) => {
5839
5846
  return li.powerLevelsDB();
5840
5847
  });
5841
5848
  }
5842
5849
  else {
5850
+ this._staticLevelInfos = null;
5843
5851
  this.dbValues = new Array();
5844
5852
  }
5845
5853
  this.layoutStatic();
@@ -7542,7 +7550,6 @@ let BasicRecorder = class BasicRecorder {
7542
7550
  this.uploadStatus = 'ok';
7543
7551
  this.audioSignalCollapsed = true;
7544
7552
  this.peakLevelInDb = MIN_DB_LEVEL;
7545
- this.displayLevelInfos = null;
7546
7553
  this.displayAudioClip = null;
7547
7554
  this.audioFetchSubscription = null;
7548
7555
  this.destroyed = false;
@@ -8664,17 +8671,14 @@ class SessionManager extends BasicRecorder {
8664
8671
  showRecording() {
8665
8672
  this.controlAudioPlayer.stop();
8666
8673
  if (this.displayAudioClip) {
8667
- this.levelMeasure.calcBufferLevelInfos(this.displayAudioClip.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
8668
- this.displayLevelInfos = levelInfos;
8674
+ let dap = this.displayAudioClip;
8675
+ this.levelMeasure.calcBufferLevelInfos(dap.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
8676
+ dap.levelInfos = levelInfos;
8669
8677
  this.changeDetectorRef.detectChanges();
8670
8678
  });
8671
8679
  this.playStartAction.disabled = false;
8672
8680
  }
8673
8681
  else {
8674
- // TODO
8675
- // Setting to null does not trigger a change if it was null before (happens after nextitem() in AUTOPROGRESS mode)
8676
- // The level bar display does not clear, it shows the last captured stream
8677
- this.displayLevelInfos = null;
8678
8682
  this.playStartAction.disabled = true;
8679
8683
  // Collapse audio signal display if open
8680
8684
  if (!this.audioSignalCollapsed) {
@@ -8703,6 +8707,8 @@ class SessionManager extends BasicRecorder {
8703
8707
  this.applyPrompt();
8704
8708
  }
8705
8709
  if (isNonrecording) {
8710
+ this.displayRecFile = null;
8711
+ this.displayRecFileVersion = 0;
8706
8712
  this.startStopSignalState = 4 /* OFF */;
8707
8713
  }
8708
8714
  else {
@@ -8724,13 +8730,13 @@ class SessionManager extends BasicRecorder {
8724
8730
  this.displayRecFileVersion = 0;
8725
8731
  }
8726
8732
  }
8727
- if (!temporary) {
8728
- this.showRecording();
8729
- }
8730
8733
  if (!this.readonly) {
8731
8734
  this.startStopSignalState = 0 /* IDLE */;
8732
8735
  }
8733
8736
  }
8737
+ if (!temporary) {
8738
+ this.showRecording();
8739
+ }
8734
8740
  this.updateStartActionDisableState();
8735
8741
  this.updateNavigationActions();
8736
8742
  }
@@ -9129,7 +9135,7 @@ SessionManager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
9129
9135
 
9130
9136
 
9131
9137
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}" [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
9132
- <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
9138
+ <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
9133
9139
  <div fxLayout="row">
9134
9140
  <spr-recordingitemcontrols fxFlex="10 0 1"
9135
9141
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -9183,7 +9189,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
9183
9189
 
9184
9190
 
9185
9191
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}" [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
9186
- <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
9192
+ <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()" [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
9187
9193
  <div fxLayout="row">
9188
9194
  <spr-recordingitemcontrols fxFlex="10 0 1"
9189
9195
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -11762,17 +11768,14 @@ class AudioRecorder extends BasicRecorder {
11762
11768
  showRecording() {
11763
11769
  this.controlAudioPlayer.stop();
11764
11770
  if (this.displayAudioClip) {
11765
- this.levelMeasure.calcBufferLevelInfos(this.displayAudioClip.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
11766
- this.displayLevelInfos = levelInfos;
11771
+ let dap = this.displayAudioClip;
11772
+ this.levelMeasure.calcBufferLevelInfos(dap.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
11773
+ dap.levelInfos = levelInfos;
11767
11774
  this.changeDetectorRef.detectChanges();
11768
11775
  });
11769
11776
  this.playStartAction.disabled = false;
11770
11777
  }
11771
11778
  else {
11772
- // TODO
11773
- // Setting to null does not trigger a change if it was null before (happens after nextitem() in AUTOPROGRESS mode)
11774
- // The level bar display does not clear, it shows the last captured stream
11775
- this.displayLevelInfos = null;
11776
11779
  this.playStartAction.disabled = true;
11777
11780
  // Collapse audio signal display if open
11778
11781
  if (!this.audioSignalCollapsed) {
@@ -11989,7 +11992,7 @@ AudioRecorder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
11989
11992
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}"
11990
11993
  [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
11991
11994
  <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()"
11992
- [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
11995
+ [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
11993
11996
  <div fxLayout="row">
11994
11997
  <spr-recordingitemcontrols fxFlex="10 0 1"
11995
11998
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -12055,7 +12058,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
12055
12058
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}"
12056
12059
  [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
12057
12060
  <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()"
12058
- [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
12061
+ [displayLevelInfos]="displayAudioClip?.levelInfos"></audio-levelbar>
12059
12062
  <div fxLayout="row">
12060
12063
  <spr-recordingitemcontrols fxFlex="10 0 1"
12061
12064
  [audioLoaded]="displayAudioClip?.buffer!==null"
@@ -12351,7 +12354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
12351
12354
  }]
12352
12355
  }] });
12353
12356
 
12354
- const VERSION = '2.25.2';
12357
+ const VERSION = '2.25.3';
12355
12358
 
12356
12359
  /*
12357
12360
  * Public API Surface of speechrecorderng