speechrecorderng 2.21.4 → 2.22.0

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.
Files changed (111) hide show
  1. package/{esm2015/lib/action/action.js → esm2020/lib/action/action.mjs} +0 -0
  2. package/{esm2015/lib/audio/audio_display.js → esm2020/lib/audio/audio_display.mjs} +5 -5
  3. package/esm2020/lib/audio/audio_player.mjs +276 -0
  4. package/esm2020/lib/audio/capture/capture.mjs +547 -0
  5. package/{esm2015/lib/audio/context.js → esm2020/lib/audio/context.mjs} +0 -0
  6. package/esm2020/lib/audio/dsp/level_measure.mjs +351 -0
  7. package/{esm2015/lib/audio/format.js → esm2020/lib/audio/format.mjs} +0 -0
  8. package/{esm2015/lib/audio/impl/wavformat.js → esm2020/lib/audio/impl/wavformat.mjs} +0 -0
  9. package/{esm2015/lib/audio/impl/wavwriter.js → esm2020/lib/audio/impl/wavwriter.mjs} +0 -0
  10. package/{esm2015/lib/audio/io/stream.js → esm2020/lib/audio/io/stream.mjs} +0 -0
  11. package/{esm2015/lib/audio/persistor.js → esm2020/lib/audio/persistor.mjs} +0 -0
  12. package/{esm2015/lib/audio/playback/player.js → esm2020/lib/audio/playback/player.mjs} +0 -0
  13. package/esm2020/lib/audio/ui/audio_canvas_layer_comp.mjs +376 -0
  14. package/{esm2015/lib/audio/ui/audio_display_control.js → esm2020/lib/audio/ui/audio_display_control.mjs} +5 -5
  15. package/{esm2015/lib/audio/ui/audio_display_scroll_pane.js → esm2020/lib/audio/ui/audio_display_scroll_pane.mjs} +5 -5
  16. package/{esm2015/lib/audio/ui/audiosignal.js → esm2020/lib/audio/ui/audiosignal.mjs} +5 -5
  17. package/{esm2015/lib/audio/ui/common.js → esm2020/lib/audio/ui/common.mjs} +0 -0
  18. package/esm2020/lib/audio/ui/container.mjs +431 -0
  19. package/{esm2015/lib/audio/ui/livelevel.js → esm2020/lib/audio/ui/livelevel.mjs} +5 -5
  20. package/{esm2015/lib/audio/ui/scroll_pane_horizontal.js → esm2020/lib/audio/ui/scroll_pane_horizontal.mjs} +4 -4
  21. package/{esm2015/lib/audio/ui/sonagram.js → esm2020/lib/audio/ui/sonagram.mjs} +5 -5
  22. package/{esm2015/lib/dsp/utils.js → esm2020/lib/dsp/utils.mjs} +0 -0
  23. package/{esm2015/lib/io/BinaryWriter.js → esm2020/lib/io/BinaryWriter.mjs} +0 -0
  24. package/{esm2015/lib/io/stream.js → esm2020/lib/io/stream.mjs} +0 -0
  25. package/{esm2015/lib/math/2d/geometry.js → esm2020/lib/math/2d/geometry.mjs} +0 -0
  26. package/{esm2015/lib/math/complex.js → esm2020/lib/math/complex.mjs} +0 -0
  27. package/{esm2015/lib/math/dft.js → esm2020/lib/math/dft.mjs} +0 -0
  28. package/{esm2015/lib/math/utils.js → esm2020/lib/math/utils.mjs} +0 -0
  29. package/esm2020/lib/media/utils.mjs +14 -0
  30. package/esm2020/lib/net/uploader.mjs +246 -0
  31. package/{esm2015/lib/speechrecorder/project/project.js → esm2020/lib/speechrecorder/project/project.mjs} +0 -0
  32. package/{esm2015/lib/speechrecorder/project/project.service.js → esm2020/lib/speechrecorder/project/project.service.mjs} +4 -4
  33. package/esm2020/lib/speechrecorder/recording.mjs +54 -0
  34. package/esm2020/lib/speechrecorder/recordings/recordings.service.mjs +246 -0
  35. package/{esm2015/lib/speechrecorder/script/script.js → esm2020/lib/speechrecorder/script/script.mjs} +2 -2
  36. package/{esm2015/lib/speechrecorder/script/script.service.js → esm2020/lib/speechrecorder/script/script.service.mjs} +4 -4
  37. package/esm2020/lib/speechrecorder/session/audiorecorder.mjs +1144 -0
  38. package/esm2020/lib/speechrecorder/session/controlpanel.mjs +449 -0
  39. package/{esm2015/lib/speechrecorder/session/item.js → esm2020/lib/speechrecorder/session/item.mjs} +1 -1
  40. package/{esm2015/lib/speechrecorder/session/progress.js → esm2020/lib/speechrecorder/session/progress.mjs} +5 -5
  41. package/{esm2015/lib/speechrecorder/session/prompting.js → esm2020/lib/speechrecorder/session/prompting.mjs} +21 -21
  42. package/esm2020/lib/speechrecorder/session/recorder_combi_pane.mjs +75 -0
  43. package/esm2020/lib/speechrecorder/session/recording_list.mjs +109 -0
  44. package/esm2020/lib/speechrecorder/session/recordingfile/recording-file-meta.component.mjs +126 -0
  45. package/{esm2015/lib/speechrecorder/session/recordingfile/recording-file-navi.component.js → esm2020/lib/speechrecorder/session/recordingfile/recording-file-navi.component.mjs} +5 -5
  46. package/esm2020/lib/speechrecorder/session/recordingfile/recording-file-u-i.component.mjs +168 -0
  47. package/esm2020/lib/speechrecorder/session/recordingfile/recording-file-view.component.mjs +415 -0
  48. package/{esm2015/lib/speechrecorder/session/recordingfile/recording-file.js → esm2020/lib/speechrecorder/session/recordingfile/recording-file.mjs} +1 -1
  49. package/esm2020/lib/speechrecorder/session/recordingfile/recordingfile-service.mjs +251 -0
  50. package/{esm2015/lib/speechrecorder/session/session.js → esm2020/lib/speechrecorder/session/session.mjs} +0 -0
  51. package/{esm2015/lib/speechrecorder/session/session.service.js → esm2020/lib/speechrecorder/session/session.service.mjs} +4 -4
  52. package/{esm2015/lib/speechrecorder/session/session_finished_dialog.js → esm2020/lib/speechrecorder/session/session_finished_dialog.mjs} +4 -4
  53. package/esm2020/lib/speechrecorder/session/sessionmanager.mjs +1274 -0
  54. package/{esm2015/lib/speechrecorder/session/warning_bar.js → esm2020/lib/speechrecorder/session/warning_bar.mjs} +5 -5
  55. package/{esm2015/lib/speechrecorder/spruploader.js → esm2020/lib/speechrecorder/spruploader.mjs} +4 -4
  56. package/{esm2015/lib/speechrecorder/startstopsignal/startstopsignal.js → esm2020/lib/speechrecorder/startstopsignal/startstopsignal.mjs} +0 -0
  57. package/{esm2015/lib/speechrecorder/startstopsignal/ui/simpletrafficlight.js → esm2020/lib/speechrecorder/startstopsignal/ui/simpletrafficlight.mjs} +5 -5
  58. package/esm2020/lib/speechrecorderng.component.mjs +427 -0
  59. package/{esm2015/lib/speechrecorderng.module.js → esm2020/lib/speechrecorderng.module.mjs} +12 -11
  60. package/{esm2015/lib/spr.config.js → esm2020/lib/spr.config.mjs} +4 -4
  61. package/{esm2015/lib/spr.module.version.js → esm2020/lib/spr.module.version.mjs} +2 -2
  62. package/{esm2015/lib/ui/canvas_layer_comp.js → esm2020/lib/ui/canvas_layer_comp.mjs} +4 -4
  63. package/{esm2015/lib/ui/message_dialog.js → esm2020/lib/ui/message_dialog.mjs} +4 -4
  64. package/{esm2015/lib/ui/recordingitem_display.js → esm2020/lib/ui/recordingitem_display.mjs} +9 -9
  65. package/{esm2015/lib/utils/css_utils.js → esm2020/lib/utils/css_utils.mjs} +0 -0
  66. package/{esm2015/lib/utils/scrollIntoViewToBottom.js → esm2020/lib/utils/scrollIntoViewToBottom.mjs} +4 -4
  67. package/{esm2015/lib/utils/ua-parser.js → esm2020/lib/utils/ua-parser.mjs} +0 -0
  68. package/{esm2015/lib/utils/utils.js → esm2020/lib/utils/utils.mjs} +0 -0
  69. package/esm2020/public-api.mjs +31 -0
  70. package/{esm2015/speechrecorderng.js → esm2020/speechrecorderng.mjs} +0 -0
  71. package/fesm2015/speechrecorderng.mjs +11991 -0
  72. package/fesm2015/speechrecorderng.mjs.map +1 -0
  73. package/{fesm2015/speechrecorderng.js → fesm2020/speechrecorderng.mjs} +1863 -285
  74. package/fesm2020/speechrecorderng.mjs.map +1 -0
  75. package/lib/media/utils.d.ts +3 -0
  76. package/lib/net/uploader.d.ts +4 -2
  77. package/lib/speechrecorder/recording.d.ts +14 -3
  78. package/lib/speechrecorder/recordings/recordings.service.d.ts +12 -5
  79. package/lib/speechrecorder/session/audiorecorder.d.ts +150 -0
  80. package/lib/speechrecorder/session/controlpanel.d.ts +2 -1
  81. package/lib/speechrecorder/session/item.d.ts +2 -2
  82. package/lib/speechrecorder/session/recorder_combi_pane.d.ts +26 -0
  83. package/lib/speechrecorder/session/recording_list.d.ts +19 -0
  84. package/lib/speechrecorder/session/recordingfile/recording-file-meta.component.d.ts +6 -2
  85. package/lib/speechrecorder/session/recordingfile/recording-file-view.component.d.ts +5 -4
  86. package/lib/speechrecorder/session/recordingfile/recording-file.d.ts +2 -2
  87. package/lib/speechrecorder/session/recordingfile/recordingfile-service.d.ts +5 -3
  88. package/lib/speechrecorder/session/sessionmanager.d.ts +5 -5
  89. package/lib/speechrecorderng.module.d.ts +31 -28
  90. package/lib/spr.module.version.d.ts +1 -1
  91. package/package.json +33 -20
  92. package/public-api.d.ts +2 -1
  93. package/bundles/speechrecorderng.umd.js +0 -10146
  94. package/bundles/speechrecorderng.umd.js.map +0 -1
  95. package/esm2015/lib/audio/audio_player.js +0 -274
  96. package/esm2015/lib/audio/capture/capture.js +0 -544
  97. package/esm2015/lib/audio/dsp/level_measure.js +0 -356
  98. package/esm2015/lib/audio/ui/audio_canvas_layer_comp.js +0 -364
  99. package/esm2015/lib/audio/ui/container.js +0 -412
  100. package/esm2015/lib/net/uploader.js +0 -220
  101. package/esm2015/lib/speechrecorder/recording.js +0 -38
  102. package/esm2015/lib/speechrecorder/recordings/recordings.service.js +0 -173
  103. package/esm2015/lib/speechrecorder/session/controlpanel.js +0 -446
  104. package/esm2015/lib/speechrecorder/session/recordingfile/recording-file-meta.component.js +0 -83
  105. package/esm2015/lib/speechrecorder/session/recordingfile/recording-file-u-i.component.js +0 -163
  106. package/esm2015/lib/speechrecorder/session/recordingfile/recording-file-view.component.js +0 -386
  107. package/esm2015/lib/speechrecorder/session/recordingfile/recordingfile-service.js +0 -191
  108. package/esm2015/lib/speechrecorder/session/sessionmanager.js +0 -1271
  109. package/esm2015/lib/speechrecorderng.component.js +0 -423
  110. package/esm2015/public-api.js +0 -30
  111. package/fesm2015/speechrecorderng.js.map +0 -1
@@ -31,7 +31,8 @@ import { MatDividerModule } from '@angular/material/divider';
31
31
  import { MatGridListModule } from '@angular/material/grid-list';
32
32
  import * as i6 from '@angular/material/snack-bar';
33
33
  import { MatSnackBarModule } from '@angular/material/snack-bar';
34
- import { MatTableModule } from '@angular/material/table';
34
+ import * as i2$2 from '@angular/material/table';
35
+ import { MatTableDataSource, MatTableModule } from '@angular/material/table';
35
36
  import { MatSelectModule } from '@angular/material/select';
36
37
  import { MatInputModule } from '@angular/material/input';
37
38
 
@@ -847,6 +848,9 @@ class AudioCapture {
847
848
  let aTrack = aTracks[i];
848
849
  console.info("Track audio info: id: " + aTrack.id + " kind: " + aTrack.kind + " label: \"" + aTrack.label + "\"");
849
850
  let mtrSts = aTrack.getSettings();
851
+ // Typescript lib.dom.ts MediaTrackSettings.channelCount is missing
852
+ // https://github.com/mdn/browser-compat-data/blob/5493d8f937e05b2ddbd41b99f5bdfad4a1f2ed85/api/MediaTrackSettings.json
853
+ //@ts-ignore
850
854
  console.info("Track audio settings: Ch cnt: " + mtrSts.channelCount + ", AGC: " + mtrSts.autoGainControl + ", Echo cancell.: " + mtrSts.echoCancellation);
851
855
  if (mtrSts.autoGainControl) {
852
856
  this.agcStatus = mtrSts.autoGainControl;
@@ -1400,7 +1404,7 @@ class MediaitemUtil {
1400
1404
  let srcUrl = new URL(src);
1401
1405
  srcPn = srcUrl.pathname;
1402
1406
  }
1403
- catch (_a) {
1407
+ catch {
1404
1408
  srcPn = src;
1405
1409
  }
1406
1410
  // Get filename without extension
@@ -1434,16 +1438,16 @@ class PromptitemUtil {
1434
1438
  }
1435
1439
  }
1436
1440
 
1437
- class RecordingFileDescriptor {
1441
+ class RecordingFileDescriptorImpl {
1438
1442
  constructor() { }
1439
1443
  }
1440
- class RecordingFile extends RecordingFileDescriptor {
1441
- constructor(sessionId, itemcode, version, audioBuffer) {
1442
- super();
1444
+ class RecordingFile {
1445
+ constructor(uuid, sessionId, audioBuffer) {
1443
1446
  this.recordingFileId = null;
1444
1447
  this.uuid = null;
1445
1448
  this.date = null;
1446
1449
  this._dateAsDateObj = null;
1450
+ this.startedDate = null;
1447
1451
  this.audioBuffer = null;
1448
1452
  this.session = null;
1449
1453
  this.frames = null;
@@ -1451,10 +1455,26 @@ class RecordingFile extends RecordingFileDescriptor {
1451
1455
  this.editStartFrame = null;
1452
1456
  this.editEndFrame = null;
1453
1457
  this.session = sessionId;
1458
+ this.audioBuffer = audioBuffer;
1459
+ this.uuid = uuid;
1460
+ }
1461
+ filenameString() {
1462
+ let fns = '';
1463
+ if (this.session) {
1464
+ fns += this.session;
1465
+ fns += '_';
1466
+ }
1467
+ fns += this.uuid;
1468
+ return fns;
1469
+ }
1470
+ }
1471
+ class SprRecordingFile extends RecordingFile {
1472
+ constructor(sessionId, itemcode, version, audioBuffer) {
1473
+ super(UUID.generate(), sessionId, audioBuffer);
1474
+ this.session = sessionId;
1454
1475
  this.itemCode = itemcode;
1455
1476
  this.version = version;
1456
1477
  this.audioBuffer = audioBuffer;
1457
- this.uuid = UUID.generate();
1458
1478
  }
1459
1479
  filenameString() {
1460
1480
  let fns = '';
@@ -1521,7 +1541,14 @@ class UploaderStatusChangeEvent {
1521
1541
  class Upload {
1522
1542
  constructor(blob, url) {
1523
1543
  this.toString = () => {
1524
- return `Upload: Status: ${this.status}, URL: ${this._url}, Size: ${this._data.size}`;
1544
+ let s = `Upload: Status: ${this.status}, URL: ${this._url}`;
1545
+ if (this._data instanceof Blob) {
1546
+ s = s + `, Size: ${this._data.size}`;
1547
+ }
1548
+ else if (this._data instanceof FormData) {
1549
+ // TODO (iterate through parts ??)
1550
+ }
1551
+ return s;
1525
1552
  };
1526
1553
  this._data = blob;
1527
1554
  this._url = url;
@@ -1549,8 +1576,27 @@ class Uploader {
1549
1576
  this._sizeDone = 0;
1550
1577
  this.retryTimerRunning = false;
1551
1578
  this.retryTimerId = null;
1579
+ this.te = new TextEncoder();
1552
1580
  this.que = new Array();
1553
1581
  }
1582
+ dataSize(dt) {
1583
+ let si = 0;
1584
+ if (dt instanceof Blob) {
1585
+ si = dt.size;
1586
+ }
1587
+ else if (dt instanceof FormData) {
1588
+ dt.forEach((v, k) => {
1589
+ if (v instanceof File) {
1590
+ si += v.size;
1591
+ }
1592
+ else if (typeof v === 'string') {
1593
+ // encode to UT-f8 to get upload size
1594
+ si += this.te.encode().length;
1595
+ }
1596
+ });
1597
+ }
1598
+ return si;
1599
+ }
1554
1600
  uploadDone(ul) {
1555
1601
  ul.status = UploadStatus$1.DONE;
1556
1602
  // remove upload from queue
@@ -1558,7 +1604,7 @@ class Uploader {
1558
1604
  if (this.que[i] === ul) {
1559
1605
  // found, remove
1560
1606
  this.que.splice(i, 1);
1561
- let ulSize = ul.data.size;
1607
+ let ulSize = this.dataSize(ul.data);
1562
1608
  this._sizeDone += ulSize;
1563
1609
  break;
1564
1610
  }
@@ -1576,7 +1622,7 @@ class Uploader {
1576
1622
  else {
1577
1623
  this.status = UploaderStatus.UPLOADING;
1578
1624
  }
1579
- let dSize = ul.data.size;
1625
+ let dSize = this.dataSize(ul.data);
1580
1626
  let timeoutForDataSize = dSize * this.POST_TIMEOUT_PER_KB / 1000;
1581
1627
  let timeoVal = Math.round(this.POST_MIN_TIMEOUT + timeoutForDataSize);
1582
1628
  // pipe(timeout()) is not the same as xhr.timeout
@@ -1682,7 +1728,7 @@ class Uploader {
1682
1728
  }
1683
1729
  queueUpload(ul) {
1684
1730
  if (ul) {
1685
- let ulSize = ul.data.size;
1731
+ let ulSize = this.dataSize(ul.data);
1686
1732
  this.que.push(ul);
1687
1733
  this._sizeQueued += ulSize;
1688
1734
  this.process();
@@ -1708,9 +1754,9 @@ class SpeechRecorderConfig {
1708
1754
  this.withCredentials = false;
1709
1755
  }
1710
1756
  }
1711
- SpeechRecorderConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechRecorderConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1712
- SpeechRecorderConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechRecorderConfig });
1713
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechRecorderConfig, decorators: [{
1757
+ SpeechRecorderConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechRecorderConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1758
+ SpeechRecorderConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechRecorderConfig });
1759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechRecorderConfig, decorators: [{
1714
1760
  type: Injectable
1715
1761
  }], ctorParameters: function () { return []; } });
1716
1762
 
@@ -1762,9 +1808,9 @@ class ProjectService {
1762
1808
  }
1763
1809
  }
1764
1810
  ProjectService.PROJECT_API_CTX = 'project';
1765
- ProjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ProjectService, deps: [{ token: i1.HttpClient }, { token: i4.PlatformLocation }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
1766
- ProjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ProjectService });
1767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ProjectService, decorators: [{
1811
+ ProjectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ProjectService, deps: [{ token: i1.HttpClient }, { token: i4.PlatformLocation }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
1812
+ ProjectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ProjectService });
1813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ProjectService, decorators: [{
1768
1814
  type: Injectable
1769
1815
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i4.PlatformLocation }, { type: SpeechRecorderConfig, decorators: [{
1770
1816
  type: Inject,
@@ -1820,9 +1866,9 @@ class SessionService {
1820
1866
  }
1821
1867
  }
1822
1868
  SessionService.SESSION_API_CTX = 'session';
1823
- SessionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SessionService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
1824
- SessionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SessionService });
1825
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SessionService, decorators: [{
1869
+ SessionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SessionService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
1870
+ SessionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SessionService });
1871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SessionService, decorators: [{
1826
1872
  type: Injectable
1827
1873
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: SpeechRecorderConfig, decorators: [{
1828
1874
  type: Inject,
@@ -2110,14 +2156,14 @@ class LevelBar {
2110
2156
  }
2111
2157
  }
2112
2158
  }
2113
- LevelBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LevelBar, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2114
- LevelBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: LevelBar, selector: "audio-levelbar", inputs: { streamingMode: "streamingMode", displayLevelInfos: "displayLevelInfos" }, host: { listeners: { "scroll": "onScroll($event)", "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "virtualCanvasRef", first: true, predicate: ["virtualCanvas"], descendants: true, static: true }, { propertyName: "liveLevelCanvasRef", first: true, predicate: ["levelbar"], descendants: true, static: true }, { propertyName: "markerCanvasRef", first: true, predicate: ["markerCanvas"], descendants: true, static: true }], ngImport: i0, template: `
2159
+ LevelBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LevelBar, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2160
+ LevelBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: LevelBar, selector: "audio-levelbar", inputs: { streamingMode: "streamingMode", displayLevelInfos: "displayLevelInfos" }, host: { listeners: { "scroll": "onScroll($event)", "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "virtualCanvasRef", first: true, predicate: ["virtualCanvas"], descendants: true, static: true }, { propertyName: "liveLevelCanvasRef", first: true, predicate: ["levelbar"], descendants: true, static: true }, { propertyName: "markerCanvasRef", first: true, predicate: ["markerCanvas"], descendants: true, static: true }], ngImport: i0, template: `
2115
2161
  <div #virtualCanvas>
2116
2162
  <canvas #levelbar></canvas>
2117
2163
  <canvas #markerCanvas></canvas>
2118
2164
  </div>
2119
- `, isInline: true, styles: [":host {\n\n width: 100%;\n background: darkgray;\n box-sizing: border-box;\n height: 100%;\n position: relative;\n overflow-x: scroll;\n overflow-y: auto;\n }", "div {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n /*position: absolute;*/\n box-sizing: border-box;\n }", "canvas {\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: absolute;\n }"] });
2120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: LevelBar, decorators: [{
2165
+ `, isInline: true, styles: [":host{width:100%;background:darkgray;box-sizing:border-box;height:100%;position:relative;overflow-x:scroll;overflow-y:auto}\n", "div{top:0;left:0;width:100%;height:100%;box-sizing:border-box}\n", "canvas{top:0;left:0;width:100%;height:100%;position:absolute}\n"] });
2166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: LevelBar, decorators: [{
2121
2167
  type: Component,
2122
2168
  args: [{
2123
2169
  selector: 'audio-levelbar',
@@ -2228,8 +2274,8 @@ class RecordingItemControls {
2228
2274
  // this.status = 'ERROR';
2229
2275
  }
2230
2276
  }
2231
- RecordingItemControls.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingItemControls, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2232
- RecordingItemControls.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RecordingItemControls, selector: "spr-recordingitemcontrols", inputs: { audioSignalCollapsed: "audioSignalCollapsed", enableDownload: "enableDownload", peakDbLvl: "peakDbLvl", agc: "agc", audioLoaded: "audioLoaded", playStartAction: "playStartAction", playStopAction: "playStopAction", displayLevelInfos: "displayLevelInfos" }, outputs: { onShowRecordingDetails: "onShowRecordingDetails", onDownloadRecording: "onDownloadRecording" }, ngImport: i0, template: `
2277
+ RecordingItemControls.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingItemControls, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2278
+ RecordingItemControls.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecordingItemControls, selector: "spr-recordingitemcontrols", inputs: { audioSignalCollapsed: "audioSignalCollapsed", enableDownload: "enableDownload", peakDbLvl: "peakDbLvl", agc: "agc", audioLoaded: "audioLoaded", playStartAction: "playStartAction", playStopAction: "playStopAction", displayLevelInfos: "displayLevelInfos" }, outputs: { onShowRecordingDetails: "onShowRecordingDetails", onDownloadRecording: "onDownloadRecording" }, ngImport: i0, template: `
2233
2279
  <button matTooltip="Start playback" (click)="playStartAction?.perform()"
2234
2280
  [disabled]="playStartAction?.disabled"
2235
2281
  [style.color]="playStartAction?.disabled ? 'grey' : 'green'">
@@ -2251,8 +2297,8 @@ RecordingItemControls.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
2251
2297
  <div style="min-width: 14ch;padding:2px"><table style="border-style: none"><tr><td>Peak:</td><td><span matTooltip="Peak level"
2252
2298
  [style.color]="(peakDbLvl > warnDbLevel)?'red':'black'">{{peakDbLvl | number:'1.1-1'}} dB </span></td></tr>
2253
2299
  <tr *ngIf="_agc"><td>AGC:</td><td><span matTooltip="Auto gain control">{{agcString}}</span></td></tr></table></div>
2254
- `, isInline: true, styles: [":host {\n flex: 0; /* only required vertical space */\n width: 100%;\n background: darkgray;\n padding: 4px;\n box-sizing: border-box;\n height: 100%;\n\n display: flex; /* flex container: left level bar, right decimal peak level value */\n flex-direction: row;\n flex-wrap: nowrap; /* wrap could completely destroy the layout */\n }", "span {\n flex: 0;\n font-weight: bold;\n display: inline-block;\n white-space: nowrap;\n box-sizing: border-box;\n }"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { 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"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "number": i4.DecimalPipe } });
2255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingItemControls, decorators: [{
2300
+ `, isInline: true, styles: [":host{flex:0;width:100%;background:darkgray;padding:4px;box-sizing:border-box;height:100%;display:flex;flex-direction:row;flex-wrap:nowrap}\n", "span{flex:0;font-weight:700;display:inline-block;white-space:nowrap;box-sizing:border-box}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { 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"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "number": i4.DecimalPipe } });
2301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingItemControls, decorators: [{
2256
2302
  type: Component,
2257
2303
  args: [{
2258
2304
  selector: 'spr-recordingitemcontrols',
@@ -2391,14 +2437,14 @@ class RecordingItemDisplay {
2391
2437
  this.changeDetectorRef.detectChanges();
2392
2438
  }
2393
2439
  }
2394
- RecordingItemDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingItemDisplay, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2395
- RecordingItemDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RecordingItemDisplay, selector: "spr-recordingitemdisplay", inputs: { streamingMode: "streamingMode", audioSignalCollapsed: "audioSignalCollapsed", enableDownload: "enableDownload", agc: "agc", playStartAction: "playStartAction", playStopAction: "playStopAction", displayAudioBuffer: "displayAudioBuffer", displayLevelInfos: "displayLevelInfos" }, outputs: { onShowRecordingDetails: "onShowRecordingDetails", onDownloadRecording: "onDownloadRecording" }, viewQueries: [{ propertyName: "liveLevel", first: true, predicate: LevelBar, descendants: true, static: true }], ngImport: i0, template: `
2440
+ RecordingItemDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingItemDisplay, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2441
+ RecordingItemDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecordingItemDisplay, selector: "spr-recordingitemdisplay", inputs: { streamingMode: "streamingMode", audioSignalCollapsed: "audioSignalCollapsed", enableDownload: "enableDownload", agc: "agc", playStartAction: "playStartAction", playStopAction: "playStopAction", displayAudioBuffer: "displayAudioBuffer", displayLevelInfos: "displayLevelInfos" }, outputs: { onShowRecordingDetails: "onShowRecordingDetails", onDownloadRecording: "onDownloadRecording" }, viewQueries: [{ propertyName: "liveLevel", first: true, predicate: LevelBar, descendants: true, static: true }], ngImport: i0, template: `
2396
2442
  <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}" [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
2397
2443
  <audio-levelbar fxFlex="1 0 1" [streamingMode]="streamingMode" [displayLevelInfos]="_displayLevelInfos"></audio-levelbar>
2398
2444
  <spr-recordingitemcontrols fxFlex="0 0 0" [audioLoaded]="displayAudioBuffer!==null" [playStartAction]="playStartAction" [playStopAction]="playStopAction" [peakDbLvl]="peakDbLvl" [agc]="_agc" (onShowRecordingDetails)="onShowRecordingDetails.emit()"></spr-recordingitemcontrols>
2399
2445
  </div>
2400
- `, isInline: true, styles: ["div {\n width: 100%;\n background: darkgray;\n padding: 4px;\n box-sizing: border-box;\n flex-wrap: nowrap; /* wrap could completely destroy the layout */\n }", "audio-levelbar {\n box-sizing: border-box;\n }"], components: [{ 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"] }], 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"] }] });
2401
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingItemDisplay, decorators: [{
2446
+ `, isInline: true, styles: ["div{width:100%;background:darkgray;padding:4px;box-sizing:border-box;flex-wrap:nowrap}\n", "audio-levelbar{box-sizing:border-box}\n"], components: [{ 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"] }], 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"] }] });
2447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingItemDisplay, decorators: [{
2402
2448
  type: Component,
2403
2449
  args: [{
2404
2450
  selector: 'spr-recordingitemdisplay',
@@ -2655,8 +2701,7 @@ class LevelMeasure {
2655
2701
  });
2656
2702
  }
2657
2703
  terminateWorker() {
2658
- var _a;
2659
- (_a = this.worker) === null || _a === void 0 ? void 0 : _a.terminate();
2704
+ this.worker?.terminate();
2660
2705
  }
2661
2706
  /*
2662
2707
  * Method used as worker code.
@@ -2755,14 +2800,13 @@ class StreamLevelMeasure {
2755
2800
  }
2756
2801
  }
2757
2802
  write(bufferData) {
2758
- var _a;
2759
2803
  let bufArrCopies = new Array(bufferData.length);
2760
2804
  let buffers = new Array(bufferData.length);
2761
2805
  for (let ch = 0; ch < bufferData.length; ch++) {
2762
2806
  bufArrCopies[ch] = bufferData[ch].slice();
2763
2807
  buffers[ch] = bufArrCopies[ch].buffer;
2764
2808
  }
2765
- (_a = this.worker) === null || _a === void 0 ? void 0 : _a.postMessage({
2809
+ this.worker?.postMessage({
2766
2810
  streamFinished: false,
2767
2811
  audioData: buffers,
2768
2812
  chs: this.channelCount,
@@ -2772,12 +2816,10 @@ class StreamLevelMeasure {
2772
2816
  return bufArrCopies[0].length;
2773
2817
  }
2774
2818
  flush() {
2775
- var _a;
2776
- (_a = this.worker) === null || _a === void 0 ? void 0 : _a.postMessage({ streamFinished: true });
2819
+ this.worker?.postMessage({ streamFinished: true });
2777
2820
  }
2778
2821
  close() {
2779
- var _a;
2780
- (_a = this.worker) === null || _a === void 0 ? void 0 : _a.terminate();
2822
+ this.worker?.terminate();
2781
2823
  }
2782
2824
  /*
2783
2825
  * Method used as worker code.
@@ -2840,8 +2882,7 @@ class StreamLevelMeasure {
2840
2882
  }
2841
2883
  }
2842
2884
  stop() {
2843
- var _a;
2844
- (_a = this.worker) === null || _a === void 0 ? void 0 : _a.terminate();
2885
+ this.worker?.terminate();
2845
2886
  }
2846
2887
  }
2847
2888
 
@@ -2877,16 +2918,16 @@ class SimpleTrafficLight {
2877
2918
  }
2878
2919
  }
2879
2920
  }
2880
- SimpleTrafficLight.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SimpleTrafficLight, deps: [], target: i0.ɵɵFactoryTarget.Component });
2881
- SimpleTrafficLight.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SimpleTrafficLight, selector: "app-simpletrafficlight", inputs: { status: "status" }, ngImport: i0, template: `
2921
+ SimpleTrafficLight.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SimpleTrafficLight, deps: [], target: i0.ɵɵFactoryTarget.Component });
2922
+ SimpleTrafficLight.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: SimpleTrafficLight, selector: "app-simpletrafficlight", inputs: { status: "status" }, ngImport: i0, template: `
2882
2923
 
2883
2924
  <div>
2884
2925
  <div class="circle {{lighttop}}"></div>
2885
2926
  <div class="circle {{lightmid}}"></div>
2886
2927
  <div class="circle {{lightbottom}}"></div>
2887
2928
  </div>
2888
- `, isInline: true, styles: [".circle {\n width: 50px;\n height: 50px;\n border-radius: 50%;\n margin: 5px;\n background: grey;\n }", ".red {\n background: red;\n }\n ", "\n .yellow {\n background: yellow;\n }\n ", "\n .green {\n background: green;\n }\n ", "\n .black {\n background: black;\n }", ":host {\n display: flex;\n flex-direction: column;\n background: black;\n \n padding: 2px;\n height: 170px;\n max-height: 170px;\n flex: 0 0 content;\n }\n "] });
2889
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SimpleTrafficLight, decorators: [{
2929
+ `, isInline: true, styles: [".circle{width:50px;height:50px;border-radius:50%;margin:5px;background:grey}\n", ".red{background:red}\n", ".yellow{background:yellow}\n", ".green{background:green}\n", ".black{background:black}\n", ":host{display:flex;flex-direction:column;background:black;padding:2px;height:170px;max-height:170px;flex:0 0 content}\n"] });
2930
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SimpleTrafficLight, decorators: [{
2890
2931
  type: Component,
2891
2932
  args: [{
2892
2933
  selector: 'app-simpletrafficlight',
@@ -2992,9 +3033,9 @@ class CanvasLayerComponent {
2992
3033
  }
2993
3034
  }
2994
3035
  }
2995
- CanvasLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CanvasLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2996
- CanvasLayerComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: CanvasLayerComponent, ngImport: i0 });
2997
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CanvasLayerComponent, decorators: [{
3036
+ CanvasLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: CanvasLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3037
+ CanvasLayerComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: CanvasLayerComponent, ngImport: i0 });
3038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: CanvasLayerComponent, decorators: [{
2998
3039
  type: Directive
2999
3040
  }], ctorParameters: function () { return []; } });
3000
3041
 
@@ -3178,46 +3219,58 @@ class BasicAudioCanvasLayerComponent extends CanvasLayerComponent {
3178
3219
  for (let ci = 0; ci < this.canvasLayers.length; ci++) {
3179
3220
  let cl = this.canvasLayers[ci];
3180
3221
  const leftStyle = bounds.position.left + 'px';
3222
+ if (cl.style.left != leftStyle) {
3223
+ cl.style.left = leftStyle;
3224
+ }
3181
3225
  const topStyle = bounds.position.top + 'px';
3182
- cl.style.left = leftStyle;
3183
- cl.style.top = topStyle;
3226
+ if (cl.style.top != topStyle) {
3227
+ cl.style.top = topStyle;
3228
+ }
3184
3229
  }
3185
3230
  if (bounds.dimension.width) {
3186
- let intW = Math.round(bounds.dimension.width);
3231
+ let intW = Math.floor(bounds.dimension.width);
3187
3232
  if (redraw) {
3188
3233
  // Do not set width of background canvas (causes flicker on start render)
3189
3234
  for (let ci = 1; ci < this.canvasLayers.length; ci++) {
3190
3235
  let cl = this.canvasLayers[ci];
3191
- cl.width = intW;
3236
+ if (cl.width != intW) {
3237
+ cl.width = intW;
3238
+ }
3192
3239
  }
3193
3240
  }
3194
3241
  let wStr = intW.toString() + 'px';
3195
3242
  for (let ci = 0; ci < this.canvasLayers.length; ci++) {
3196
3243
  let cl = this.canvasLayers[ci];
3197
- cl.style.width = wStr;
3244
+ if (cl.style.width != wStr) {
3245
+ cl.style.width = wStr;
3246
+ }
3198
3247
  }
3199
3248
  }
3200
3249
  if (bounds.dimension.height) {
3201
- let intH = Math.round(bounds.dimension.height);
3250
+ let intH = Math.floor(bounds.dimension.height);
3202
3251
  if (redraw) {
3203
3252
  // Do not set height of background canvas (causes flicker on start render)
3204
3253
  for (let ci = 1; ci < this.canvasLayers.length; ci++) {
3205
3254
  let cl = this.canvasLayers[ci];
3206
- cl.height = intH;
3255
+ if (cl.height != intH) {
3256
+ cl.height = intH;
3257
+ }
3207
3258
  }
3208
3259
  }
3209
3260
  let hStr = intH + 'px';
3210
3261
  for (let ci = 0; ci < this.canvasLayers.length; ci++) {
3211
3262
  let cl = this.canvasLayers[ci];
3212
- cl.style.height = hStr;
3263
+ if (cl.style.height != hStr) {
3264
+ cl.style.height = hStr;
3265
+ }
3213
3266
  }
3214
3267
  }
3215
3268
  //});
3216
3269
  }
3217
3270
  }
3218
- BasicAudioCanvasLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BasicAudioCanvasLayerComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3219
- BasicAudioCanvasLayerComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: BasicAudioCanvasLayerComponent, usesInheritance: true, ngImport: i0 });
3220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: BasicAudioCanvasLayerComponent, decorators: [{
3271
+ BasicAudioCanvasLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: BasicAudioCanvasLayerComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3272
+ BasicAudioCanvasLayerComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: BasicAudioCanvasLayerComponent, usesInheritance: true, ngImport: i0 });
3273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: BasicAudioCanvasLayerComponent, decorators: [{
3221
3274
  type: Directive
3222
3275
  }] });
3223
3276
  class AudioCanvasLayerComponent extends BasicAudioCanvasLayerComponent {
@@ -3418,9 +3471,9 @@ class AudioCanvasLayerComponent extends BasicAudioCanvasLayerComponent {
3418
3471
  }
3419
3472
  }
3420
3473
  }
3421
- AudioCanvasLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioCanvasLayerComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3422
- AudioCanvasLayerComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: AudioCanvasLayerComponent, inputs: { pointerPosition: "pointerPosition", selecting: "selecting", selection: "selection" }, outputs: { pointerPositionEventEmitter: "pointerPositionEventEmitter", selectingEventEmitter: "selectingEventEmitter", selectedEventEmitter: "selectedEventEmitter" }, host: { listeners: { "document:mouseup": "onMouseup($event)" } }, viewQueries: [{ propertyName: "bgCanvasRef", first: true, predicate: ["bg"], descendants: true, static: true }, { propertyName: "cursorCanvasRef", first: true, predicate: ["cursor"], descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
3423
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioCanvasLayerComponent, decorators: [{
3474
+ AudioCanvasLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioCanvasLayerComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
3475
+ AudioCanvasLayerComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: AudioCanvasLayerComponent, inputs: { pointerPosition: "pointerPosition", selecting: "selecting", selection: "selection" }, outputs: { pointerPositionEventEmitter: "pointerPositionEventEmitter", selectingEventEmitter: "selectingEventEmitter", selectedEventEmitter: "selectedEventEmitter" }, host: { listeners: { "document:mouseup": "onMouseup($event)" } }, viewQueries: [{ propertyName: "bgCanvasRef", first: true, predicate: ["bg"], descendants: true, static: true }, { propertyName: "cursorCanvasRef", first: true, predicate: ["cursor"], descendants: true, static: true }], usesInheritance: true, ngImport: i0 });
3476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioCanvasLayerComponent, decorators: [{
3424
3477
  type: Directive
3425
3478
  }], propDecorators: { bgCanvasRef: [{
3426
3479
  type: ViewChild,
@@ -3743,14 +3796,14 @@ class AudioSignal extends AudioCanvasLayerComponent {
3743
3796
  this.playFramePosition = 0;
3744
3797
  }
3745
3798
  }
3746
- AudioSignal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioSignal, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
3747
- AudioSignal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AudioSignal, selector: "audio-signal", viewQueries: [{ propertyName: "audioSignalCanvasRef", first: true, predicate: ["audioSignal"], descendants: true, static: true }, { propertyName: "playPosCanvasRef", first: true, predicate: ["marker"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
3799
+ AudioSignal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioSignal, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
3800
+ AudioSignal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: AudioSignal, selector: "audio-signal", viewQueries: [{ propertyName: "audioSignalCanvasRef", first: true, predicate: ["audioSignal"], descendants: true, static: true }, { propertyName: "playPosCanvasRef", first: true, predicate: ["marker"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
3748
3801
  <canvas #bg height="10"></canvas>
3749
3802
  <canvas #audioSignal height="10"></canvas>
3750
3803
  <canvas #cursor height="10" (mousedown)="selectionStart($event)" (mouseover)="updateCursorCanvas($event)" (mousemove)="updateCursorCanvas($event)"
3751
3804
  (mouseleave)="updateCursorCanvas($event, false)"></canvas>
3752
- <canvas #marker height="10"></canvas>`, isInline: true, styles: [":host{\n min-height: 0px;\n }", "canvas {\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n min-height: 0px;\n position: absolute;\n }"] });
3753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioSignal, decorators: [{
3805
+ <canvas #marker height="10"></canvas>`, isInline: true, styles: [":host{min-height:0px}\n", "canvas{top:0;left:0;width:0;height:0;min-height:0px;position:absolute}\n"] });
3806
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioSignal, decorators: [{
3754
3807
  type: Component,
3755
3808
  args: [{
3756
3809
  selector: 'audio-signal',
@@ -4678,14 +4731,14 @@ class Sonagram extends AudioCanvasLayerComponent {
4678
4731
  //this.startRender();
4679
4732
  }
4680
4733
  }
4681
- Sonagram.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Sonagram, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4682
- Sonagram.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: Sonagram, selector: "audio-sonagram", viewQueries: [{ propertyName: "sonagramCanvasRef", first: true, predicate: ["sonagram"], descendants: true, static: true }, { propertyName: "markerCanvasRef", first: true, predicate: ["marker"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
4734
+ Sonagram.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Sonagram, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4735
+ Sonagram.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: Sonagram, selector: "audio-sonagram", viewQueries: [{ propertyName: "sonagramCanvasRef", first: true, predicate: ["sonagram"], descendants: true, static: true }, { propertyName: "markerCanvasRef", first: true, predicate: ["marker"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
4683
4736
  <canvas #sonagram height="10"></canvas>
4684
4737
  <canvas #bg height="10"></canvas>
4685
4738
  <canvas #cursor height="10" (mousedown)="selectionStart($event)" (mouseover)="updateCursorCanvas($event)" (mousemove)="updateCursorCanvas($event)"
4686
4739
  (mouseleave)="updateCursorCanvas($event, false)"></canvas>
4687
- <canvas #marker height="10"></canvas>`, isInline: true, styles: [":host{\n min-height: 0px;\n }", "canvas {\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n min-height: 0px;\n position: absolute;\n }"] });
4688
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Sonagram, decorators: [{
4740
+ <canvas #marker height="10"></canvas>`, isInline: true, styles: [":host{min-height:0px}\n", "canvas{top:0;left:0;width:0;height:0;min-height:0px;position:absolute}\n"] });
4741
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Sonagram, decorators: [{
4689
4742
  type: Component,
4690
4743
  args: [{
4691
4744
  selector: 'audio-sonagram',
@@ -4939,17 +4992,32 @@ class AudioClipUIContainer extends BasicAudioCanvasLayerComponent {
4939
4992
  }
4940
4993
  // Divider
4941
4994
  // left position
4942
- this.dc.style.left = vbLeft + 'px';
4995
+ let vbLeftStyl = vbLeft + 'px';
4996
+ if (this.dc.style.left != vbLeftStyl) {
4997
+ this.dc.style.left = vbLeftStyl;
4998
+ }
4943
4999
  // top position
4944
5000
  const dTop = asH;
4945
5001
  const dTopStr = dTop + 'px';
4946
- this.dc.style.top = dTopStr;
5002
+ if (this.dc.style.top != dTopStr) {
5003
+ this.dc.style.top = dTopStr;
5004
+ }
4947
5005
  // width
4948
- this.dc.style.width = vbWidth + 'px';
4949
- this.dc.width = vbWidth;
5006
+ let vbWidthStyle = vbWidth + 'px';
5007
+ if (this.dc.style.width != vbWidthStyle) {
5008
+ this.dc.style.width = vbWidthStyle;
5009
+ }
5010
+ if (this.dc.width != vbWidth) {
5011
+ this.dc.width = vbWidth;
5012
+ }
4950
5013
  // height
4951
- this.dc.height = AudioClipUIContainer.DIVIDER_PIXEL_SIZE;
4952
- this.dc.style.height = AudioClipUIContainer.DIVIDER_PIXEL_SIZE.toString() + 'px';
5014
+ if (this.dc.height != AudioClipUIContainer.DIVIDER_PIXEL_SIZE) {
5015
+ this.dc.height = AudioClipUIContainer.DIVIDER_PIXEL_SIZE;
5016
+ }
5017
+ let divPixelSizeStyle = AudioClipUIContainer.DIVIDER_PIXEL_SIZE.toString() + 'px';
5018
+ if (this.dc.style.height != divPixelSizeStyle) {
5019
+ this.dc.style.height = divPixelSizeStyle;
5020
+ }
4953
5021
  this.drawDivider();
4954
5022
  // Virtual dimension, only width is used
4955
5023
  let virtualDim = new Dimension(ceBcrIntW, 0);
@@ -4975,7 +5043,10 @@ class AudioClipUIContainer extends BasicAudioCanvasLayerComponent {
4975
5043
  if (this._audioData) {
4976
5044
  if (this._fixFitToPanel) {
4977
5045
  // Set the virtual canvas width to the visible width
4978
- this.ce.style.width = '100%';
5046
+ if (this.ce.style.width != '100%') {
5047
+ //console.log("set width to 100%");
5048
+ this.ce.style.width = '100%';
5049
+ }
4979
5050
  }
4980
5051
  else {
4981
5052
  if (this._xZoom) {
@@ -5032,16 +5103,16 @@ class AudioClipUIContainer extends BasicAudioCanvasLayerComponent {
5032
5103
  }
5033
5104
  }
5034
5105
  AudioClipUIContainer.DIVIDER_PIXEL_SIZE = 10;
5035
- AudioClipUIContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioClipUIContainer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5036
- AudioClipUIContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AudioClipUIContainer, selector: "app-audio", inputs: { audioData: "audioData", audioClip: "audioClip" }, outputs: { selectionEventEmitter: "selectionEventEmitter" }, host: { listeners: { "window:resize": "onResize($event)", "document:mouseup": "onMouseup($event)", "document:mousemove": "onMousemove($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["divider"], descendants: true, static: true }, { propertyName: "ceRef", first: true, predicate: ["virtualCanvas"], descendants: true, static: true }, { propertyName: "as", first: true, predicate: AudioSignal, descendants: true, static: true }, { propertyName: "so", first: true, predicate: Sonagram, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
5106
+ AudioClipUIContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioClipUIContainer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5107
+ AudioClipUIContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: AudioClipUIContainer, selector: "app-audio", inputs: { audioData: "audioData", audioClip: "audioClip" }, outputs: { selectionEventEmitter: "selectionEventEmitter" }, host: { listeners: { "window:resize": "onResize($event)", "document:mouseup": "onMouseup($event)", "document:mousemove": "onMousemove($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["divider"], descendants: true, static: true }, { propertyName: "ceRef", first: true, predicate: ["virtualCanvas"], descendants: true, static: true }, { propertyName: "as", first: true, predicate: AudioSignal, descendants: true, static: true }, { propertyName: "so", first: true, predicate: Sonagram, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
5037
5108
  <div #virtualCanvas>
5038
5109
  <canvas #divider (mousedown)="mousedown($event)" (mouseover)="mouseover($event)"
5039
5110
  (mouseleave)="mouseleave($event)" height="10"></canvas>
5040
5111
  <audio-signal [pointerPosition]="pointer" [selecting]="selecting" [selection]="selection" (pointerPositionEventEmitter)="pointerPositionChanged($event)" (selectingEventEmitter)="selectingChanged($event)" (selectedEventEmitter)="selectionChanged($event)"></audio-signal>
5041
5112
  <audio-sonagram [pointerPosition]="pointer" [selecting]="selecting" [selection]="selection" (pointerPositionEventEmitter)="pointerPositionChanged($event)" (selectingEventEmitter)="selectingChanged($event)" (selectedEventEmitter)="selectionChanged($event)"></audio-sonagram>
5042
5113
  </div>
5043
- `, isInline: true, styles: ["div {\n\n margin: 0;\n padding: 0;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n position: relative; /* TODO container div position must not be 'static' (default) to act as reference for the canvases */\n box-sizing: border-box;\n transform: none;\n }", "canvas{\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n cursor: ns-resize;\n position: absolute;\n zIndex: 1;\n transform: none;\n }", "audio-signal {\n top: 0;\n left: 0;\n position: absolute;\n zIndex: 1;\n transform: none;\n }", "audio-sonagram {\n top: 0;\n left: 0;\n position: absolute;\n zIndex: 1;\n transform: none;\n }"], components: [{ type: AudioSignal, selector: "audio-signal" }, { type: Sonagram, selector: "audio-sonagram" }] });
5044
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioClipUIContainer, decorators: [{
5114
+ `, isInline: true, styles: ["div{margin:0;padding:0;top:0;left:0;width:100%;height:100%;position:relative;box-sizing:border-box;transform:none;overflow:hidden}\n", "canvas{top:0;left:0;width:0;height:0;cursor:ns-resize;position:absolute;zIndex:1;transform:none}\n", "audio-signal{top:0;left:0;position:absolute;zIndex:1;transform:none}\n", "audio-sonagram{top:0;left:0;position:absolute;zIndex:1;transform:none}\n"], components: [{ type: AudioSignal, selector: "audio-signal" }, { type: Sonagram, selector: "audio-sonagram" }] });
5115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioClipUIContainer, decorators: [{
5045
5116
  type: Component,
5046
5117
  args: [{
5047
5118
  selector: 'app-audio',
@@ -5064,6 +5135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
5064
5135
  position: relative; /* TODO container div position must not be 'static' (default) to act as reference for the canvases */
5065
5136
  box-sizing: border-box;
5066
5137
  transform: none;
5138
+ overflow: hidden;
5067
5139
  }`, `canvas{
5068
5140
  top: 0;
5069
5141
  left: 0;
@@ -5226,13 +5298,13 @@ class AudioDisplayScrollPane {
5226
5298
  this.ac.playFramePosition = framePos;
5227
5299
  }
5228
5300
  }
5229
- AudioDisplayScrollPane.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplayScrollPane, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5230
- AudioDisplayScrollPane.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: { audioClip: "audioClip" }, outputs: { zoomInAction: "zoomInAction", zoomOutAction: "zoomOutAction", zoomSelectedAction: "zoomSelectedAction", zoomFitToPanelAction: "zoomFitToPanelAction" }, host: { listeners: { "scroll": "onScroll($event)", "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "ac", first: true, predicate: AudioClipUIContainer, descendants: true, static: true }], ngImport: i0, template: `
5301
+ AudioDisplayScrollPane.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplayScrollPane, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5302
+ AudioDisplayScrollPane.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: { audioClip: "audioClip" }, outputs: { zoomInAction: "zoomInAction", zoomOutAction: "zoomOutAction", zoomSelectedAction: "zoomSelectedAction", zoomFitToPanelAction: "zoomFitToPanelAction" }, host: { listeners: { "scroll": "onScroll($event)", "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "ac", first: true, predicate: AudioClipUIContainer, descendants: true, static: true }], ngImport: i0, template: `
5231
5303
 
5232
5304
  <app-audio #audioSignalContainer (selectionEventEmitter)="selectionChanged($event)"></app-audio>
5233
5305
 
5234
- `, isInline: true, styles: [":host {\n flex: 2;\n width: 100%;\n background: darkgray;\n box-sizing: border-box;\n height: 100%;\n position: relative;\n overflow-x: scroll;\n overflow-y: auto;\n }", "app-audio {\n\n margin: 0;\n padding: 0;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n /*position: absolute;*/\n box-sizing: border-box;\n }"], components: [{ type: AudioClipUIContainer, selector: "app-audio", inputs: ["audioData", "audioClip"], outputs: ["selectionEventEmitter"] }] });
5235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplayScrollPane, decorators: [{
5306
+ `, isInline: true, styles: [":host{flex:2;width:100%;background:darkgray;box-sizing:border-box;height:100%;position:relative;overflow-x:scroll;overflow-y:auto}\n", "app-audio{margin:0;padding:0;top:0;left:0;width:100%;height:100%;box-sizing:border-box}\n"], components: [{ type: AudioClipUIContainer, selector: "app-audio", inputs: ["audioData", "audioClip"], outputs: ["selectionEventEmitter"] }] });
5307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplayScrollPane, decorators: [{
5236
5308
  type: Component,
5237
5309
  args: [{
5238
5310
  selector: 'audio-display-scroll-pane',
@@ -5319,8 +5391,8 @@ class AudioDisplayControl {
5319
5391
  this.status = 'ERROR';
5320
5392
  }
5321
5393
  }
5322
- AudioDisplayControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplayControl, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5323
- AudioDisplayControl.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AudioDisplayControl, selector: "audio-display-control", inputs: { audioClip: "audioClip", playStartAction: "playStartAction", playSelectionAction: "playSelectionAction", playStopAction: "playStopAction", zoomInAction: "zoomInAction", zoomOutAction: "zoomOutAction", zoomFitToPanelAction: "zoomFitToPanelAction", zoomSelectedAction: "zoomSelectedAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction" }, viewQueries: [{ propertyName: "autoplaySelectedCheckbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], ngImport: i0, template: `
5394
+ AudioDisplayControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplayControl, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5395
+ AudioDisplayControl.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: AudioDisplayControl, selector: "audio-display-control", inputs: { audioClip: "audioClip", playStartAction: "playStartAction", playSelectionAction: "playSelectionAction", playStopAction: "playStopAction", zoomInAction: "zoomInAction", zoomOutAction: "zoomOutAction", zoomFitToPanelAction: "zoomFitToPanelAction", zoomSelectedAction: "zoomSelectedAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction" }, viewQueries: [{ propertyName: "autoplaySelectedCheckbox", first: true, predicate: MatCheckbox, descendants: true, static: true }], ngImport: i0, template: `
5324
5396
  <div #controlPanel style="display:flex;flex-direction: row;">
5325
5397
  <fieldset>
5326
5398
 
@@ -5363,8 +5435,8 @@ AudioDisplayControl.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
5363
5435
  </button>
5364
5436
 
5365
5437
  </fieldset>
5366
- </div>`, isInline: true, styles: [":host {\n flex: 0;\n\n }"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5367
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplayControl, decorators: [{
5438
+ </div>`, isInline: true, styles: [":host{flex:0}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2$1.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
5439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplayControl, decorators: [{
5368
5440
  type: Component,
5369
5441
  args: [{
5370
5442
  selector: 'audio-display-control',
@@ -5506,8 +5578,8 @@ class AudioDisplay {
5506
5578
  this.status = 'ERROR';
5507
5579
  }
5508
5580
  }
5509
- AudioDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplay, deps: [{ token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5510
- AudioDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AudioDisplay, selector: "app-audiodisplay", inputs: { playStartAction: "playStartAction", playStopAction: "playStopAction", playSelectionAction: "playSelectionAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction", audioData: "audioData", audioClip: "audioClip" }, viewQueries: [{ propertyName: "audioDisplayScrollPane", first: true, predicate: AudioDisplayScrollPane, descendants: true, static: true }], ngImport: i0, template: `
5581
+ AudioDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplay, deps: [{ token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5582
+ AudioDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: AudioDisplay, selector: "app-audiodisplay", inputs: { playStartAction: "playStartAction", playStopAction: "playStopAction", playSelectionAction: "playSelectionAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction", audioData: "audioData", audioClip: "audioClip" }, viewQueries: [{ propertyName: "audioDisplayScrollPane", first: true, predicate: AudioDisplayScrollPane, descendants: true, static: true }], ngImport: i0, template: `
5511
5583
 
5512
5584
  <audio-display-scroll-pane #audioDisplayScrollPane></audio-display-scroll-pane>
5513
5585
 
@@ -5520,8 +5592,8 @@ AudioDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
5520
5592
  [zoomOutAction]="zoomOutAction"
5521
5593
  [zoomSelectedAction]="zoomSelectedAction"
5522
5594
  [zoomFitToPanelAction]="zoomFitToPanelAction"></audio-display-control>
5523
- `, isInline: true, styles: [":host {\n display: flex;\n flex-direction: column;\n position: absolute;\n bottom: 0px;\n height: 100%;\n width: 100%;\n overflow: hidden;\n padding: 20px;\n z-index: 5;\n box-sizing: border-box;\n background-color: rgba(230, 230, 230, 1.0)\n }", "\n legend{\n margin-left: 1em; padding: 0.2em 0.8em;font-size: 0.8em;\n }", "\n fieldset{\n border: 1px darkgray solid\n }\n "], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }] });
5524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplay, decorators: [{
5595
+ `, isInline: true, styles: [":host{display:flex;flex-direction:column;position:absolute;bottom:0px;height:100%;width:100%;overflow:hidden;padding:20px;z-index:5;box-sizing:border-box;background-color:#e6e6e6}\n", "legend{margin-left:1em;padding:.2em .8em;font-size:.8em}\n", "fieldset{border:1px darkgray solid}\n"], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }] });
5596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplay, decorators: [{
5525
5597
  type: Component,
5526
5598
  args: [{
5527
5599
  selector: 'app-audiodisplay',
@@ -5589,9 +5661,9 @@ class ScrollIntoViewDirective {
5589
5661
  }
5590
5662
  }
5591
5663
  }
5592
- ScrollIntoViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ScrollIntoViewDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5593
- ScrollIntoViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.13", type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: { scrollIntoViewToBottom: "scrollIntoViewToBottom" }, ngImport: i0 });
5594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ScrollIntoViewDirective, decorators: [{
5664
+ ScrollIntoViewDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ScrollIntoViewDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
5665
+ ScrollIntoViewDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.1", type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: { scrollIntoViewToBottom: "scrollIntoViewToBottom" }, ngImport: i0 });
5666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ScrollIntoViewDirective, decorators: [{
5595
5667
  type: Directive,
5596
5668
  args: [{
5597
5669
  selector: "[scrollIntoViewToBottom]"
@@ -5625,8 +5697,8 @@ class Progress {
5625
5697
  }
5626
5698
  }
5627
5699
  }
5628
- Progress.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Progress, deps: [], target: i0.ɵɵFactoryTarget.Component });
5629
- Progress.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: Progress, selector: "app-sprprogress", inputs: { items: "items", selectedItemIdx: "selectedItemIdx", enableDownload: "enableDownload" }, outputs: { onRowSelect: "onRowSelect", rowSelect: "rowSelect", onShowDoneAction: "onShowDoneAction", clickDone: "clickDone", onDownloadDoneAction: "onDownloadDoneAction", clickDownloadDone: "clickDownloadDone" }, ngImport: i0, template: `
5700
+ Progress.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Progress, deps: [], target: i0.ɵɵFactoryTarget.Component });
5701
+ Progress.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: Progress, selector: "app-sprprogress", inputs: { items: "items", selectedItemIdx: "selectedItemIdx", enableDownload: "enableDownload" }, outputs: { onRowSelect: "onRowSelect", rowSelect: "rowSelect", onShowDoneAction: "onShowDoneAction", clickDone: "clickDone", onDownloadDoneAction: "onDownloadDoneAction", clickDownloadDone: "clickDownloadDone" }, ngImport: i0, template: `
5630
5702
 
5631
5703
  <table class="mat-typography">
5632
5704
  <thead>
@@ -5653,8 +5725,8 @@ Progress.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.
5653
5725
 
5654
5726
  </tbody>
5655
5727
  </table>
5656
- `, isInline: true, styles: [":host {\n overflow-x: hidden;\n overflow-y: scroll;\n padding: 10pt;\n /*flex: 0.1 0 300px; \n min-width: 300px; */\n flex: 0.1 0 content;\n background: white;\n /* Workaround for Firefox\n If the progress table gets long (script with many items) FF increases the height of the overflow progressContainer and\n the whole app does not fit into the page anymore. The app overflows and shows a vertical scrollbar for the whole app.\n See http://stackoverflow.com/questions/28636832/firefox-overflow-y-not-working-with-nested-flexbox\n */\n /* min-height:0px; */\n min-height: 1px;\n }", "table {\n min-height: 1px;\n border-collapse: collapse;\n /* Tables do not have a natural min size */\n /*min-width: 300px; */\n \n }\n\n table, th, td {\n border: 1px solid lightgrey;\n padding: 0.5em;\n \n }\n\n ", "\n .selRow {\n background: lightblue;\n }\n ", ".promptDescriptor{\n \n max-width: 200px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: ["scrollIntoViewToBottom"] }] });
5657
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Progress, decorators: [{
5728
+ `, isInline: true, styles: [":host{overflow-x:hidden;overflow-y:scroll;padding:10pt;flex:.1 0 content;background:white;min-height:1px}\n", "table{min-height:1px;border-collapse:collapse}table,th,td{border:1px solid lightgrey;padding:.5em}\n", ".selRow{background:lightblue}\n", ".promptDescriptor{max-width:200px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}\n"], components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: ["scrollIntoViewToBottom"] }] });
5729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Progress, decorators: [{
5658
5730
  type: Component,
5659
5731
  args: [{
5660
5732
  selector: 'app-sprprogress',
@@ -5760,12 +5832,12 @@ class Recinstructions {
5760
5832
  return riTxt;
5761
5833
  }
5762
5834
  }
5763
- Recinstructions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Recinstructions, deps: [], target: i0.ɵɵFactoryTarget.Component });
5764
- Recinstructions.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: Recinstructions, selector: "spr-recinstructions", inputs: { recinstructions: "recinstructions", selectedItemIdx: "selectedItemIdx", itemCount: "itemCount" }, ngImport: i0, template: `
5835
+ Recinstructions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Recinstructions, deps: [], target: i0.ɵɵFactoryTarget.Component });
5836
+ Recinstructions.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: Recinstructions, selector: "spr-recinstructions", inputs: { recinstructions: "recinstructions", selectedItemIdx: "selectedItemIdx", itemCount: "itemCount" }, ngImport: i0, template: `
5765
5837
 
5766
5838
  {{displayText()}}
5767
- `, isInline: true, styles: [":host {\n\n justify-content: left; /* align horizontal center */\n align-items: flex-start; /* align vertical center */\n background: white;\n text-align: left;\n font-size: 1em;\n flex: 0;\n width: 100%;\n }\n "] });
5768
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Recinstructions, decorators: [{
5839
+ `, isInline: true, styles: [":host{justify-content:left;align-items:flex-start;background:white;text-align:left;font-size:1em;flex:0;width:100%}\n"] });
5840
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Recinstructions, decorators: [{
5769
5841
  type: Component,
5770
5842
  args: [{
5771
5843
  selector: 'spr-recinstructions',
@@ -5953,13 +6025,13 @@ class Prompter {
5953
6025
  }
5954
6026
  }
5955
6027
  }
5956
- Prompter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Prompter, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ProjectService }], target: i0.ɵɵFactoryTarget.Component });
5957
- Prompter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: Prompter, selector: "app-sprprompter", inputs: { projectName: "projectName", prompterHeight: "prompterHeight", promptMediaItems: "promptMediaItems" }, host: { properties: { "class.fill": "this.prompterStyleFill" } }, ngImport: i0, template: `
6028
+ Prompter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Prompter, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ProjectService }], target: i0.ɵɵFactoryTarget.Component });
6029
+ Prompter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: Prompter, selector: "app-sprprompter", inputs: { projectName: "projectName", prompterHeight: "prompterHeight", promptMediaItems: "promptMediaItems" }, host: { properties: { "class.fill": "this.prompterStyleFill" } }, ngImport: i0, template: `
5958
6030
 
5959
6031
  <!--<ng-template [ngIf]="text">{{text}}</ng-template>-->
5960
6032
  <!-- <img *ngIf="src" #promptImage [src]="srcUrl()" [height]="prompterHeight-20" /> -->
5961
- `, isInline: true, styles: [":host {\n\n justify-content: center; /* align horizontal center */\n align-items: center; /* align vertical center */\n background: white;\n text-align: center;\n /* font-size: 2em; */\n line-height: 1.2em;\n font-weight: bold;\n /* Use only natural size of the prompt */\n /* The prompter compnent then ets aligned vertically centered */\n flex: 0 1;\n\n }", ":host(.fill) {\n /* Use all space to scale images */\n flex: 3;\n width: 100%;\n height: 100%;\n max-height: 100%;\n max-width: 100%;\n /* A separate flex container might be necessayr to alighn centered */\n vertical-align: middle; /* TODO does not work, image is not vertically centered */\n }"] });
5962
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Prompter, decorators: [{
6033
+ `, isInline: true, styles: [":host{justify-content:center;align-items:center;background:white;text-align:center;line-height:1.2em;font-weight:700;flex:0 1}\n", ":host(.fill){flex:3;width:100%;height:100%;max-height:100%;max-width:100%;vertical-align:middle}\n"] });
6034
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Prompter, decorators: [{
5963
6035
  type: Component,
5964
6036
  args: [{
5965
6037
  selector: 'app-sprprompter',
@@ -6133,11 +6205,11 @@ class PromptContainer {
6133
6205
  }
6134
6206
  }
6135
6207
  }
6136
- PromptContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PromptContainer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6137
- PromptContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PromptContainer, selector: "app-sprpromptcontainer", inputs: { projectName: "projectName", mediaitems: "mediaitems" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "prompter", first: true, predicate: Prompter, descendants: true, static: true }], ngImport: i0, template: `
6208
+ PromptContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: PromptContainer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6209
+ PromptContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: PromptContainer, selector: "app-sprpromptcontainer", inputs: { projectName: "projectName", mediaitems: "mediaitems" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "prompter", first: true, predicate: Prompter, descendants: true, static: true }], ngImport: i0, template: `
6138
6210
  <app-sprprompter #prompter [projectName]="projectName" [promptMediaItems]="mediaitems" [style.font-size]="fontSize+'px'" [style.visibility]="prDisplay" [prompterHeight]="prompterHeight"></app-sprprompter>
6139
- `, isInline: true, styles: [":host {\n\n flex: 3; /* the container consumes all available space */\n padding: 10pt;\n height: 100%;\n max-height: 100%;\n\n justify-content: center; /* align horizontal center*/\n align-items: center; /* align vertical center */\n background: white;\n text-align: center;\n display: flex;\n flex-direction: column;\n min-height: 0px;\n width: 100%;\n }\n "], components: [{ type: Prompter, selector: "app-sprprompter", inputs: ["projectName", "prompterHeight", "promptMediaItems"] }] });
6140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PromptContainer, decorators: [{
6211
+ `, isInline: true, styles: [":host{flex:3;padding:10pt;height:100%;max-height:100%;justify-content:center;align-items:center;background:white;text-align:center;display:flex;flex-direction:column;min-height:0px;width:100%}\n"], components: [{ type: Prompter, selector: "app-sprprompter", inputs: ["projectName", "prompterHeight", "promptMediaItems"] }] });
6212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: PromptContainer, decorators: [{
6141
6213
  type: Component,
6142
6214
  args: [{
6143
6215
  selector: 'app-sprpromptcontainer',
@@ -6280,15 +6352,15 @@ class PromptingContainer {
6280
6352
  ev.preventDefault();
6281
6353
  }
6282
6354
  }
6283
- PromptingContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PromptingContainer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6284
- PromptingContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: PromptingContainer, selector: "app-sprpromptingcontainer", inputs: { projectName: "projectName", promptItem: "promptItem", showPrompt: "showPrompt", selectedItemIdx: "selectedItemIdx", itemCount: "itemCount", transportActions: "transportActions" }, host: { listeners: { "touchstart": "onTouchstart($event)", "touchend": "onTouchEnd($event)", "touchmove": "onTouchMove($event)", "touchcancel": "onTouchCancel($event)" } }, ngImport: i0, template: `
6355
+ PromptingContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: PromptingContainer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
6356
+ PromptingContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: PromptingContainer, selector: "app-sprpromptingcontainer", inputs: { projectName: "projectName", promptItem: "promptItem", showPrompt: "showPrompt", selectedItemIdx: "selectedItemIdx", itemCount: "itemCount", transportActions: "transportActions" }, host: { listeners: { "touchstart": "onTouchstart($event)", "touchend": "onTouchEnd($event)", "touchmove": "onTouchMove($event)", "touchcancel": "onTouchCancel($event)" } }, ngImport: i0, template: `
6285
6357
  <spr-recinstructions [selectedItemIdx]="selectedItemIdx" [itemCount]="itemCount"
6286
6358
  [recinstructions]="promptItem?.recinstructions?.recinstructions"></spr-recinstructions>
6287
6359
  <app-sprpromptcontainer [projectName]="projectName"
6288
6360
  [mediaitems]="showPrompt?(promptItem?promptItem.mediaitems:null):null"></app-sprpromptcontainer>
6289
6361
 
6290
- `, isInline: true, styles: [":host {\n position: relative;\n flex: 3; /* the container consumes all available space */\n padding: 10pt;\n justify-content: center; /* align horizontal center*/\n align-items: center; /* align vertical center */\n background: white;\n text-align: center;\n display: flex;\n flex-direction: column;\n min-height: 0px;\n }\n "], components: [{ type: Recinstructions, selector: "spr-recinstructions", inputs: ["recinstructions", "selectedItemIdx", "itemCount"] }, { type: PromptContainer, selector: "app-sprpromptcontainer", inputs: ["projectName", "mediaitems"] }] });
6291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: PromptingContainer, decorators: [{
6362
+ `, isInline: true, styles: [":host{position:relative;flex:3;padding:10pt;justify-content:center;align-items:center;background:white;text-align:center;display:flex;flex-direction:column;min-height:0px}\n"], components: [{ type: Recinstructions, selector: "spr-recinstructions", inputs: ["recinstructions", "selectedItemIdx", "itemCount"] }, { type: PromptContainer, selector: "app-sprpromptcontainer", inputs: ["projectName", "mediaitems"] }] });
6363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: PromptingContainer, decorators: [{
6292
6364
  type: Component,
6293
6365
  args: [{
6294
6366
  selector: 'app-sprpromptingcontainer',
@@ -6360,8 +6432,8 @@ class Prompting {
6360
6432
  this.onPrevItem.emit();
6361
6433
  }
6362
6434
  }
6363
- Prompting.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Prompting, deps: [], target: i0.ɵɵFactoryTarget.Component });
6364
- Prompting.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: Prompting, selector: "app-sprprompting", inputs: { projectName: "projectName", startStopSignalState: "startStopSignalState", promptItem: "promptItem", showPrompt: "showPrompt", items: "items", selectedItemIdx: "selectedItemIdx", transportActions: "transportActions", enableDownload: "enableDownload", audioSignalCollapsed: "audioSignalCollapsed", displayAudioClip: "displayAudioClip", playStartAction: "playStartAction", playSelectionAction: "playSelectionAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction", playStopAction: "playStopAction" }, outputs: { onItemSelect: "onItemSelect", onNextItem: "onNextItem", onPrevItem: "onPrevItem" }, viewQueries: [{ propertyName: "simpleTrafficLight", first: true, predicate: SimpleTrafficLight, descendants: true, static: true }, { propertyName: "audioDisplay", first: true, predicate: AudioDisplay, descendants: true, static: true }], ngImport: i0, template: `
6435
+ Prompting.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Prompting, deps: [], target: i0.ɵɵFactoryTarget.Component });
6436
+ Prompting.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: Prompting, selector: "app-sprprompting", inputs: { projectName: "projectName", startStopSignalState: "startStopSignalState", promptItem: "promptItem", showPrompt: "showPrompt", items: "items", selectedItemIdx: "selectedItemIdx", transportActions: "transportActions", enableDownload: "enableDownload", audioSignalCollapsed: "audioSignalCollapsed", displayAudioClip: "displayAudioClip", playStartAction: "playStartAction", playSelectionAction: "playSelectionAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction", playStopAction: "playStopAction" }, outputs: { onItemSelect: "onItemSelect", onNextItem: "onNextItem", onPrevItem: "onPrevItem" }, viewQueries: [{ propertyName: "simpleTrafficLight", first: true, predicate: SimpleTrafficLight, descendants: true, static: true }, { propertyName: "audioDisplay", first: true, predicate: AudioDisplay, descendants: true, static: true }], ngImport: i0, template: `
6365
6437
 
6366
6438
  <app-simpletrafficlight [status]="startStopSignalState"></app-simpletrafficlight>
6367
6439
  <app-sprpromptingcontainer [projectName]="projectName" [promptItem]="promptItem" [showPrompt]="showPrompt"
@@ -6383,8 +6455,8 @@ Prompting.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12
6383
6455
 
6384
6456
 
6385
6457
 
6386
- `, isInline: true, styles: [":host {\n position: relative;\n margin: 0;\n padding: 0;\n background: lightgrey;\n width: 100%; /* use all horizontal available space */\n flex: 1; /* ... and fill rest of vertical available space (other components have flex 0) */\n\n /* Workaround for Firefox\n If the progress table gets long (script with many items) FF increases the height of the overflow progressContainer and\n the whole app does not fit into the page anymore. The app overflows and shows a vertical scrollbar for the whole app.\n See http://stackoverflow.com/questions/28636832/firefox-overflow-y-not-working-with-nested-flexbox\n */\n min-height: 0px;\n\n display: flex; /* flex container: left traffic light, right prompter (container) */\n flex-direction: row;\n flex-wrap: nowrap; /* wrap could completely destroy the layout */\n }", "\n app-simpletrafficlight {\n margin: 10px;\n min-height: 0px;\n z-index: 3;\n }\n ", "\n app-sprprogress {\n z-index: 3;\n }\n ", "\n div {\n display: none;\n position: absolute;\n\n\n /* height: 50%; */\n /* width: 100%; */\n\n /* overflow: hidden; */\n\n /* margin: 20px; */\n /* border: 20px; */\n z-index: 5;\n /*background-color: red; */\n }", "\n div.active {\n display: flex;\n position: absolute;\n bottom: 0px;\n /*left: 0px; */\n\n height: 90%;\n width: 100%;\n\n overflow: hidden;\n\n padding: 0px;\n /* margin: 20px; */\n /* border: 20px; */\n z-index: 5;\n box-sizing: border-box;\n background-color: rgba(0, 0, 0, 0)\n\n }"], components: [{ type: SimpleTrafficLight, selector: "app-simpletrafficlight", inputs: ["status"] }, { type: PromptingContainer, selector: "app-sprpromptingcontainer", inputs: ["projectName", "promptItem", "showPrompt", "selectedItemIdx", "itemCount", "transportActions"] }, { type: Progress, selector: "app-sprprogress", inputs: ["items", "selectedItemIdx", "enableDownload"], outputs: ["onRowSelect", "rowSelect", "onShowDoneAction", "clickDone", "onDownloadDoneAction", "clickDownloadDone"] }, { type: AudioDisplay, selector: "app-audiodisplay", inputs: ["playStartAction", "playStopAction", "playSelectionAction", "autoPlayOnSelectToggleAction", "audioData", "audioClip"] }], directives: [{ 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"] }] });
6387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: Prompting, decorators: [{
6458
+ `, isInline: true, styles: [":host{position:relative;margin:0;padding:0;background:lightgrey;width:100%;flex:1;min-height:0px;display:flex;flex-direction:row;flex-wrap:nowrap}\n", "app-simpletrafficlight{margin:10px;min-height:0px;z-index:3}\n", "app-sprprogress{z-index:3}\n", "div{display:none;position:absolute;z-index:5}\n", "div.active{display:flex;position:absolute;bottom:0px;height:90%;width:100%;overflow:hidden;padding:0;z-index:5;box-sizing:border-box;background-color:#0000}\n"], components: [{ type: SimpleTrafficLight, selector: "app-simpletrafficlight", inputs: ["status"] }, { type: PromptingContainer, selector: "app-sprpromptingcontainer", inputs: ["projectName", "promptItem", "showPrompt", "selectedItemIdx", "itemCount", "transportActions"] }, { type: Progress, selector: "app-sprprogress", inputs: ["items", "selectedItemIdx", "enableDownload"], outputs: ["onRowSelect", "rowSelect", "onShowDoneAction", "clickDone", "onDownloadDoneAction", "clickDownloadDone"] }, { type: AudioDisplay, selector: "app-audiodisplay", inputs: ["playStartAction", "playStopAction", "playSelectionAction", "autoPlayOnSelectToggleAction", "audioData", "audioClip"] }], directives: [{ 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"] }] });
6459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: Prompting, decorators: [{
6388
6460
  type: Component,
6389
6461
  args: [{
6390
6462
  selector: 'app-sprprompting',
@@ -6617,14 +6689,14 @@ class StatusDisplay {
6617
6689
  this.statusWaiting = false;
6618
6690
  }
6619
6691
  }
6620
- StatusDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: StatusDisplay, deps: [], target: i0.ɵɵFactoryTarget.Component });
6621
- StatusDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: StatusDisplay, selector: "app-sprstatusdisplay", inputs: { statusAlertType: "statusAlertType", statusMsg: "statusMsg", statusWaiting: "statusWaiting" }, ngImport: i0, template: `
6692
+ StatusDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: StatusDisplay, deps: [], target: i0.ɵɵFactoryTarget.Component });
6693
+ StatusDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: StatusDisplay, selector: "app-sprstatusdisplay", inputs: { statusAlertType: "statusAlertType", statusMsg: "statusMsg", statusWaiting: "statusWaiting" }, ngImport: i0, template: `
6622
6694
  <p matTooltip="Status">
6623
6695
  <mat-progress-spinner *ngIf="statusWaiting" color="black" mode="indeterminate" [diameter]="30" [strokeWidth]="5"></mat-progress-spinner><mat-icon *ngIf="statusAlertType==='error'" style="color:red">report_problem</mat-icon>
6624
6696
  {{statusMsg}}
6625
6697
  </p>
6626
- `, isInline: true, styles: [":host {\n display: inline;\n text-align: left;\n font-size: smaller;\n }", "\n p {\n padding: 4px;\n white-space:nowrap;\n display: inline-block;\n }\n ", "\n mat-progress-spinner {\n color: black;\n display: inline-block;\n }\n ", "\n span {\n color: red;\n }\n "], components: [{ type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6627
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: StatusDisplay, decorators: [{
6698
+ `, isInline: true, styles: [":host{display:inline;text-align:left;font-size:smaller}\n", "p{padding:4px;white-space:nowrap;display:inline-block}\n", "mat-progress-spinner{color:#000;display:inline-block}\n", "span{color:red}\n"], components: [{ type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
6699
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: StatusDisplay, decorators: [{
6628
6700
  type: Component,
6629
6701
  args: [{
6630
6702
  selector: 'app-sprstatusdisplay',
@@ -6709,11 +6781,11 @@ class UploadStatus {
6709
6781
  return this._status;
6710
6782
  }
6711
6783
  }
6712
- UploadStatus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: UploadStatus, deps: [], target: i0.ɵɵFactoryTarget.Component });
6713
- UploadStatus.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: UploadStatus, selector: "app-uploadstatus", inputs: { value: "value", awaitNewUpload: "awaitNewUpload", status: "status" }, ngImport: i0, template: `
6784
+ UploadStatus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: UploadStatus, deps: [], target: i0.ɵɵFactoryTarget.Component });
6785
+ UploadStatus.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: UploadStatus, selector: "app-uploadstatus", inputs: { value: "value", awaitNewUpload: "awaitNewUpload", status: "status" }, ngImport: i0, template: `
6714
6786
  <mat-progress-spinner [mode]="spinnerMode" [color]="status" [diameter]="30" [strokeWidth]="5" [value]="_value" [matTooltip]="toolTipText"></mat-progress-spinner>
6715
- `, isInline: true, styles: [":host {\n flex: 1;\n /* align-self: flex-start; */\n /*display: inline; */\n text-align: left;\n }", "mat-progress-spinner{\n display: inline-block;\n }"], components: [{ type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
6716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: UploadStatus, decorators: [{
6787
+ `, isInline: true, styles: [":host{flex:1;text-align:left}\n", "mat-progress-spinner{display:inline-block}\n"], components: [{ type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
6788
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: UploadStatus, decorators: [{
6717
6789
  type: Component,
6718
6790
  args: [{
6719
6791
  selector: 'app-uploadstatus',
@@ -6741,11 +6813,11 @@ class ProgressDisplay {
6741
6813
  this.progressMsg = '[itemcode]';
6742
6814
  }
6743
6815
  }
6744
- ProgressDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ProgressDisplay, deps: [], target: i0.ɵɵFactoryTarget.Component });
6745
- ProgressDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ProgressDisplay, selector: "app-sprprogressdisplay", ngImport: i0, template: `
6816
+ ProgressDisplay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ProgressDisplay, deps: [], target: i0.ɵɵFactoryTarget.Component });
6817
+ ProgressDisplay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: ProgressDisplay, selector: "app-sprprogressdisplay", ngImport: i0, template: `
6746
6818
  <p>{{progressMsg}}</p>
6747
- `, isInline: true, styles: [":host {\n flex: 1;\n /* align-self: flex-start; */\n /*display: inline; */\n width: 100%;\n text-align: left;\n }"] });
6748
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ProgressDisplay, decorators: [{
6819
+ `, isInline: true, styles: [":host{flex:1;width:100%;text-align:left}\n"] });
6820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ProgressDisplay, decorators: [{
6749
6821
  type: Component,
6750
6822
  args: [{
6751
6823
  selector: 'app-sprprogressdisplay',
@@ -6775,6 +6847,7 @@ class TransportActions {
6775
6847
  class TransportPanel {
6776
6848
  constructor() {
6777
6849
  this.navigationEnabled = true;
6850
+ this.pausingEnabled = true;
6778
6851
  }
6779
6852
  startDisabled() {
6780
6853
  return !this.actions || this.readonly || this.actions.startAction.disabled;
@@ -6786,7 +6859,7 @@ class TransportPanel {
6786
6859
  return !this.actions || this.actions.nextAction.disabled || !this.navigationEnabled;
6787
6860
  }
6788
6861
  pauseDisabled() {
6789
- return !this.actions || this.actions.pauseAction.disabled;
6862
+ return !this.actions || this.actions.pauseAction.disabled || !this.pausingEnabled;
6790
6863
  }
6791
6864
  fwdDisabled() {
6792
6865
  return !this.actions || this.actions.fwdAction.disabled || !this.navigationEnabled;
@@ -6844,8 +6917,8 @@ class TransportPanel {
6844
6917
  }
6845
6918
  }
6846
6919
  }
6847
- TransportPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: TransportPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
6848
- TransportPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: TransportPanel, selector: "app-sprtransport", inputs: { readonly: "readonly", actions: "actions", navigationEnabled: "navigationEnabled" }, ngImport: i0, template: `
6920
+ TransportPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: TransportPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
6921
+ TransportPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: TransportPanel, selector: "app-sprtransport", inputs: { readonly: "readonly", actions: "actions", navigationEnabled: "navigationEnabled", pausingEnabled: "pausingEnabled" }, ngImport: i0, template: `
6849
6922
  <button id="bwdBtn" *ngIf="navigationEnabled" (click)="actions.bwdAction.perform()" [disabled]="bwdDisabled()"
6850
6923
  mat-raised-button>
6851
6924
  <mat-icon>chevron_left</mat-icon>
@@ -6854,7 +6927,7 @@ TransportPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
6854
6927
  <mat-icon [style.color]="startStopNextIconColor()">{{startStopNextIconName()}}</mat-icon><mat-icon *ngIf="!nextDisabled()" [style.color]="nextDisabled() ? 'grey' : 'black'">chevron_right</mat-icon>
6855
6928
  <span fxShow.xs="false">{{startStopNextName()}}</span>
6856
6929
  </button>
6857
- <button (click)="actions.pauseAction.perform()" [disabled]="pauseDisabled()" mat-raised-button>
6930
+ <button *ngIf="pausingEnabled" (click)="actions.pauseAction.perform()" [disabled]="pauseDisabled()" mat-raised-button>
6858
6931
  <mat-icon>pause</mat-icon>
6859
6932
  <span fxShow.xs="false">Pause</span>
6860
6933
  </button>
@@ -6865,8 +6938,8 @@ TransportPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
6865
6938
  <mat-icon>chevron_right</mat-icon>
6866
6939
  </button>
6867
6940
 
6868
- `, isInline: true, styles: [":host {\n flex: 20;\n align-self: center;\n width: 100%;\n text-align: center;\n align-content: center;\n margin: 0;\n\n }", "\n div {\n display: inline;\n flex: 0;\n }"], components: [{ 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: 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"] }] });
6869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: TransportPanel, decorators: [{
6941
+ `, isInline: true, styles: [":host{flex:20;align-self:center;width:100%;text-align:center;align-content:center;margin:0}\n", "div{display:inline;flex:0}\n"], components: [{ 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: 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"] }] });
6942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: TransportPanel, decorators: [{
6870
6943
  type: Component,
6871
6944
  args: [{
6872
6945
  selector: 'app-sprtransport',
@@ -6879,7 +6952,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
6879
6952
  <mat-icon [style.color]="startStopNextIconColor()">{{startStopNextIconName()}}</mat-icon><mat-icon *ngIf="!nextDisabled()" [style.color]="nextDisabled() ? 'grey' : 'black'">chevron_right</mat-icon>
6880
6953
  <span fxShow.xs="false">{{startStopNextName()}}</span>
6881
6954
  </button>
6882
- <button (click)="actions.pauseAction.perform()" [disabled]="pauseDisabled()" mat-raised-button>
6955
+ <button *ngIf="pausingEnabled" (click)="actions.pauseAction.perform()" [disabled]="pauseDisabled()" mat-raised-button>
6883
6956
  <mat-icon>pause</mat-icon>
6884
6957
  <span fxShow.xs="false">Pause</span>
6885
6958
  </button>
@@ -6912,6 +6985,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
6912
6985
  type: Input
6913
6986
  }], navigationEnabled: [{
6914
6987
  type: Input
6988
+ }], pausingEnabled: [{
6989
+ type: Input
6915
6990
  }] } });
6916
6991
  class ReadyStateIndicator {
6917
6992
  constructor() {
@@ -6928,11 +7003,11 @@ class ReadyStateIndicator {
6928
7003
  return this._ready;
6929
7004
  }
6930
7005
  }
6931
- ReadyStateIndicator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ReadyStateIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
6932
- ReadyStateIndicator.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ReadyStateIndicator, selector: "app-readystateindicator", inputs: { ready: "ready" }, ngImport: i0, template: `
7006
+ ReadyStateIndicator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ReadyStateIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component });
7007
+ ReadyStateIndicator.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: ReadyStateIndicator, selector: "app-readystateindicator", inputs: { ready: "ready" }, ngImport: i0, template: `
6933
7008
  <mat-icon [matTooltip]="readyStateToolTip">{{hourGlassIconName}}</mat-icon>
6934
7009
  `, isInline: true, components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
6935
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ReadyStateIndicator, decorators: [{
7010
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ReadyStateIndicator, decorators: [{
6936
7011
  type: Component,
6937
7012
  args: [{
6938
7013
  selector: 'app-readystateindicator',
@@ -6958,8 +7033,8 @@ class ControlPanel {
6958
7033
  return this._ready;
6959
7034
  }
6960
7035
  }
6961
- ControlPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ControlPanel, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
6962
- ControlPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ControlPanel, selector: "app-sprcontrolpanel", inputs: { readonly: "readonly", transportActions: "transportActions", processing: "processing", statusMsg: "statusMsg", statusAlertType: "statusAlertType", statusWaiting: "statusWaiting", uploadStatus: "uploadStatus", uploadProgress: "uploadProgress", currentRecording: "currentRecording", enableUploadRecordings: "enableUploadRecordings", navigationEnabled: "navigationEnabled", ready: "ready" }, viewQueries: [{ propertyName: "statusDisplay", first: true, predicate: StatusDisplay, descendants: true, static: true }, { propertyName: "transportPanel", first: true, predicate: TransportPanel, descendants: true, static: true }], ngImport: i0, template: `
7036
+ ControlPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ControlPanel, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
7037
+ ControlPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: ControlPanel, selector: "app-sprcontrolpanel", inputs: { readonly: "readonly", transportActions: "transportActions", processing: "processing", statusMsg: "statusMsg", statusAlertType: "statusAlertType", statusWaiting: "statusWaiting", uploadStatus: "uploadStatus", uploadProgress: "uploadProgress", currentRecording: "currentRecording", enableUploadRecordings: "enableUploadRecordings", navigationEnabled: "navigationEnabled", ready: "ready" }, viewQueries: [{ propertyName: "statusDisplay", first: true, predicate: StatusDisplay, descendants: true, static: true }, { propertyName: "transportPanel", first: true, predicate: TransportPanel, descendants: true, static: true }], ngImport: i0, template: `
6963
7038
  <div fxHide.xs fxLayout="row" >
6964
7039
  <app-sprstatusdisplay fxFlex="0 0 0" [statusMsg]="statusMsg" [statusAlertType]="statusAlertType" [statusWaiting]="statusWaiting"
6965
7040
  class="hidden-xs"></app-sprstatusdisplay>
@@ -6979,8 +7054,8 @@ ControlPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
6979
7054
  <app-sprtransport [readonly]="readonly" [actions]="transportActions" [navigationEnabled]="navigationEnabled"></app-sprtransport>
6980
7055
 
6981
7056
  </div>
6982
- `, isInline: true, styles: ["div {\n align-content: center;\n align-items: center;\n margin: 0;\n padding: 20px;\n min-height: min-content; /* important */\n }"], components: [{ type: StatusDisplay, selector: "app-sprstatusdisplay", inputs: ["statusAlertType", "statusMsg", "statusWaiting"] }, { type: TransportPanel, selector: "app-sprtransport", inputs: ["readonly", "actions", "navigationEnabled"] }, { type: UploadStatus, selector: "app-uploadstatus", inputs: ["value", "awaitNewUpload", "status"] }, { type: ReadyStateIndicator, selector: "app-readystateindicator", inputs: ["ready"] }], directives: [{ 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"] }, { 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: 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: i8.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { type: i8.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }] });
6983
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ControlPanel, decorators: [{
7057
+ `, isInline: true, styles: ["div{align-content:center;align-items:center;margin:0;padding:20px;min-height:-webkit-min-content;min-height:min-content}\n"], components: [{ type: StatusDisplay, selector: "app-sprstatusdisplay", inputs: ["statusAlertType", "statusMsg", "statusWaiting"] }, { type: TransportPanel, selector: "app-sprtransport", inputs: ["readonly", "actions", "navigationEnabled", "pausingEnabled"] }, { type: UploadStatus, selector: "app-uploadstatus", inputs: ["value", "awaitNewUpload", "status"] }, { type: ReadyStateIndicator, selector: "app-readystateindicator", inputs: ["ready"] }], directives: [{ 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"] }, { 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: 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: i8.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { type: i8.DefaultFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }] });
7058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ControlPanel, decorators: [{
6984
7059
  type: Component,
6985
7060
  args: [{
6986
7061
  selector: 'app-sprcontrolpanel',
@@ -7054,8 +7129,8 @@ class SessionFinishedDialog {
7054
7129
  this.dialogRef.close();
7055
7130
  }
7056
7131
  }
7057
- SessionFinishedDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SessionFinishedDialog, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
7058
- SessionFinishedDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SessionFinishedDialog, selector: "spr-session-finished-dialog", ngImport: i0, template: `<h1 mat-dialog-title><mat-icon [style.color]="'green'">done_all</mat-icon> Session finished</h1>
7132
+ SessionFinishedDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SessionFinishedDialog, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
7133
+ SessionFinishedDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: SessionFinishedDialog, selector: "spr-session-finished-dialog", ngImport: i0, template: `<h1 mat-dialog-title><mat-icon [style.color]="'green'">done_all</mat-icon> Session finished</h1>
7059
7134
  <div mat-dialog-content>
7060
7135
 
7061
7136
  <p>Thank you! The recording session is complete.</p>
@@ -7065,7 +7140,7 @@ SessionFinishedDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
7065
7140
  <button mat-button (click)="closeDialog()">OK</button>
7066
7141
  </div>
7067
7142
  `, isInline: true, components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }], directives: [{ type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
7068
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SessionFinishedDialog, decorators: [{
7143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SessionFinishedDialog, decorators: [{
7069
7144
  type: Component,
7070
7145
  args: [{
7071
7146
  selector: 'spr-session-finished-dialog',
@@ -7094,8 +7169,8 @@ class MessageDialog {
7094
7169
  this.dialogRef.close();
7095
7170
  }
7096
7171
  }
7097
- MessageDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MessageDialog, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
7098
- MessageDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: MessageDialog, selector: "msg-dialog", ngImport: i0, template: `<h1 mat-dialog-title><mat-icon *ngIf="data.type==='error'" [style.color]="'red'">error</mat-icon>
7172
+ MessageDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: MessageDialog, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
7173
+ MessageDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: MessageDialog, selector: "msg-dialog", ngImport: i0, template: `<h1 mat-dialog-title><mat-icon *ngIf="data.type==='error'" [style.color]="'red'">error</mat-icon>
7099
7174
  <mat-icon *ngIf="data.type==='warning'" [style.color]="'yellow'">warning</mat-icon>{{data.title}}</h1>
7100
7175
  <div mat-dialog-content>
7101
7176
 
@@ -7107,7 +7182,7 @@ MessageDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
7107
7182
  <button mat-button (click)="closeDialog()">OK</button>
7108
7183
  </div>
7109
7184
  `, isInline: true, components: [{ type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { 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"] }], directives: [{ type: i1$3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
7110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MessageDialog, decorators: [{
7185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: MessageDialog, decorators: [{
7111
7186
  type: Component,
7112
7187
  args: [{
7113
7188
  selector: 'msg-dialog',
@@ -7146,7 +7221,7 @@ class AudioContextProvider {
7146
7221
  }
7147
7222
  AudioContextProvider._audioContext = null;
7148
7223
 
7149
- class Item {
7224
+ class Item$1 {
7150
7225
  constructor(_promptAsString, _training, _recording) {
7151
7226
  this._promptAsString = _promptAsString;
7152
7227
  this._training = _training;
@@ -7186,15 +7261,26 @@ class RecordingService {
7186
7261
  this.withCredentials = config.withCredentials;
7187
7262
  }
7188
7263
  }
7189
- recFilesUrl(projectName, sessId) {
7264
+ recordingFilesUrl() {
7265
+ let recFilesUrl = this.apiEndPoint + RecordingService.RECORDING_API_CTX;
7266
+ return recFilesUrl;
7267
+ }
7268
+ sessionRecordingFilesUrl(projectName, sessId) {
7269
+ let encPrjName = encodeURIComponent(projectName);
7270
+ let encSessId = encodeURIComponent(sessId);
7271
+ let recFilesUrl = this.apiEndPoint + ProjectService.PROJECT_API_CTX + '/' + encPrjName + '/' +
7272
+ SessionService.SESSION_API_CTX + '/' + encSessId + '/' + RecordingService.RECORDING_API_CTX;
7273
+ return recFilesUrl;
7274
+ }
7275
+ sessionRecFilesUrl(projectName, sessId) {
7190
7276
  let encPrjName = encodeURIComponent(projectName);
7191
7277
  let encSessId = encodeURIComponent(sessId);
7192
7278
  let recFilesUrl = this.apiEndPoint + ProjectService.PROJECT_API_CTX + '/' + encPrjName + '/' +
7193
7279
  SessionService.SESSION_API_CTX + '/' + encSessId + '/' + RecordingService.REC_API_CTX;
7194
7280
  return recFilesUrl;
7195
7281
  }
7196
- recFilesReqUrl(projectName, sessId) {
7197
- let recFilesUrl = this.recFilesUrl(projectName, sessId);
7282
+ sessionRecFilesReqUrl(projectName, sessId) {
7283
+ let recFilesUrl = this.sessionRecFilesUrl(projectName, sessId);
7198
7284
  if (this.config && this.config.apiType === ApiType.FILES) {
7199
7285
  // for development and demo
7200
7286
  // append UUID to make request URL unique to avoid localhost server caching
@@ -7203,37 +7289,98 @@ class RecordingService {
7203
7289
  return recFilesUrl;
7204
7290
  }
7205
7291
  recordingFileDescrList(projectName, sessId) {
7206
- let recFilesReqUrl = this.recFilesReqUrl(projectName, sessId);
7292
+ let recFilesReqUrl = this.sessionRecFilesReqUrl(projectName, sessId);
7207
7293
  let wobs = this.http.get(recFilesReqUrl, { withCredentials: this.withCredentials });
7208
7294
  return wobs;
7209
7295
  }
7210
7296
  recordingFileList(projectName, sessId) {
7211
- let recFilesReqUrl = this.recFilesReqUrl(projectName, sessId);
7297
+ let recFilesReqUrl = this.sessionRecFilesReqUrl(projectName, sessId);
7212
7298
  let wobs = this.http.get(recFilesReqUrl, { withCredentials: this.withCredentials });
7213
7299
  return wobs;
7214
7300
  }
7215
- fetchAudiofile(projectName, sessId, itemcode, version) {
7216
- let recFilesUrl = this.recFilesUrl(projectName, sessId);
7217
- let encItemcode = encodeURIComponent(itemcode);
7218
- let recUrl = recFilesUrl + '/' + encItemcode + '/' + version;
7301
+ sprRecordingFileList(projectName, sessId) {
7302
+ let recFilesReqUrl = this.sessionRecFilesReqUrl(projectName, sessId);
7303
+ let wobs = this.http.get(recFilesReqUrl, { withCredentials: this.withCredentials });
7304
+ return wobs;
7305
+ }
7306
+ audioRequest(audioUrl) {
7219
7307
  if (this.config && this.config.apiType === ApiType.FILES) {
7220
7308
  // for development and demo
7221
7309
  // append UUID to make request URL unique to avoid localhost server caching
7222
- recUrl = recUrl + '.wav?requestUUID=' + UUID.generate();
7310
+ audioUrl = audioUrl + '.wav?requestUUID=' + UUID.generate();
7223
7311
  }
7224
7312
  let headers = new HttpHeaders();
7225
7313
  headers = headers.set('Accept', 'audio/wav');
7226
- return this.http.get(recUrl, {
7314
+ return this.http.get(audioUrl, {
7227
7315
  headers: headers,
7228
7316
  observe: 'response',
7229
7317
  responseType: 'arraybuffer',
7230
7318
  withCredentials: this.withCredentials
7231
7319
  });
7232
7320
  }
7321
+ fetchAudiofile(projectName, sessId, recFileId) {
7322
+ let recFilesUrl = this.sessionRecordingFilesUrl(projectName, sessId);
7323
+ let encRecFileId = encodeURIComponent(recFileId);
7324
+ let recUrl = recFilesUrl + '/' + encRecFileId;
7325
+ return this.audioRequest(recUrl);
7326
+ }
7327
+ fetchSprAudiofile(projectName, sessId, itemcode, version) {
7328
+ let recFilesUrl = this.sessionRecFilesUrl(projectName, sessId);
7329
+ let encItemcode = encodeURIComponent(itemcode);
7330
+ let recUrl = recFilesUrl + '/' + encItemcode + '/' + version;
7331
+ return this.audioRequest(recUrl);
7332
+ }
7233
7333
  fetchAndApplyRecordingFile(aCtx, projectName, recordingFile) {
7334
+ let wobs = new Observable(observer => {
7335
+ if (recordingFile.session && recordingFile.recordingFileId) {
7336
+ let obs = this.fetchAudiofile(projectName, recordingFile.session, recordingFile.recordingFileId);
7337
+ obs.subscribe(resp => {
7338
+ //console.log("Fetched audio file. HTTP response status: "+resp.status+", type: "+resp.type+", byte length: "+ resp.body.byteLength);
7339
+ // Do not use Promise version, which does not work with Safari 13 (13.0.5)
7340
+ if (resp.body) {
7341
+ aCtx.decodeAudioData(resp.body, ab => {
7342
+ recordingFile.audioBuffer = ab;
7343
+ if (this.debugDelay > 0) {
7344
+ window.setTimeout(() => {
7345
+ observer.next(recordingFile);
7346
+ observer.complete();
7347
+ }, this.debugDelay);
7348
+ }
7349
+ else {
7350
+ observer.next(recordingFile);
7351
+ observer.complete();
7352
+ }
7353
+ }, error => {
7354
+ observer.error(error);
7355
+ observer.complete();
7356
+ });
7357
+ }
7358
+ else {
7359
+ observer.error('Fetching audio file: response has no body');
7360
+ }
7361
+ }, (error) => {
7362
+ if (error.status == 404) {
7363
+ // Interpret not as an error, the file ist not recorded yet
7364
+ observer.next(null);
7365
+ observer.complete();
7366
+ }
7367
+ else {
7368
+ // all other states are errors
7369
+ observer.error(error);
7370
+ observer.complete();
7371
+ }
7372
+ });
7373
+ }
7374
+ else {
7375
+ observer.error();
7376
+ }
7377
+ });
7378
+ return wobs;
7379
+ }
7380
+ fetchAndApplySprRecordingFile(aCtx, projectName, recordingFile) {
7234
7381
  let wobs = new Observable(observer => {
7235
7382
  if (recordingFile.session) {
7236
- let obs = this.fetchAudiofile(projectName, recordingFile.session, recordingFile.itemCode, recordingFile.version);
7383
+ let obs = this.fetchSprAudiofile(projectName, recordingFile.session, recordingFile.itemCode, recordingFile.version);
7237
7384
  obs.subscribe(resp => {
7238
7385
  //console.log("Fetched audio file. HTTP response status: "+resp.status+", type: "+resp.type+", byte length: "+ resp.body.byteLength);
7239
7386
  // Do not use Promise version, which does not work with Safari 13 (13.0.5)
@@ -7279,12 +7426,12 @@ class RecordingService {
7279
7426
  }
7280
7427
  fetchRecordingFile(aCtx, projectName, sessId, itemcode, version) {
7281
7428
  let wobs = new Observable(observer => {
7282
- let obs = this.fetchAudiofile(projectName, sessId, itemcode, version);
7429
+ let obs = this.fetchSprAudiofile(projectName, sessId, itemcode, version);
7283
7430
  obs.subscribe(resp => {
7284
7431
  // Do not use Promise version, which does not work with Safari 13
7285
7432
  if (resp.body) {
7286
7433
  aCtx.decodeAudioData(resp.body, ab => {
7287
- let rf = new RecordingFile(sessId, itemcode, version, ab);
7434
+ let rf = new SprRecordingFile(sessId, itemcode, version, ab);
7288
7435
  if (this.debugDelay > 0) {
7289
7436
  window.setTimeout(() => {
7290
7437
  observer.next(rf);
@@ -7317,9 +7464,10 @@ class RecordingService {
7317
7464
  }
7318
7465
  }
7319
7466
  RecordingService.REC_API_CTX = 'recfile';
7320
- RecordingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
7321
- RecordingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingService });
7322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingService, decorators: [{
7467
+ RecordingService.RECORDING_API_CTX = 'recordingfile';
7468
+ RecordingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
7469
+ RecordingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingService });
7470
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingService, decorators: [{
7323
7471
  type: Injectable
7324
7472
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: SpeechRecorderConfig, decorators: [{
7325
7473
  type: Inject,
@@ -7333,9 +7481,9 @@ class SpeechRecorderUploader extends Uploader {
7333
7481
  this.config = config;
7334
7482
  }
7335
7483
  }
7336
- SpeechRecorderUploader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechRecorderUploader, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
7337
- SpeechRecorderUploader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechRecorderUploader });
7338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechRecorderUploader, decorators: [{
7484
+ SpeechRecorderUploader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechRecorderUploader, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
7485
+ SpeechRecorderUploader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechRecorderUploader });
7486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechRecorderUploader, decorators: [{
7339
7487
  type: Injectable
7340
7488
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: SpeechRecorderConfig, decorators: [{
7341
7489
  type: Inject,
@@ -7355,12 +7503,12 @@ class WarningBar {
7355
7503
  }
7356
7504
  }
7357
7505
  }
7358
- WarningBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: WarningBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
7359
- WarningBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: WarningBar, selector: "app-warningbar", inputs: { warningText: "warningText", show: "show" }, providers: [SessionService], ngImport: i0, template: `
7506
+ WarningBar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: WarningBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
7507
+ WarningBar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: WarningBar, selector: "app-warningbar", inputs: { warningText: "warningText", show: "show" }, providers: [SessionService], ngImport: i0, template: `
7360
7508
  <div [class]="displayClass">{{warningText}}</div>
7361
7509
 
7362
- `, isInline: true, styles: [":host {\n\n flex: 0 0 content;\n background: orange;\n\n }", "\n .off {\n display: none;\n }\n ", "\n .on {\n padding: 2px;\n display: inline-block;\n width: 100%;\n font-weight: bold;\n font-size: larger;\n text-align: center;\n }\n "] });
7363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: WarningBar, decorators: [{
7510
+ `, isInline: true, styles: [":host{flex:0 0 content;background:orange}\n", ".off{display:none}\n", ".on{padding:2px;display:inline-block;width:100%;font-weight:700;font-size:larger;text-align:center}\n"] });
7511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: WarningBar, decorators: [{
7364
7512
  type: Component,
7365
7513
  args: [{
7366
7514
  selector: 'app-warningbar',
@@ -7396,11 +7544,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
7396
7544
  }] } });
7397
7545
 
7398
7546
  const FORCE_REQUEST_AUDIO_PERMISSIONS = false;
7399
- const RECFILE_API_CTX = 'recfile';
7400
- const MAX_RECORDING_TIME_MS = 1000 * 60 * 60 * 60; // 1 hour
7547
+ const RECFILE_API_CTX$1 = 'recfile';
7548
+ const MAX_RECORDING_TIME_MS$1 = 1000 * 60 * 60 * 60; // 1 hour
7401
7549
  const DEFAULT_PRE_REC_DELAY = 1000;
7402
7550
  const DEFAULT_POST_REC_DELAY = 500;
7403
- const LEVEL_BAR_INTERVALL_SECONDS = 0.1; // 100ms
7551
+ const LEVEL_BAR_INTERVALL_SECONDS$1 = 0.1; // 100ms
7404
7552
  // TODO enum not possible in template language , use string for now
7405
7553
  //export enum StatusAlertType {INFO,WARN,ERROR};
7406
7554
  class SessionManager {
@@ -7486,7 +7634,10 @@ class SessionManager {
7486
7634
  }
7487
7635
  catch (err) {
7488
7636
  this.status = 8 /* ERROR */;
7489
- let errMsg = err.message;
7637
+ let errMsg = 'Unknown error';
7638
+ if (err instanceof Error) {
7639
+ errMsg = err.message;
7640
+ }
7490
7641
  this.statusMsg = 'ERROR: ' + errMsg;
7491
7642
  this.statusAlertType = 'error';
7492
7643
  this.dialog.open(MessageDialog, {
@@ -7525,7 +7676,7 @@ class SessionManager {
7525
7676
  if (this.ac) {
7526
7677
  this.transportActions.startAction.onAction = () => this.startItem();
7527
7678
  this.ac.listener = this;
7528
- this.ac.audioOutStream = new SequenceAudioFloat32ChunkerOutStream(this.streamLevelMeasure, LEVEL_BAR_INTERVALL_SECONDS);
7679
+ this.ac.audioOutStream = new SequenceAudioFloat32ChunkerOutStream(this.streamLevelMeasure, LEVEL_BAR_INTERVALL_SECONDS$1);
7529
7680
  // Don't list the devices here. If we do not have audio permissions we only get anonymized devices without labels.
7530
7681
  //this.ac.listDevices();
7531
7682
  }
@@ -7721,7 +7872,7 @@ class SessionManager {
7721
7872
  for (let piSectIdx = 0; piSectIdx < pisLen; piSectIdx++) {
7722
7873
  let pi = pis[piSectIdx];
7723
7874
  let promptAsStr = PromptitemUtil.toPlainTextString(pi);
7724
- let it = new Item(promptAsStr, section.training, (!pi.type || pi.type === 'recording'));
7875
+ let it = new Item$1(promptAsStr, section.training, (!pi.type || pi.type === 'recording'));
7725
7876
  this.items.push(it);
7726
7877
  ln++;
7727
7878
  }
@@ -7800,7 +7951,7 @@ class SessionManager {
7800
7951
  this.controlAudioPlayer.audioClip = null;
7801
7952
  if (this._controlAudioPlayer && this._session) {
7802
7953
  //... and try to fetch from server
7803
- this.audioFetchSubscription = this.recFileService.fetchAndApplyRecordingFile(this._controlAudioPlayer.context, this._session.project, this._displayRecFile).subscribe((rf) => {
7954
+ this.audioFetchSubscription = this.recFileService.fetchAndApplySprRecordingFile(this._controlAudioPlayer.context, this._session.project, this._displayRecFile).subscribe((rf) => {
7804
7955
  let fab = null;
7805
7956
  if (rf && this._displayRecFile) {
7806
7957
  fab = this._displayRecFile.audioBuffer;
@@ -7837,7 +7988,7 @@ class SessionManager {
7837
7988
  showRecording() {
7838
7989
  this.controlAudioPlayer.stop();
7839
7990
  if (this.displayAudioClip) {
7840
- this.levelMeasure.calcBufferLevelInfos(this.displayAudioClip.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
7991
+ this.levelMeasure.calcBufferLevelInfos(this.displayAudioClip.buffer, LEVEL_BAR_INTERVALL_SECONDS$1).then((levelInfos) => {
7841
7992
  this.displayLevelInfos = levelInfos;
7842
7993
  this.changeDetectorRef.detectChanges();
7843
7994
  });
@@ -8227,7 +8378,7 @@ class SessionManager {
8227
8378
  if (this.promptItem.postrecording) {
8228
8379
  postDelay = this.promptItem.postrecording;
8229
8380
  }
8230
- let maxRecordingTimeMs = MAX_RECORDING_TIME_MS;
8381
+ let maxRecordingTimeMs = MAX_RECORDING_TIME_MS$1;
8231
8382
  if (this.promptItem.recduration) {
8232
8383
  maxRecordingTimeMs = preDelay + this.promptItem.recduration + postDelay;
8233
8384
  }
@@ -8319,7 +8470,7 @@ class SessionManager {
8319
8470
  if (!it.recs) {
8320
8471
  it.recs = new Array();
8321
8472
  }
8322
- let rf = new RecordingFile(this._session.sessionId, rfd.recording.itemcode, rfd.version, null);
8473
+ let rf = new SprRecordingFile(this._session.sessionId, rfd.recording.itemcode, rfd.version, null);
8323
8474
  it.recs[rfd.version] = rf;
8324
8475
  }
8325
8476
  else {
@@ -8355,7 +8506,7 @@ class SessionManager {
8355
8506
  if (!it.recs) {
8356
8507
  it.recs = new Array();
8357
8508
  }
8358
- rf = new RecordingFile(sessId, ic, it.recs.length, ad);
8509
+ rf = new SprRecordingFile(sessId, ic, it.recs.length, ad);
8359
8510
  it.recs.push(rf);
8360
8511
  }
8361
8512
  if (this.enableUploadRecordings) {
@@ -8376,7 +8527,7 @@ class SessionManager {
8376
8527
  apiEndPoint = apiEndPoint + '/';
8377
8528
  }
8378
8529
  let sessionsUrl = apiEndPoint + SessionService.SESSION_API_CTX;
8379
- let recUrl = sessionsUrl + '/' + rf.session + '/' + RECFILE_API_CTX + '/' + rf.itemCode;
8530
+ let recUrl = sessionsUrl + '/' + rf.session + '/' + RECFILE_API_CTX$1 + '/' + rf.itemCode;
8380
8531
  ww.writeAsync(ad, (wavFile) => {
8381
8532
  this.postRecording(wavFile, recUrl);
8382
8533
  this.processingRecording = false;
@@ -8485,8 +8636,8 @@ class SessionManager {
8485
8636
  });
8486
8637
  }
8487
8638
  }
8488
- SessionManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SessionManager, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i1$3.MatDialog }, { token: SessionService }, { token: RecordingService }, { token: SpeechRecorderUploader }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
8489
- SessionManager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SessionManager, selector: "app-sprrecordingsession", inputs: { projectName: "projectName", dataSaved: "dataSaved" }, host: { listeners: { "window:keypress": "onKeyPress($event)", "window:keydown": "onKeyDown($event)" } }, providers: [SessionService], viewQueries: [{ propertyName: "prompting", first: true, predicate: Prompting, descendants: true, static: true }, { propertyName: "liveLevelDisplay", first: true, predicate: LevelBar, descendants: true, static: true }], ngImport: i0, template: `
8639
+ SessionManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SessionManager, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i1$3.MatDialog }, { token: SessionService }, { token: RecordingService }, { token: SpeechRecorderUploader }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
8640
+ SessionManager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: SessionManager, selector: "app-sprrecordingsession", inputs: { projectName: "projectName", dataSaved: "dataSaved" }, host: { listeners: { "window:keypress": "onKeyPress($event)", "window:keydown": "onKeyDown($event)" } }, providers: [SessionService], viewQueries: [{ propertyName: "prompting", first: true, predicate: Prompting, descendants: true, static: true }, { propertyName: "liveLevelDisplay", first: true, predicate: LevelBar, descendants: true, static: true }], ngImport: i0, template: `
8490
8641
  <app-warningbar [show]="isTestSession()" warningText="Test recording only!"></app-warningbar>
8491
8642
  <app-warningbar [show]="isDefaultAudioTestSession()" warningText="This test uses default audio device! Regular sessions may require a particular audio device (microphone)!"></app-warningbar>
8492
8643
  <app-sprprompting [projectName]="projectName"
@@ -8531,8 +8682,8 @@ SessionManager.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
8531
8682
  <app-readystateindicator class="ricontrols" fxLayoutAlign="end center" fxHide.xs [ready]="dataSaved && !isActive()"></app-readystateindicator>
8532
8683
  </div>
8533
8684
  </div>
8534
- `, isInline: true, styles: [":host {\n flex: 2;\n background: lightgrey;\n display: flex; /* Vertical flex container: Bottom transport panel, above prompting panel */\n flex-direction: column;\n margin: 0;\n padding: 0;\n min-height: 0px;\n\n /* Prevents horizontal scroll bar on swipe right */\n overflow: hidden;\n }", ".ricontrols {\n padding: 4px;\n box-sizing: border-box;\n height: 100%;\n }", ".dark {\n background: darkgray;\n }", ".controlpanel {\n align-content: center;\n align-items: center;\n margin: 0;\n padding: 20px;\n min-height: min-content; /* important */\n }"], components: [{ type: WarningBar, selector: "app-warningbar", inputs: ["warningText", "show"] }, { type: Prompting, selector: "app-sprprompting", inputs: ["projectName", "startStopSignalState", "promptItem", "showPrompt", "items", "selectedItemIdx", "transportActions", "enableDownload", "audioSignalCollapsed", "displayAudioClip", "playStartAction", "playSelectionAction", "autoPlayOnSelectToggleAction", "playStopAction"], outputs: ["onItemSelect", "onNextItem", "onPrevItem"] }, { type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { 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: TransportPanel, selector: "app-sprtransport", inputs: ["readonly", "actions", "navigationEnabled"] }], directives: [{ 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"] }, { 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: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
8535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SessionManager, decorators: [{
8685
+ `, 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"], components: [{ type: WarningBar, selector: "app-warningbar", inputs: ["warningText", "show"] }, { type: Prompting, selector: "app-sprprompting", inputs: ["projectName", "startStopSignalState", "promptItem", "showPrompt", "items", "selectedItemIdx", "transportActions", "enableDownload", "audioSignalCollapsed", "displayAudioClip", "playStartAction", "playSelectionAction", "autoPlayOnSelectToggleAction", "playStopAction"], outputs: ["onItemSelect", "onNextItem", "onPrevItem"] }, { type: i7.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { 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: TransportPanel, selector: "app-sprtransport", inputs: ["readonly", "actions", "navigationEnabled", "pausingEnabled"] }], directives: [{ 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"] }, { 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: i8.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }] });
8686
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SessionManager, decorators: [{
8536
8687
  type: Component,
8537
8688
  args: [{
8538
8689
  selector: 'app-sprrecordingsession',
@@ -8661,9 +8812,9 @@ class ScriptService {
8661
8812
  return this.http.get(scriptUrl, { withCredentials: this.withCredentials });
8662
8813
  }
8663
8814
  }
8664
- ScriptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ScriptService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
8665
- ScriptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ScriptService });
8666
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ScriptService, decorators: [{
8815
+ ScriptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ScriptService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
8816
+ ScriptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ScriptService });
8817
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ScriptService, decorators: [{
8667
8818
  type: Injectable
8668
8819
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: SpeechRecorderConfig, decorators: [{
8669
8820
  type: Inject,
@@ -8699,9 +8850,13 @@ class SpeechrecorderngComponent {
8699
8850
  this.sm.statusMsg = 'Player initialized.';
8700
8851
  }
8701
8852
  catch (err) {
8702
- this.sm.statusMsg = err.message;
8853
+ let errMsg = 'Unknown error';
8854
+ if (err instanceof Error) {
8855
+ errMsg = err.message;
8856
+ }
8857
+ this.sm.statusMsg = errMsg;
8703
8858
  this.sm.statusAlertType = 'error';
8704
- console.error(err.message);
8859
+ console.error(errMsg);
8705
8860
  }
8706
8861
  }
8707
8862
  ngAfterViewInit() {
@@ -9052,11 +9207,11 @@ class SpeechrecorderngComponent {
9052
9207
  this.sm.statusMsg = 'ERROR: Recording.';
9053
9208
  }
9054
9209
  }
9055
- SpeechrecorderngComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", 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 });
9056
- SpeechrecorderngComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: SpeechrecorderngComponent, selector: "app-speechrecorder", providers: [SessionService], viewQueries: [{ propertyName: "sm", first: true, predicate: SessionManager, descendants: true, static: true }], ngImport: i0, template: `
9210
+ SpeechrecorderngComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", 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 });
9211
+ SpeechrecorderngComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: SpeechrecorderngComponent, selector: "app-speechrecorder", providers: [SessionService], viewQueries: [{ propertyName: "sm", first: true, predicate: SessionManager, descendants: true, static: true }], ngImport: i0, template: `
9057
9212
  <app-sprrecordingsession [projectName]="project?.name" [dataSaved]="dataSaved"></app-sprrecordingsession>
9058
- `, isInline: true, styles: [":host{\n flex: 2;\n display: flex;\n flex-direction: column;\n min-height:0;\n\n }"], components: [{ type: SessionManager, selector: "app-sprrecordingsession", inputs: ["projectName", "dataSaved"] }] });
9059
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechrecorderngComponent, decorators: [{
9213
+ `, isInline: true, styles: [":host{flex:2;display:flex;flex-direction:column;min-height:0}\n"], components: [{ type: SessionManager, selector: "app-sprrecordingsession", inputs: ["projectName", "dataSaved"] }] });
9214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechrecorderngComponent, decorators: [{
9060
9215
  type: Component,
9061
9216
  args: [{
9062
9217
  selector: 'app-speechrecorder',
@@ -9079,9 +9234,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
9079
9234
 
9080
9235
  class ScrollPaneHorizontal {
9081
9236
  }
9082
- ScrollPaneHorizontal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ScrollPaneHorizontal, deps: [], target: i0.ɵɵFactoryTarget.Component });
9083
- ScrollPaneHorizontal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: ScrollPaneHorizontal, selector: "scroll-pane-horizontal", ngImport: i0, template: '', isInline: true, styles: [":host {\n width: 100%;\n background: darkgray;\n box-sizing: border-box;\n height: 100%;\n position: relative;\n overflow-x: scroll;\n overflow-y: auto;\n }"] });
9084
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: ScrollPaneHorizontal, decorators: [{
9237
+ ScrollPaneHorizontal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ScrollPaneHorizontal, deps: [], target: i0.ɵɵFactoryTarget.Component });
9238
+ ScrollPaneHorizontal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: ScrollPaneHorizontal, selector: "scroll-pane-horizontal", ngImport: i0, template: '', isInline: true, styles: [":host{width:100%;background:darkgray;box-sizing:border-box;height:100%;position:relative;overflow-x:scroll;overflow-y:auto}\n"] });
9239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: ScrollPaneHorizontal, decorators: [{
9085
9240
  type: Component,
9086
9241
  args: [{
9087
9242
  selector: 'scroll-pane-horizontal',
@@ -9129,7 +9284,9 @@ class AudioDisplayPlayer {
9129
9284
  }
9130
9285
  }
9131
9286
  catch (err) {
9132
- this.status = err.message;
9287
+ if (err instanceof Error) {
9288
+ this.status = err.message;
9289
+ }
9133
9290
  }
9134
9291
  }
9135
9292
  ngAfterContentInit() {
@@ -9140,9 +9297,9 @@ class AudioDisplayPlayer {
9140
9297
  }
9141
9298
  ngAfterViewInit() {
9142
9299
  if (this.aCtx && this.ap) {
9143
- this.playStartAction.onAction = () => { var _a; return (_a = this.ap) === null || _a === void 0 ? void 0 : _a.start(); };
9144
- this.playSelectionAction.onAction = () => { var _a; return (_a = this.ap) === null || _a === void 0 ? void 0 : _a.startSelected(); };
9145
- this.playStopAction.onAction = () => { var _a; return (_a = this.ap) === null || _a === void 0 ? void 0 : _a.stop(); };
9300
+ this.playStartAction.onAction = () => this.ap?.start();
9301
+ this.playSelectionAction.onAction = () => this.ap?.startSelected();
9302
+ this.playStopAction.onAction = () => this.ap?.stop();
9146
9303
  }
9147
9304
  this.layout();
9148
9305
  let heightListener = new MutationObserver((mrs, mo) => {
@@ -9298,8 +9455,8 @@ class AudioDisplayPlayer {
9298
9455
  this.status = 'ERROR';
9299
9456
  }
9300
9457
  }
9301
- AudioDisplayPlayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplayPlayer, deps: [{ token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
9302
- AudioDisplayPlayer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: AudioDisplayPlayer, selector: "app-audiodisplayplayer", inputs: { playStartAction: "playStartAction", playStopAction: "playStopAction", playSelectionAction: "playSelectionAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction", audioData: "audioData", audioClip: "audioClip" }, viewQueries: [{ propertyName: "audioDisplayScrollPane", first: true, predicate: AudioDisplayScrollPane, descendants: true, static: true }], ngImport: i0, template: `
9458
+ AudioDisplayPlayer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplayPlayer, deps: [{ token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
9459
+ AudioDisplayPlayer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: AudioDisplayPlayer, selector: "app-audiodisplayplayer", inputs: { playStartAction: "playStartAction", playStopAction: "playStopAction", playSelectionAction: "playSelectionAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction", audioData: "audioData", audioClip: "audioClip" }, viewQueries: [{ propertyName: "audioDisplayScrollPane", first: true, predicate: AudioDisplayScrollPane, descendants: true, static: true }], ngImport: i0, template: `
9303
9460
 
9304
9461
  <audio-display-scroll-pane #audioDisplayScrollPane></audio-display-scroll-pane>
9305
9462
 
@@ -9312,8 +9469,8 @@ AudioDisplayPlayer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
9312
9469
  [zoomOutAction]="zoomOutAction"
9313
9470
  [zoomSelectedAction]="zoomSelectedAction"
9314
9471
  [zoomFitToPanelAction]="zoomFitToPanelAction"></audio-display-control><p>{{status}}
9315
- `, isInline: true, styles: [":host {\n display: flex;\n flex-direction: column;\n position: absolute;\n bottom: 0px;\n height: 100%;\n width: 100%;\n overflow: hidden;\n padding: 20px;\n z-index: 5;\n box-sizing: border-box;\n background-color: rgba(0, 0, 0, 0.75)\n }"], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }] });
9316
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: AudioDisplayPlayer, decorators: [{
9472
+ `, isInline: true, styles: [":host{display:flex;flex-direction:column;position:absolute;bottom:0px;height:100%;width:100%;overflow:hidden;padding:20px;z-index:5;box-sizing:border-box;background-color:#000000bf}\n"], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }] });
9473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioDisplayPlayer, decorators: [{
9317
9474
  type: Component,
9318
9475
  args: [{
9319
9476
  selector: 'app-audiodisplayplayer',
@@ -9485,6 +9642,15 @@ class RecordingFileService {
9485
9642
  }
9486
9643
  return this.http.get(recUrl, { withCredentials: this.withCredentials });
9487
9644
  }
9645
+ sprRecordingFileDescrObserver(recordingFileId) {
9646
+ let recUrl = this.recoFileUrl(recordingFileId);
9647
+ if (this.config && this.config.apiType === ApiType.FILES) {
9648
+ // for development and demo
9649
+ // append UUID to make request URL unique to avoid localhost server caching
9650
+ recUrl = recUrl + '.json?requestUUID=' + UUID.generate();
9651
+ }
9652
+ return this.http.get(recUrl, { withCredentials: this.withCredentials });
9653
+ }
9488
9654
  fetchSessionAudiofileById(projectName, sessId, recordingFileId) {
9489
9655
  let recUrl = this.recoFileUrl(recordingFileId);
9490
9656
  // if (this.config && this.config.apiType === ApiType.FILES) {
@@ -9593,6 +9759,57 @@ class RecordingFileService {
9593
9759
  });
9594
9760
  return wobs;
9595
9761
  }
9762
+ fetchSprRecordingFile(aCtx, recordingFileId) {
9763
+ let wobs = new Observable(observer => {
9764
+ let rf = null;
9765
+ let rfDescrObs = this.sprRecordingFileDescrObserver(recordingFileId);
9766
+ rfDescrObs.subscribe(value => {
9767
+ rf = value;
9768
+ }, (error) => {
9769
+ observer.error(error);
9770
+ }, () => {
9771
+ let rfAudioObs = this.fetchAudiofile(recordingFileId);
9772
+ rfAudioObs.subscribe(resp => {
9773
+ // Do not use Promise version, which does not work with Safari 13
9774
+ if (resp.body) {
9775
+ aCtx.decodeAudioData(resp.body, ab => {
9776
+ if (rf) {
9777
+ rf.audioBuffer = ab;
9778
+ }
9779
+ else {
9780
+ observer.error('Recording file object null');
9781
+ }
9782
+ if (this.debugDelay > 0) {
9783
+ window.setTimeout(() => {
9784
+ observer.next(rf);
9785
+ observer.complete();
9786
+ }, this.debugDelay);
9787
+ }
9788
+ else {
9789
+ observer.next(rf);
9790
+ observer.complete();
9791
+ }
9792
+ });
9793
+ }
9794
+ else {
9795
+ observer.error('Received no audio data');
9796
+ }
9797
+ }, (error) => {
9798
+ if (error.status == 404) {
9799
+ // Interpret not as an error, the file ist not recorded yet
9800
+ observer.next(null);
9801
+ observer.complete();
9802
+ }
9803
+ else {
9804
+ // all other states are errors
9805
+ observer.error(error);
9806
+ observer.complete();
9807
+ }
9808
+ });
9809
+ });
9810
+ });
9811
+ return wobs;
9812
+ }
9596
9813
  saveEditSelection(recordingFileId, editSampleRate, editStartFrame, editEndFrame) {
9597
9814
  let recUrl = this.apiEndPoint + RecordingFileService.RECOFILE_API_CTX + '/' + recordingFileId;
9598
9815
  if (this.config && this.config.apiType === ApiType.FILES) {
@@ -9605,9 +9822,9 @@ class RecordingFileService {
9605
9822
  }
9606
9823
  }
9607
9824
  RecordingFileService.RECOFILE_API_CTX = 'recordingfile';
9608
- RecordingFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
9609
- RecordingFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileService });
9610
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileService, decorators: [{
9825
+ RecordingFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileService, deps: [{ token: i1.HttpClient }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable });
9826
+ RecordingFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileService });
9827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileService, decorators: [{
9611
9828
  type: Injectable
9612
9829
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: SpeechRecorderConfig, decorators: [{
9613
9830
  type: Inject,
@@ -9617,35 +9834,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
9617
9834
  class RecordingFileMetaComponent {
9618
9835
  constructor() {
9619
9836
  this.sessionId = null;
9620
- this.recordingFile = null;
9837
+ this._recordingFile = null;
9838
+ this.itemCode = null;
9839
+ this.uuid = null;
9840
+ }
9841
+ get recordingFile() {
9842
+ return this._recordingFile;
9843
+ }
9844
+ set recordingFile(recordingFile) {
9845
+ this._recordingFile = recordingFile;
9846
+ if (this._recordingFile) {
9847
+ this.itemCode = this._recordingFile.itemCode;
9848
+ if (!this.itemCode && this._recordingFile.recording?.itemcode) {
9849
+ this.itemCode = this._recordingFile.recording.itemcode;
9850
+ }
9851
+ if (this.itemCode) {
9852
+ this.uuid = null;
9853
+ console.debug("SprRecordingFile: " + this.itemCode + " UUID: " + this.uuid);
9854
+ }
9855
+ else {
9856
+ this.itemCode = null;
9857
+ this.uuid = this._recordingFile?.uuid;
9858
+ console.debug("RecordingFile: " + this.itemCode + " UUID: " + this.uuid);
9859
+ }
9860
+ }
9861
+ else {
9862
+ this.itemCode = null;
9863
+ this.uuid = null;
9864
+ }
9621
9865
  }
9622
9866
  recordingAsPlainText() {
9623
9867
  let t = null;
9624
- if (this.recordingFile) {
9625
- t = RecordingFileUtil.recordingAsPlainText(this.recordingFile);
9868
+ if (this._recordingFile) {
9869
+ t = RecordingFileUtil.recordingAsPlainText(this._recordingFile);
9626
9870
  }
9627
9871
  return t;
9628
9872
  }
9629
9873
  }
9630
- RecordingFileMetaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileMetaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9631
- RecordingFileMetaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RecordingFileMetaComponent, selector: "app-recording-file-meta", inputs: { sessionId: "sessionId", recordingFile: "recordingFile" }, ngImport: i0, template: `
9874
+ RecordingFileMetaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileMetaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9875
+ RecordingFileMetaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecordingFileMetaComponent, selector: "app-recording-file-meta", inputs: { sessionId: "sessionId", recordingFile: "recordingFile" }, ngImport: i0, template: `
9632
9876
  <mat-card>
9633
9877
  <mat-card-title>Recording file ID: {{recordingFile?.recordingFileId}}</mat-card-title>
9634
9878
  <mat-card-content>
9635
9879
  <table>
9636
- <tr>
9880
+ <tr *ngIf="itemCode">
9637
9881
  <td>Itemcode:</td>
9638
- <td>{{recordingFile?.recording?.itemcode}}</td>
9882
+ <td>{{itemCode}}</td>
9883
+ </tr>
9884
+ <tr *ngIf="uuid && !itemCode">
9885
+ <td>UUID:</td>
9886
+ <td>{{uuid}}</td>
9639
9887
  </tr>
9640
- <tr *ngIf="recordingFile?.date">
9888
+ <tr *ngIf="recordingFile?.startedDate">
9889
+ <td>Started:</td>
9890
+ <td>{{recordingFile?.startedDate}}</td>
9891
+ </tr>
9892
+ <tr *ngIf="!recordingFile?.startedDate && recordingFile?.date">
9641
9893
  <td>Date:</td>
9642
9894
  <td>{{recordingFile?.date}}</td>
9643
9895
  </tr>
9644
- <tr>
9896
+ <tr *ngIf="itemCode">
9645
9897
  <td>Prompt:</td>
9646
9898
  <td>{{recordingAsPlainText()}}</td>
9647
9899
  </tr>
9648
-
9900
+
9649
9901
  <tr *ngIf="sessionId">
9650
9902
  <td>Session:</td>
9651
9903
  <td>{{sessionId}}</td>
@@ -9654,7 +9906,7 @@ RecordingFileMetaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
9654
9906
  </mat-card-content>
9655
9907
  </mat-card>
9656
9908
  `, isInline: true, components: [{ type: i1$4.MatCard, selector: "mat-card", exportAs: ["matCard"] }], directives: [{ type: i1$4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i1$4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
9657
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileMetaComponent, decorators: [{
9909
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileMetaComponent, decorators: [{
9658
9910
  type: Component,
9659
9911
  args: [{
9660
9912
  selector: 'app-recording-file-meta',
@@ -9663,19 +9915,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
9663
9915
  <mat-card-title>Recording file ID: {{recordingFile?.recordingFileId}}</mat-card-title>
9664
9916
  <mat-card-content>
9665
9917
  <table>
9666
- <tr>
9918
+ <tr *ngIf="itemCode">
9667
9919
  <td>Itemcode:</td>
9668
- <td>{{recordingFile?.recording?.itemcode}}</td>
9920
+ <td>{{itemCode}}</td>
9921
+ </tr>
9922
+ <tr *ngIf="uuid && !itemCode">
9923
+ <td>UUID:</td>
9924
+ <td>{{uuid}}</td>
9925
+ </tr>
9926
+ <tr *ngIf="recordingFile?.startedDate">
9927
+ <td>Started:</td>
9928
+ <td>{{recordingFile?.startedDate}}</td>
9669
9929
  </tr>
9670
- <tr *ngIf="recordingFile?.date">
9930
+ <tr *ngIf="!recordingFile?.startedDate && recordingFile?.date">
9671
9931
  <td>Date:</td>
9672
9932
  <td>{{recordingFile?.date}}</td>
9673
9933
  </tr>
9674
- <tr>
9934
+ <tr *ngIf="itemCode">
9675
9935
  <td>Prompt:</td>
9676
9936
  <td>{{recordingAsPlainText()}}</td>
9677
9937
  </tr>
9678
-
9938
+
9679
9939
  <tr *ngIf="sessionId">
9680
9940
  <td>Session:</td>
9681
9941
  <td>{{sessionId}}</td>
@@ -9709,8 +9969,8 @@ class RecordingFileNaviComponent {
9709
9969
  }
9710
9970
  }
9711
9971
  }
9712
- RecordingFileNaviComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileNaviComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9713
- RecordingFileNaviComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RecordingFileNaviComponent, selector: "app-recording-file-navi", inputs: { firstAction: "firstAction", prevAction: "prevAction", nextAction: "nextAction", lastAction: "lastAction", items: "items", itemPos: "itemPos", selectVersion: "selectVersion", versions: "versions", version: "version", naviInfoLoading: "naviInfoLoading" }, ngImport: i0, template: `
9972
+ RecordingFileNaviComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileNaviComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9973
+ RecordingFileNaviComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecordingFileNaviComponent, selector: "app-recording-file-navi", inputs: { firstAction: "firstAction", prevAction: "prevAction", nextAction: "nextAction", lastAction: "lastAction", items: "items", itemPos: "itemPos", selectVersion: "selectVersion", versions: "versions", version: "version", naviInfoLoading: "naviInfoLoading" }, ngImport: i0, template: `
9714
9974
  <div #controlPanel style="display:flex;flex-direction: row;">
9715
9975
  <div #navi style="flex: 0;display:flex;flex-direction: row;flex-wrap: nowrap">
9716
9976
  <fieldset>
@@ -9742,8 +10002,8 @@ RecordingFileNaviComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
9742
10002
  </fieldset>
9743
10003
  </div>
9744
10004
  </div>
9745
- `, isInline: true, styles: [":host {\n flex: 0;\n\n }"], components: [{ type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
9746
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileNaviComponent, decorators: [{
10005
+ `, isInline: true, styles: [":host{flex:0}\n"], components: [{ type: i1$2.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
10006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileNaviComponent, decorators: [{
9747
10007
  type: Component,
9748
10008
  args: [{
9749
10009
  selector: 'app-recording-file-navi',
@@ -9827,6 +10087,7 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
9827
10087
  this.sessionIdFromRoute = null;
9828
10088
  this.versions = null;
9829
10089
  this.recordingFile = null;
10090
+ this.recordingFileVersion = null;
9830
10091
  this.routedByQueryParam = false;
9831
10092
  this.posInList = null;
9832
10093
  this.naviInfoLoading = false;
@@ -9905,9 +10166,11 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
9905
10166
  let cRfs = this.availRecFiles[this.posInList];
9906
10167
  let availVersionCnt = cRfs.length;
9907
10168
  for (let cRf of cRfs) {
9908
- if (cRf.version === version) {
9909
- toRfId = cRf.recordingFileId;
9910
- break;
10169
+ if (cRf instanceof SprRecordingFile) {
10170
+ if (cRf.version === version) {
10171
+ toRfId = cRf.recordingFileId;
10172
+ break;
10173
+ }
9911
10174
  }
9912
10175
  }
9913
10176
  }
@@ -9929,12 +10192,26 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
9929
10192
  }
9930
10193
  positionInList() {
9931
10194
  if (this.availRecFiles && this.recordingFile) {
9932
- let cic = this.recordingFile.recording.itemcode;
9933
- let itemCnt = this.availRecFiles.length;
9934
- for (let rfdi = 0; rfdi < itemCnt; rfdi++) {
9935
- let ar = this.availRecFiles[rfdi][0].recording;
9936
- if (cic === ar.itemcode) {
9937
- return rfdi;
10195
+ let cic = this.recordingFile.itemCode;
10196
+ if (cic) {
10197
+ let itemCnt = this.availRecFiles.length;
10198
+ for (let rfdi = 0; rfdi < itemCnt; rfdi++) {
10199
+ let arRf = this.availRecFiles[rfdi][0];
10200
+ if (arRf instanceof SprRecordingFile) {
10201
+ let ar = arRf.recording;
10202
+ if (cic === ar.itemcode) {
10203
+ return rfdi;
10204
+ }
10205
+ }
10206
+ }
10207
+ }
10208
+ else {
10209
+ let itemCnt = this.availRecFiles.length;
10210
+ for (let rfdi = 0; rfdi < itemCnt; rfdi++) {
10211
+ let arRf = this.availRecFiles[rfdi][0];
10212
+ if (this.recordingFile.uuid === arRf.uuid) {
10213
+ return rfdi;
10214
+ }
9938
10215
  }
9939
10216
  }
9940
10217
  }
@@ -9950,7 +10227,9 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
9950
10227
  if (arfs) {
9951
10228
  this.versions = new Array();
9952
10229
  for (let arf of arfs) {
9953
- this.versions.push(arf.version);
10230
+ if (arf instanceof SprRecordingFile) {
10231
+ this.versions.push(arf.version);
10232
+ }
9954
10233
  }
9955
10234
  this.toVersionAction.disabled = (this.versions.length < 2);
9956
10235
  }
@@ -9959,15 +10238,14 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
9959
10238
  this.updateActions();
9960
10239
  }
9961
10240
  loadRecFile(rfId) {
9962
- var _a;
9963
- (_a = this.ap) === null || _a === void 0 ? void 0 : _a.stop();
10241
+ this.ap?.stop();
9964
10242
  this.audioClip = null;
9965
10243
  this.recordingFile = null;
9966
10244
  this.posInList = null;
9967
10245
  this.updateActions();
9968
10246
  let audioContext = AudioContextProvider.audioContextInstance();
9969
10247
  if (audioContext) {
9970
- this.recordingFileService.fetchRecordingFile(audioContext, rfId).subscribe(value => {
10248
+ this.recordingFileService.fetchSprRecordingFile(audioContext, rfId).subscribe(value => {
9971
10249
  this.status = 'Audio file loaded.';
9972
10250
  let clip = null;
9973
10251
  this.recordingFile = value;
@@ -10041,7 +10319,7 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
10041
10319
  // received session data
10042
10320
  this.sessionId = s.sessionId;
10043
10321
  // fetch recording file meta data list
10044
- this.recordingService.recordingFileList(s.project, s.sessionId).subscribe((rfds) => {
10322
+ this.recordingService.sprRecordingFileList(s.project, s.sessionId).subscribe((rfds) => {
10045
10323
  this.availRecFiles = new Array();
10046
10324
  // build structure indexed by itemcode
10047
10325
  let icIdx = new ItemcodeIndex();
@@ -10052,8 +10330,13 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
10052
10330
  let rfdd = new Date(rfd.date);
10053
10331
  rfd._dateAsDateObj = rfdd;
10054
10332
  }
10055
- let r = rfd.recording;
10056
- let ic = r.itemcode;
10333
+ let ic = rfd.itemCode;
10334
+ if (!ic) {
10335
+ let r = rfd.recording;
10336
+ if (r && r.itemcode) {
10337
+ ic = r.itemcode;
10338
+ }
10339
+ }
10057
10340
  if (ic) {
10058
10341
  let exRfsForIc = icIdx[ic];
10059
10342
  if (exRfsForIc == null) {
@@ -10072,8 +10355,13 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
10072
10355
  });
10073
10356
  }
10074
10357
  }
10358
+ else {
10359
+ let arfd = new Array();
10360
+ arfd.push(rfd);
10361
+ this.availRecFiles.push(arfd);
10362
+ }
10075
10363
  }
10076
- // have unsorted ietmcode indexed recording files here
10364
+ // have unsorted itemcode indexed recording files here
10077
10365
  // sort them ordered by date of latest version ascending
10078
10366
  this.availRecFiles.sort((rfs1, rfs2) => {
10079
10367
  let d1 = rfs2[0]._dateAsDateObj;
@@ -10106,8 +10394,8 @@ class RecordingFileViewComponent extends AudioDisplayPlayer {
10106
10394
  }
10107
10395
  }
10108
10396
  }
10109
- RecordingFileViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileViewComponent, deps: [{ token: RecordingFileService }, { token: RecordingService }, { token: SessionService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
10110
- RecordingFileViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RecordingFileViewComponent, selector: "app-audiodisplayplayer", viewQueries: [{ propertyName: "ac", first: true, predicate: AudioDisplayScrollPane, descendants: true }], usesInheritance: true, ngImport: i0, template: `
10397
+ RecordingFileViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileViewComponent, deps: [{ token: RecordingFileService }, { token: RecordingService }, { token: SessionService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
10398
+ RecordingFileViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecordingFileViewComponent, selector: "app-audiodisplayplayer", viewQueries: [{ propertyName: "ac", first: true, predicate: AudioDisplayScrollPane, descendants: true }], usesInheritance: true, ngImport: i0, template: `
10111
10399
 
10112
10400
  <audio-display-scroll-pane #audioDisplayScrollPane></audio-display-scroll-pane>
10113
10401
  <div class="ctrlview">
@@ -10122,10 +10410,10 @@ RecordingFileViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0
10122
10410
  [zoomOutAction]="zoomOutAction"
10123
10411
  [zoomSelectedAction]="zoomSelectedAction"
10124
10412
  [zoomFitToPanelAction]="zoomFitToPanelAction"></audio-display-control>
10125
- <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFile?recordingFile.version:null" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10413
+ <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFileVersion" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10126
10414
  </div>
10127
- `, isInline: true, styles: [":host {\n flex: 2;\n display: flex;\n flex-direction: column;\n min-height:0;\n overflow: hidden;\n padding: 20px;\n z-index: 5;\n box-sizing: border-box;\n background-color: white;\n }", "\n .ctrlview{\n display: flex;\n flex-direction: row;\n\n }\n ", "\n audio-display-control{\n\n flex: 3;\n }\n "], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: RecordingFileMetaComponent, selector: "app-recording-file-meta", inputs: ["sessionId", "recordingFile"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }, { type: RecordingFileNaviComponent, selector: "app-recording-file-navi", inputs: ["firstAction", "prevAction", "nextAction", "lastAction", "items", "itemPos", "selectVersion", "versions", "version", "naviInfoLoading"] }] });
10128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileViewComponent, decorators: [{
10415
+ `, isInline: true, styles: [":host{flex:2;display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:20px;z-index:5;box-sizing:border-box;background-color:#fff}\n", ".ctrlview{display:flex;flex-direction:row}\n", "audio-display-control{flex:3}\n"], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: RecordingFileMetaComponent, selector: "app-recording-file-meta", inputs: ["sessionId", "recordingFile"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }, { type: RecordingFileNaviComponent, selector: "app-recording-file-navi", inputs: ["firstAction", "prevAction", "nextAction", "lastAction", "items", "itemPos", "selectVersion", "versions", "version", "naviInfoLoading"] }] });
10416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileViewComponent, decorators: [{
10129
10417
  type: Component,
10130
10418
  args: [{
10131
10419
  selector: 'app-audiodisplayplayer',
@@ -10144,7 +10432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
10144
10432
  [zoomOutAction]="zoomOutAction"
10145
10433
  [zoomSelectedAction]="zoomSelectedAction"
10146
10434
  [zoomFitToPanelAction]="zoomFitToPanelAction"></audio-display-control>
10147
- <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFile?recordingFile.version:null" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10435
+ <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFileVersion" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10148
10436
  </div>
10149
10437
  `,
10150
10438
  styles: [
@@ -10225,15 +10513,20 @@ class RecordingFileUI extends RecordingFileViewComponent {
10225
10513
  this.editSaved = true;
10226
10514
  }
10227
10515
  applySelection() {
10228
- var _a;
10229
10516
  if (this.audioClip) {
10230
10517
  let ab = this.audioClip.buffer;
10231
10518
  let s = this.audioClip.selection;
10232
- if (s && ab && ((_a = this.recordingFile) === null || _a === void 0 ? void 0 : _a.recordingFileId)) {
10233
- let sr = ab.sampleRate;
10234
- let sf = s.startFrame;
10235
- let ef = s.endFrame;
10236
- this.recordingFileService.saveEditSelection(this.recordingFile.recordingFileId, sr, sf, ef).subscribe((value) => { }, () => {
10519
+ if (ab && this.recordingFile?.recordingFileId) {
10520
+ let sr = null;
10521
+ let sf = null;
10522
+ let ef = null;
10523
+ if (s) {
10524
+ sr = ab.sampleRate;
10525
+ sf = s.startFrame;
10526
+ ef = s.endFrame;
10527
+ }
10528
+ this.recordingFileService.saveEditSelection(this.recordingFile.recordingFileId, sr, sf, ef).subscribe((value) => {
10529
+ }, () => {
10237
10530
  this.dialog.open(MessageDialog, {
10238
10531
  data: {
10239
10532
  type: 'error',
@@ -10252,8 +10545,8 @@ class RecordingFileUI extends RecordingFileViewComponent {
10252
10545
  }
10253
10546
  }
10254
10547
  }
10255
- RecordingFileUI.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileUI, deps: [{ token: RecordingFileService }, { token: RecordingService }, { token: SessionService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$3.MatDialog }, { token: i6.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
10256
- RecordingFileUI.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: RecordingFileUI, selector: "app-audiodisplayplayer", usesInheritance: true, ngImport: i0, template: `
10548
+ RecordingFileUI.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileUI, deps: [{ token: RecordingFileService }, { token: RecordingService }, { token: SessionService }, { token: i1$1.Router }, { token: i1$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$3.MatDialog }, { token: i6.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component });
10549
+ RecordingFileUI.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecordingFileUI, selector: "app-audiodisplayplayer", usesInheritance: true, ngImport: i0, template: `
10257
10550
  <h1>Recording file editing</h1>
10258
10551
  <p>On export or delivery the editing selection of the recording file is cut out. If no editing selection is applied the original file is exported.</p>
10259
10552
 
@@ -10269,12 +10562,12 @@ RecordingFileUI.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
10269
10562
  [zoomOutAction]="zoomOutAction"
10270
10563
  [zoomSelectedAction]="zoomSelectedAction"
10271
10564
  [zoomFitToPanelAction]="zoomFitToPanelAction"></audio-display-control>
10272
- <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFile?recordingFile.version:null" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10565
+ <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFileVersion" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10273
10566
  </div>
10274
10567
 
10275
10568
  <button mat-raised-button color="accent" (click)="applySelection()" [disabled]="editSaved">{{this.applyButtonText()}}</button>
10276
- `, isInline: true, styles: [":host {\n flex: 2;\n display: flex;\n flex-direction: column;\n min-height:0;\n overflow: hidden;\n padding: 20px;\n z-index: 5;\n box-sizing: border-box;\n background-color: white;\n }", "\n .ctrlview{\n display: flex;\n flex-direction: row;\n }\n ", "\n audio-display-control{\n\n flex: 3;\n }\n "], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: RecordingFileMetaComponent, selector: "app-recording-file-meta", inputs: ["sessionId", "recordingFile"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }, { type: RecordingFileNaviComponent, selector: "app-recording-file-navi", inputs: ["firstAction", "prevAction", "nextAction", "lastAction", "items", "itemPos", "selectVersion", "versions", "version", "naviInfoLoading"] }, { 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"] }] });
10277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: RecordingFileUI, decorators: [{
10569
+ `, isInline: true, styles: [":host{flex:2;display:flex;flex-direction:column;min-height:0;overflow:hidden;padding:20px;z-index:5;box-sizing:border-box;background-color:#fff}\n", ".ctrlview{display:flex;flex-direction:row}\n", "audio-display-control{flex:3}\n"], components: [{ type: AudioDisplayScrollPane, selector: "audio-display-scroll-pane", inputs: ["audioClip"], outputs: ["zoomInAction", "zoomOutAction", "zoomSelectedAction", "zoomFitToPanelAction"] }, { type: RecordingFileMetaComponent, selector: "app-recording-file-meta", inputs: ["sessionId", "recordingFile"] }, { type: AudioDisplayControl, selector: "audio-display-control", inputs: ["audioClip", "playStartAction", "playSelectionAction", "playStopAction", "zoomInAction", "zoomOutAction", "zoomFitToPanelAction", "zoomSelectedAction", "autoPlayOnSelectToggleAction"] }, { type: RecordingFileNaviComponent, selector: "app-recording-file-navi", inputs: ["firstAction", "prevAction", "nextAction", "lastAction", "items", "itemPos", "selectVersion", "versions", "version", "naviInfoLoading"] }, { 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"] }] });
10570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingFileUI, decorators: [{
10278
10571
  type: Component,
10279
10572
  args: [{
10280
10573
  selector: 'app-audiodisplayplayer',
@@ -10294,7 +10587,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
10294
10587
  [zoomOutAction]="zoomOutAction"
10295
10588
  [zoomSelectedAction]="zoomSelectedAction"
10296
10589
  [zoomFitToPanelAction]="zoomFitToPanelAction"></audio-display-control>
10297
- <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFile?recordingFile.version:null" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10590
+ <app-recording-file-navi [items]="availRecFiles?.length" [itemPos]="posInList" [version]="recordingFileVersion" [versions]="versions" [firstAction]="firstAction" [prevAction]="prevAction" [nextAction]="nextAction" [lastAction]="lastAction" [selectVersion]="toVersionAction" [naviInfoLoading]="naviInfoLoading"></app-recording-file-navi>
10298
10591
  </div>
10299
10592
 
10300
10593
  <button mat-raised-button color="accent" (click)="applySelection()" [disabled]="editSaved">{{this.applyButtonText()}}</button>
@@ -10325,8 +10618,1296 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImpo
10325
10618
  }]
10326
10619
  }], ctorParameters: function () { return [{ type: RecordingFileService }, { type: RecordingService }, { type: SessionService }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1$3.MatDialog }, { type: i6.MatSnackBar }]; } });
10327
10620
 
10621
+ class MediaUtils {
10622
+ static toMediaTime(timeInSeconds) {
10623
+ let rest = timeInSeconds;
10624
+ let hours = Math.floor(timeInSeconds / 3600);
10625
+ rest -= hours * 3600;
10626
+ let minutes = Math.floor(rest / 60);
10627
+ rest -= minutes * 60;
10628
+ let seconds = Math.floor(rest);
10629
+ rest -= seconds;
10630
+ let millis = Math.round(rest * 1000);
10631
+ return hours.toString().padStart(2, '0') + ':' + minutes.toString().padStart(2, '0') + ':' + seconds.toString().padStart(2, '0') + '.' + millis.toString().padStart(3, '0');
10632
+ }
10633
+ }
10634
+
10635
+ class RecordingList {
10636
+ constructor() {
10637
+ this.recordingList = new Array();
10638
+ //cols=['index','length','samples','samplerate','action'];
10639
+ this.cols = ['index', 'startedDate', 'length', 'action'];
10640
+ this.selectDisabled = false;
10641
+ this.selectedRecordingFileChanged = new EventEmitter();
10642
+ this.selectedRecordingFile = null;
10643
+ this.recordingListDataSource = new MatTableDataSource();
10644
+ }
10645
+ ngAfterViewInit() {
10646
+ this.recordingListDataSource.data = this.recordingList.reverse();
10647
+ }
10648
+ push(rf) {
10649
+ this.recordingList.push(rf);
10650
+ this.recordingListDataSource.data = this.recordingList.reverse();
10651
+ }
10652
+ selectRecordingFile(rf) {
10653
+ this.selectedRecordingFileChanged.emit(rf);
10654
+ }
10655
+ lengthTimeFormatted(rf) {
10656
+ let str = '--:--:--';
10657
+ if (rf.frames && rf.audioBuffer) {
10658
+ str = MediaUtils.toMediaTime(rf.frames / rf.audioBuffer?.sampleRate);
10659
+ }
10660
+ return str;
10661
+ }
10662
+ }
10663
+ RecordingList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingList, deps: [], target: i0.ɵɵFactoryTarget.Component });
10664
+ RecordingList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecordingList, selector: "app-recordinglist", inputs: { selectDisabled: "selectDisabled", selectedRecordingFile: "selectedRecordingFile" }, outputs: { selectedRecordingFileChanged: "selectedRecordingFileChanged" }, ngImport: i0, template: `
10665
+ <mat-card>
10666
+ <mat-card-header>
10667
+ <h2>Recording list</h2>
10668
+ </mat-card-header>
10669
+ <mat-card-content>
10670
+ <table mat-table [dataSource]="recordingListDataSource" class="mat-elevation-z0">
10671
+ <tr mat-header-row *matHeaderRowDef="cols;sticky:true"></tr>
10672
+ <tr mat-row *matRowDef="let element; columns: cols;" [scrollIntoViewToBottom]="element.uuid===selectedRecordingFile?.uuid"></tr>
10673
+ <ng-container matColumnDef="index">
10674
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
10675
+ <td mat-cell class="monospaced" *matCellDef="let element;let i = index">{{recordingListDataSource.data.length-i}}</td>
10676
+ </ng-container>
10677
+ <ng-container matColumnDef="startedDate">
10678
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Started</th>
10679
+ <td mat-cell class="monospaced" *matCellDef="let element">{{element.startedDate | date:'YYYY-MM-dd HH:mm:ss'}}</td>
10680
+ </ng-container>
10681
+ <ng-container matColumnDef="length">
10682
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Length</th>
10683
+ <td mat-cell class="monospaced" *matCellDef="let element">{{lengthTimeFormatted(element)}}</td>
10684
+ </ng-container>
10685
+ <ng-container matColumnDef="action">
10686
+ <th mat-header-cell *matHeaderCellDef>Action</th>
10687
+ <td mat-cell *matCellDef="let element"><button mat-stroked-button color="primary" (click)="selectRecordingFile(element)" [disabled]="selectDisabled || element.uuid===selectedRecordingFile?.uuid"><mat-icon>edit_attributes</mat-icon> Select</button></td>
10688
+ </ng-container>
10689
+ </table>
10690
+ </mat-card-content>
10691
+ </mat-card>
10692
+
10693
+ `, isInline: true, styles: [".monospaced{font-family:monospace}.mat-cell,.mat-header-cell{padding-left:5px;padding-right:5px}.mat-card,.mat-card-header,.mat-card-content{width:auto}.flexForm{display:flex;flex-direction:column;width:auto}\n", ":host{position:relative;margin:0;padding:0;background:lightgrey;width:100%;flex:1;overflow-y:auto;min-height:0px}\n", ".selected{font-weight:700}\n"], components: [{ type: i1$4.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i1$4.MatCardHeader, selector: "mat-card-header" }, { type: i2$2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i2$2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i2$2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { 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: i1$4.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i2$2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i2$2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: ScrollIntoViewDirective, selector: "[scrollIntoViewToBottom]", inputs: ["scrollIntoViewToBottom"] }, { type: i2$2.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i2$2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i2$2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i2$2.MatCellDef, selector: "[matCellDef]" }, { type: i2$2.MatCell, selector: "mat-cell, td[mat-cell]" }], pipes: { "date": i4.DatePipe } });
10694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecordingList, decorators: [{
10695
+ type: Component,
10696
+ args: [{ selector: 'app-recordinglist', template: `
10697
+ <mat-card>
10698
+ <mat-card-header>
10699
+ <h2>Recording list</h2>
10700
+ </mat-card-header>
10701
+ <mat-card-content>
10702
+ <table mat-table [dataSource]="recordingListDataSource" class="mat-elevation-z0">
10703
+ <tr mat-header-row *matHeaderRowDef="cols;sticky:true"></tr>
10704
+ <tr mat-row *matRowDef="let element; columns: cols;" [scrollIntoViewToBottom]="element.uuid===selectedRecordingFile?.uuid"></tr>
10705
+ <ng-container matColumnDef="index">
10706
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
10707
+ <td mat-cell class="monospaced" *matCellDef="let element;let i = index">{{recordingListDataSource.data.length-i}}</td>
10708
+ </ng-container>
10709
+ <ng-container matColumnDef="startedDate">
10710
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Started</th>
10711
+ <td mat-cell class="monospaced" *matCellDef="let element">{{element.startedDate | date:'YYYY-MM-dd HH:mm:ss'}}</td>
10712
+ </ng-container>
10713
+ <ng-container matColumnDef="length">
10714
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>Length</th>
10715
+ <td mat-cell class="monospaced" *matCellDef="let element">{{lengthTimeFormatted(element)}}</td>
10716
+ </ng-container>
10717
+ <ng-container matColumnDef="action">
10718
+ <th mat-header-cell *matHeaderCellDef>Action</th>
10719
+ <td mat-cell *matCellDef="let element"><button mat-stroked-button color="primary" (click)="selectRecordingFile(element)" [disabled]="selectDisabled || element.uuid===selectedRecordingFile?.uuid"><mat-icon>edit_attributes</mat-icon> Select</button></td>
10720
+ </ng-container>
10721
+ </table>
10722
+ </mat-card-content>
10723
+ </mat-card>
10724
+
10725
+ `, styles: [".monospaced{font-family:monospace}.mat-cell,.mat-header-cell{padding-left:5px;padding-right:5px}.mat-card,.mat-card-header,.mat-card-content{width:auto}.flexForm{display:flex;flex-direction:column;width:auto}\n", ":host{position:relative;margin:0;padding:0;background:lightgrey;width:100%;flex:1;overflow-y:auto;min-height:0px}\n", ".selected{font-weight:700}\n"] }]
10726
+ }], ctorParameters: function () { return []; }, propDecorators: { selectDisabled: [{
10727
+ type: Input
10728
+ }], selectedRecordingFileChanged: [{
10729
+ type: Output
10730
+ }], selectedRecordingFile: [{
10731
+ type: Input
10732
+ }] } });
10733
+
10734
+ class RecorderCombiPane {
10735
+ constructor() {
10736
+ this.selectDisabled = false;
10737
+ this.selectedRecordingFileChanged = new EventEmitter();
10738
+ this.selectedRecordingFile = null;
10739
+ this.audioSignalCollapsed = true;
10740
+ this.displayAudioClip = null;
10741
+ }
10742
+ ngAfterViewInit() {
10743
+ }
10744
+ push(rf) {
10745
+ this.recordingListComp.push(rf);
10746
+ }
10747
+ selectRecordingFile(rf) {
10748
+ this.selectedRecordingFileChanged.emit(rf);
10749
+ }
10750
+ }
10751
+ RecorderCombiPane.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecorderCombiPane, deps: [], target: i0.ɵɵFactoryTarget.Component });
10752
+ RecorderCombiPane.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", type: RecorderCombiPane, selector: "app-recordercombipane", inputs: { selectDisabled: "selectDisabled", selectedRecordingFile: "selectedRecordingFile", audioSignalCollapsed: "audioSignalCollapsed", displayAudioClip: "displayAudioClip", playStartAction: "playStartAction", playSelectionAction: "playSelectionAction", autoPlayOnSelectToggleAction: "autoPlayOnSelectToggleAction", playStopAction: "playStopAction" }, outputs: { selectedRecordingFileChanged: "selectedRecordingFileChanged" }, viewQueries: [{ propertyName: "recordingListComp", first: true, predicate: RecordingList, descendants: true }, { propertyName: "audioDisplay", first: true, predicate: AudioDisplay, descendants: true, static: true }], ngImport: i0, template: `
10753
+ <app-recordinglist [selectedRecordingFile]="selectedRecordingFile" [selectDisabled]="selectDisabled" (selectedRecordingFileChanged)="selectRecordingFile($event)"></app-recordinglist>
10754
+ <div fxHide.xs #asCt [class.active]="!audioSignalCollapsed">
10755
+ <app-audiodisplay #audioSignalContainer [class.active]="!audioSignalCollapsed"
10756
+ [audioClip]="displayAudioClip"
10757
+ [playStartAction]="playStartAction"
10758
+ [playSelectionAction]="playSelectionAction"
10759
+ [autoPlayOnSelectToggleAction]="autoPlayOnSelectToggleAction"
10760
+ [playStopAction]="playStopAction"></app-audiodisplay>
10761
+ </div>
10762
+ `, isInline: true, styles: [".monospaced{font-family:monospace}.mat-cell,.mat-header-cell{padding-left:5px;padding-right:5px}.mat-card,.mat-card-header,.mat-card-content{width:auto}.flexForm{display:flex;flex-direction:column;width:auto}\n", ":host{position:relative;margin:0;padding:0;background:lightgrey;width:100%;flex:1;overflow-y:auto;min-height:0px}\n", ".selected{font-weight:700}\n", "div{display:none;position:absolute;z-index:5}\n", "div.active{display:flex;position:absolute;bottom:0px;height:90%;width:100%;overflow:hidden;padding:0;z-index:200;box-sizing:border-box;background-color:#0000}\n"], components: [{ type: RecordingList, selector: "app-recordinglist", inputs: ["selectDisabled", "selectedRecordingFile"], outputs: ["selectedRecordingFileChanged"] }, { type: AudioDisplay, selector: "app-audiodisplay", inputs: ["playStartAction", "playStopAction", "playSelectionAction", "autoPlayOnSelectToggleAction", "audioData", "audioClip"] }], directives: [{ 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"] }] });
10763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: RecorderCombiPane, decorators: [{
10764
+ type: Component,
10765
+ args: [{ selector: 'app-recordercombipane', template: `
10766
+ <app-recordinglist [selectedRecordingFile]="selectedRecordingFile" [selectDisabled]="selectDisabled" (selectedRecordingFileChanged)="selectRecordingFile($event)"></app-recordinglist>
10767
+ <div fxHide.xs #asCt [class.active]="!audioSignalCollapsed">
10768
+ <app-audiodisplay #audioSignalContainer [class.active]="!audioSignalCollapsed"
10769
+ [audioClip]="displayAudioClip"
10770
+ [playStartAction]="playStartAction"
10771
+ [playSelectionAction]="playSelectionAction"
10772
+ [autoPlayOnSelectToggleAction]="autoPlayOnSelectToggleAction"
10773
+ [playStopAction]="playStopAction"></app-audiodisplay>
10774
+ </div>
10775
+ `, styles: [".monospaced{font-family:monospace}.mat-cell,.mat-header-cell{padding-left:5px;padding-right:5px}.mat-card,.mat-card-header,.mat-card-content{width:auto}.flexForm{display:flex;flex-direction:column;width:auto}\n", ":host{position:relative;margin:0;padding:0;background:lightgrey;width:100%;flex:1;overflow-y:auto;min-height:0px}\n", ".selected{font-weight:700}\n", "div{display:none;position:absolute;z-index:5}\n", "div.active{display:flex;position:absolute;bottom:0px;height:90%;width:100%;overflow:hidden;padding:0;z-index:200;box-sizing:border-box;background-color:#0000}\n"] }]
10776
+ }], ctorParameters: function () { return []; }, propDecorators: { recordingListComp: [{
10777
+ type: ViewChild,
10778
+ args: [RecordingList]
10779
+ }], selectDisabled: [{
10780
+ type: Input
10781
+ }], selectedRecordingFileChanged: [{
10782
+ type: Output
10783
+ }], selectedRecordingFile: [{
10784
+ type: Input
10785
+ }], audioDisplay: [{
10786
+ type: ViewChild,
10787
+ args: [AudioDisplay, { static: true }]
10788
+ }], audioSignalCollapsed: [{
10789
+ type: Input
10790
+ }], displayAudioClip: [{
10791
+ type: Input
10792
+ }], playStartAction: [{
10793
+ type: Input
10794
+ }], playSelectionAction: [{
10795
+ type: Input
10796
+ }], autoPlayOnSelectToggleAction: [{
10797
+ type: Input
10798
+ }], playStopAction: [{
10799
+ type: Input
10800
+ }] } });
10801
+
10802
+ const RECFILE_API_CTX = 'recfile';
10803
+ const MAX_RECORDING_TIME_MS = 1000 * 60 * 60 * 60; // 1 hour
10804
+ const LEVEL_BAR_INTERVALL_SECONDS = 0.1; // 100ms
10805
+ class Item {
10806
+ constructor(promptAsString, training) {
10807
+ this.promptAsString = promptAsString;
10808
+ this.training = training;
10809
+ this.recs = null;
10810
+ }
10811
+ }
10812
+ // TODO enum not possible in template language , use string for now
10813
+ //export enum StatusAlertType {INFO,WARN,ERROR};
10814
+ class AudioRecorder {
10815
+ constructor(changeDetectorRef, route, renderer, dialog, projectService, sessionService, recFileService, uploader, config) {
10816
+ this.changeDetectorRef = changeDetectorRef;
10817
+ this.route = route;
10818
+ this.renderer = renderer;
10819
+ this.dialog = dialog;
10820
+ this.projectService = projectService;
10821
+ this.sessionService = sessionService;
10822
+ this.recFileService = recFileService;
10823
+ this.uploader = uploader;
10824
+ this.config = config;
10825
+ this._project = null;
10826
+ this.projectName = null;
10827
+ this.enableUploadRecordings = true;
10828
+ this.enableDownloadRecordings = false;
10829
+ this.status = 0 /* BLOCKED */;
10830
+ this.ac = null;
10831
+ this._channelCount = 2; //TODO define constant for default format
10832
+ this.dataSaved = true;
10833
+ this.startedDate = null;
10834
+ this.maxRecTimerId = null;
10835
+ this.maxRecTimerRunning = false;
10836
+ this._session = null;
10837
+ this._promptIndex = null;
10838
+ //items: Array<Item>|null=null;
10839
+ //selectedItemIdx: number;
10840
+ this._displayRecFile = null;
10841
+ this.displayRecFileVersion = 0;
10842
+ this.displayAudioClip = null;
10843
+ this.displayLevelInfos = null;
10844
+ this.peakLevelInDb = MIN_DB_LEVEL$1;
10845
+ this.readonly = false;
10846
+ this.statusMsg = '';
10847
+ this.statusWaiting = false;
10848
+ this.processingRecording = false;
10849
+ this.uploadProgress = 100;
10850
+ this.uploadStatus = 'ok';
10851
+ this.audioSignalCollapsed = true;
10852
+ this.audioFetchSubscription = null;
10853
+ this.destroyed = false;
10854
+ this.navigationDisabled = true;
10855
+ this.status = 1 /* IDLE */;
10856
+ this.transportActions = new TransportActions();
10857
+ this.playStartAction = new Action('Play');
10858
+ this.audio = document.getElementById('audio');
10859
+ this.selCaptureDeviceId = null;
10860
+ this.levelMeasure = new LevelMeasure();
10861
+ this.streamLevelMeasure = new StreamLevelMeasure();
10862
+ if (this.config && this.config.enableUploadRecordings != null) {
10863
+ this.enableUploadRecordings = this.config.enableUploadRecordings;
10864
+ }
10865
+ if (this.config && this.config.enableDownloadRecordings != null) {
10866
+ this.enableDownloadRecordings = this.config.enableDownloadRecordings;
10867
+ }
10868
+ this.init();
10869
+ }
10870
+ ngAfterViewInit() {
10871
+ this.route.queryParams.subscribe((params) => {
10872
+ if (params['sessionId']) {
10873
+ this.fetchSession(params['sessionId']);
10874
+ }
10875
+ });
10876
+ this.streamLevelMeasure.levelListener = this.liveLevelDisplay;
10877
+ this.streamLevelMeasure.peakLevelListener = (peakLvlInDb) => {
10878
+ this.peakLevelInDb = peakLvlInDb;
10879
+ this.changeDetectorRef.detectChanges();
10880
+ };
10881
+ }
10882
+ ngOnDestroy() {
10883
+ this.destroyed = true;
10884
+ // TODO stop capture /playback
10885
+ }
10886
+ init() {
10887
+ this.transportActions.startAction.disabled = true;
10888
+ this.transportActions.stopAction.disabled = true;
10889
+ this.transportActions.nextAction.disabled = true;
10890
+ this.transportActions.pauseAction.disabled = true;
10891
+ this.playStartAction.disabled = true;
10892
+ let context = null;
10893
+ try {
10894
+ context = AudioContextProvider.audioContextInstance();
10895
+ }
10896
+ catch (err) {
10897
+ this.status = 4 /* ERROR */;
10898
+ let errMsg = 'Unknown';
10899
+ if (err instanceof Error) {
10900
+ errMsg = err.message;
10901
+ }
10902
+ this.statusMsg = 'ERROR: ' + errMsg;
10903
+ this.statusAlertType = 'error';
10904
+ this.dialog.open(MessageDialog, {
10905
+ data: {
10906
+ type: 'error',
10907
+ title: 'Error',
10908
+ msg: errMsg,
10909
+ advise: 'Please use a supported browser.',
10910
+ }
10911
+ });
10912
+ return;
10913
+ }
10914
+ if (context) {
10915
+ console.info("State of audio context: " + context.state);
10916
+ }
10917
+ if (!context || !navigator.mediaDevices) {
10918
+ this.status = 4 /* ERROR */;
10919
+ let errMsg = 'Browser does not support Media streams!';
10920
+ this.statusMsg = 'ERROR: ' + errMsg;
10921
+ this.statusAlertType = 'error';
10922
+ this.dialog.open(MessageDialog, {
10923
+ data: {
10924
+ type: 'error',
10925
+ title: 'Error',
10926
+ msg: errMsg,
10927
+ advise: 'Please use a supported browser.',
10928
+ }
10929
+ });
10930
+ return;
10931
+ }
10932
+ else {
10933
+ this.controlAudioPlayer = new AudioPlayer(context, this);
10934
+ this.ac = new AudioCapture(context);
10935
+ if (this.ac) {
10936
+ this.transportActions.startAction.onAction = () => this.startItem();
10937
+ this.ac.listener = this;
10938
+ this.ac.audioOutStream = new SequenceAudioFloat32ChunkerOutStream(this.streamLevelMeasure, LEVEL_BAR_INTERVALL_SECONDS);
10939
+ // Don't list the devices here. If we do not have audio permissions we only get anonymized devices without labels.
10940
+ //this.ac.listDevices();
10941
+ }
10942
+ else {
10943
+ this.transportActions.startAction.disabled = true;
10944
+ let errMsg = 'Browser does not support Media/Audio API!';
10945
+ this.statusMsg = 'ERROR: ' + errMsg;
10946
+ this.statusAlertType = 'error';
10947
+ this.dialog.open(MessageDialog, {
10948
+ data: {
10949
+ type: 'error',
10950
+ title: 'Error',
10951
+ msg: errMsg,
10952
+ advise: 'Please use a supported browser.',
10953
+ }
10954
+ });
10955
+ return;
10956
+ }
10957
+ this.transportActions.stopAction.onAction = () => this.stopItem();
10958
+ this.transportActions.nextAction.onAction = () => this.stopItem();
10959
+ //this.transportActions.pauseAction.onAction = () => this.pauseItem();
10960
+ this.playStartAction.onAction = () => this.controlAudioPlayer.start();
10961
+ }
10962
+ this.uploader.listener = (ue) => {
10963
+ this.uploadUpdate(ue);
10964
+ };
10965
+ }
10966
+ onKeyPress(ke) {
10967
+ if (ke.key == ' ') {
10968
+ this.transportActions.startAction.perform();
10969
+ this.transportActions.nextAction.perform();
10970
+ }
10971
+ }
10972
+ onKeyDown(ke) {
10973
+ if (ke.key == ' ' || ke.key == 'Escape') {
10974
+ this.transportActions.stopAction.perform();
10975
+ }
10976
+ if (ke.key == 'p' || ke.key == 'Escape') {
10977
+ this.transportActions.pauseAction.perform();
10978
+ }
10979
+ if (ke.key == 'MediaPlayPause') {
10980
+ this.playStartAction.perform();
10981
+ }
10982
+ if (ke.key === 'ArrowRight') {
10983
+ this.transportActions.fwdAction.perform();
10984
+ }
10985
+ if (ke.key === 'ArrowLeft') {
10986
+ this.transportActions.bwdAction.perform();
10987
+ }
10988
+ }
10989
+ isTestSession() {
10990
+ return ((this._session != null) && (this._session.type === 'TEST' || this._session.type === 'TEST_DEF_A' || this._session.type === 'SINUS_TEST'));
10991
+ }
10992
+ isDefaultAudioTestSession() {
10993
+ return ((this._session != null) && (this._session.type === 'TEST_DEF_A'));
10994
+ }
10995
+ isDefaultAudioTestSessionOverwriteingProjectRequirements() {
10996
+ return ((this._session != null) && (this._session.type === 'TEST_DEF_A') && (this.audioDevices != null) && this.audioDevices.length > 0);
10997
+ }
10998
+ fetchSession(sessionId) {
10999
+ //Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'statusMsg: Player initialized.'. Current value: 'statusMsg: Fetching session info...'.
11000
+ // params.subscribe seems not to be asynchronous
11001
+ // this.sm.statusAlertType='info';
11002
+ // this.sm.statusMsg = 'Fetching session info...';
11003
+ // this.sm.statusWaiting=true;
11004
+ let sessObs = this.sessionService.sessionObserver(sessionId);
11005
+ if (sessObs) {
11006
+ sessObs.subscribe(sess => {
11007
+ //this.setSession(sess);
11008
+ this.statusAlertType = 'info';
11009
+ this.statusMsg = 'Received session info.';
11010
+ this.statusWaiting = false;
11011
+ this.session = sess;
11012
+ if (sess.project) {
11013
+ //console.debug("Session associated project: "+sess.project)
11014
+ this.projectService.projectObservable(sess.project).subscribe(project => {
11015
+ this.project = project;
11016
+ this.fetchRecordings(sess);
11017
+ }, reason => {
11018
+ this.statusMsg = reason;
11019
+ this.statusAlertType = 'error';
11020
+ this.statusWaiting = false;
11021
+ console.error("Error fetching project config: " + reason);
11022
+ });
11023
+ }
11024
+ else {
11025
+ console.info("Session has no associated project. Using default configuration.");
11026
+ }
11027
+ }, (reason) => {
11028
+ this.statusMsg = reason;
11029
+ this.statusAlertType = 'error';
11030
+ this.statusWaiting = false;
11031
+ console.error("Error fetching session " + reason);
11032
+ });
11033
+ }
11034
+ }
11035
+ fetchRecordings(sess) {
11036
+ this.statusAlertType = 'info';
11037
+ this.statusMsg = 'Fetching infos of recordings...';
11038
+ this.statusWaiting = true;
11039
+ let prNm = null;
11040
+ if (this.project) {
11041
+ let rfsObs = this.recFileService.recordingFileList(this.project.name, sess.sessionId);
11042
+ rfsObs.subscribe((rfs) => {
11043
+ this.statusAlertType = 'info';
11044
+ this.statusMsg = 'Received infos of recordings.';
11045
+ this.statusWaiting = false;
11046
+ if (rfs) {
11047
+ if (rfs instanceof Array) {
11048
+ rfs.forEach((rf) => {
11049
+ //console.debug("Already recorded: " + rf+ " "+rf.recording.itemcode);
11050
+ //this.addRecordingFileByDescriptor(rf);
11051
+ this.recorderCombiPane.push(rf);
11052
+ });
11053
+ }
11054
+ else {
11055
+ console.error('Expected type array for list of already recorded files ');
11056
+ }
11057
+ }
11058
+ else {
11059
+ //console.debug("Recording file list: " + rfs);
11060
+ }
11061
+ }, () => {
11062
+ // Failed fetching existing, but we start the session anyway
11063
+ this.start();
11064
+ }, () => {
11065
+ // Normal start
11066
+ this.start();
11067
+ });
11068
+ }
11069
+ else {
11070
+ // No project def -> error
11071
+ this.statusAlertType = 'error';
11072
+ this.statusMsg = 'No project definiton.';
11073
+ this.statusWaiting = false;
11074
+ console.error(this.statusMsg);
11075
+ }
11076
+ }
11077
+ set project(project) {
11078
+ this._project = project;
11079
+ let chCnt = ProjectUtil.DEFAULT_AUDIO_CHANNEL_COUNT;
11080
+ if (project) {
11081
+ console.info("Project name: " + project.name);
11082
+ this.audioDevices = project.audioDevices;
11083
+ chCnt = ProjectUtil.audioChannelCount(project);
11084
+ console.info("Project requested recording channel count: " + chCnt);
11085
+ this.autoGainControlConfigs = project.autoGainControlConfigs;
11086
+ }
11087
+ else {
11088
+ console.error("Empty project configuration!");
11089
+ }
11090
+ this.channelCount = chCnt;
11091
+ }
11092
+ get project() {
11093
+ return this._project;
11094
+ }
11095
+ set autoGainControlConfigs(autoGainControlConfigs) {
11096
+ this._autoGainControlConfigs = autoGainControlConfigs;
11097
+ }
11098
+ selectRecordingFile(rf) {
11099
+ this.displayRecFile = rf;
11100
+ }
11101
+ uploadUpdate(ue) {
11102
+ let upStatus = ue.status;
11103
+ this.dataSaved = (UploaderStatus.DONE === upStatus);
11104
+ let percentUpl = ue.percentDone();
11105
+ if (UploaderStatus.ERR === upStatus) {
11106
+ this.uploadStatus = 'warn';
11107
+ }
11108
+ else {
11109
+ if (percentUpl < 50) {
11110
+ this.uploadStatus = 'accent';
11111
+ }
11112
+ else {
11113
+ this.uploadStatus = 'success';
11114
+ }
11115
+ this.uploadProgress = percentUpl;
11116
+ }
11117
+ this.changeDetectorRef.detectChanges();
11118
+ }
11119
+ set controlAudioPlayer(controlAudioPlayer) {
11120
+ if (this._controlAudioPlayer) {
11121
+ //this._controlAudioPlayer.listener=null;
11122
+ }
11123
+ this._controlAudioPlayer = controlAudioPlayer;
11124
+ if (this._controlAudioPlayer) {
11125
+ this._controlAudioPlayer.listener = this;
11126
+ }
11127
+ }
11128
+ get controlAudioPlayer() {
11129
+ return this._controlAudioPlayer;
11130
+ }
11131
+ set session(session) {
11132
+ this._session = session;
11133
+ }
11134
+ get session() {
11135
+ return this._session;
11136
+ }
11137
+ set channelCount(channelCount) {
11138
+ this._channelCount = channelCount;
11139
+ }
11140
+ set audioDevices(audioDevices) {
11141
+ this._audioDevices = audioDevices;
11142
+ }
11143
+ update(e) {
11144
+ if (e.type == EventType.STARTED) {
11145
+ this.playStartAction.disabled = true;
11146
+ this.updateTimerId = window.setInterval(() => {
11147
+ //this.audioSignal.playFramePosition = this.ap.playPositionFrames;
11148
+ }, 50);
11149
+ }
11150
+ else if (e.type == EventType.STOPPED || e.type == EventType.ENDED) {
11151
+ window.clearInterval(this.updateTimerId);
11152
+ // this.audioSignal.playFramePosition = this.ap.playPositionFrames;
11153
+ this.playStartAction.disabled = (!(this.displayRecFile));
11154
+ }
11155
+ }
11156
+ startDisabled() {
11157
+ return !this.transportActions || this.readonly || this.transportActions.startAction.disabled;
11158
+ }
11159
+ stopDisabled() {
11160
+ return !this.transportActions || this.transportActions.stopAction.disabled;
11161
+ }
11162
+ startStopNextName() {
11163
+ if (!this.startDisabled()) {
11164
+ this.startStopNextButtonName = "Start";
11165
+ }
11166
+ else if (!this.stopDisabled()) {
11167
+ this.startStopNextButtonName = "Stop";
11168
+ }
11169
+ return this.startStopNextButtonName;
11170
+ }
11171
+ startStopNextIconName() {
11172
+ if (!this.startDisabled()) {
11173
+ this.startStopNextButtonIconName = "fiber_manual_record";
11174
+ }
11175
+ else if (!this.stopDisabled()) {
11176
+ this.startStopNextButtonIconName = "stop";
11177
+ }
11178
+ return this.startStopNextButtonIconName;
11179
+ }
11180
+ startStopNextIconColor() {
11181
+ if (!this.startDisabled()) {
11182
+ return "red";
11183
+ }
11184
+ else if (!this.stopDisabled()) {
11185
+ return "yellow";
11186
+ }
11187
+ else {
11188
+ return "grey";
11189
+ }
11190
+ }
11191
+ startStopPerform() {
11192
+ if (!this.startDisabled()) {
11193
+ this.transportActions.startAction.perform();
11194
+ }
11195
+ else if (!this.stopDisabled()) {
11196
+ this.transportActions.stopAction.perform();
11197
+ }
11198
+ }
11199
+ startItem() {
11200
+ this.transportActions.startAction.disabled = true;
11201
+ this.transportActions.pauseAction.disabled = true;
11202
+ if (this.readonly) {
11203
+ return;
11204
+ }
11205
+ this.transportActions.fwdAction.disabled = true;
11206
+ this.transportActions.fwdNextAction.disabled = true;
11207
+ this.transportActions.bwdAction.disabled = true;
11208
+ this.displayRecFile = null;
11209
+ this.displayRecFileVersion = 0;
11210
+ this.displayAudioClip = null;
11211
+ this.showRecording();
11212
+ if (this.ac) {
11213
+ if (!this.ac.opened) {
11214
+ if (this._selectedDeviceId) {
11215
+ console.log("Open session with audio device Id: \'" + this._selectedDeviceId + "\' for " + this._channelCount + " channels");
11216
+ }
11217
+ else {
11218
+ console.log("Open session with default audio device for " + this._channelCount + " channels");
11219
+ }
11220
+ this.ac.open(this._channelCount, this._selectedDeviceId, this._autoGainControlConfigs);
11221
+ }
11222
+ else {
11223
+ this.ac.start();
11224
+ }
11225
+ }
11226
+ }
11227
+ downloadRecording() {
11228
+ if (this.displayRecFile) {
11229
+ let ab = this.displayRecFile.audioBuffer;
11230
+ let ww = new WavWriter();
11231
+ if (ab) {
11232
+ let wavFile = ww.writeAsync(ab, (wavFile) => {
11233
+ let blob = new Blob([wavFile], { type: 'audio/wav' });
11234
+ let rfUrl = URL.createObjectURL(blob);
11235
+ let dataDnlLnk = this.renderer.createElement('a');
11236
+ //dataDnlLnk.name = 'Recording';
11237
+ dataDnlLnk.href = rfUrl;
11238
+ this.renderer.appendChild(document.body, dataDnlLnk);
11239
+ // download property not yet in TS def
11240
+ if (this.displayRecFile) {
11241
+ let fn = this.displayRecFile.filenameString();
11242
+ fn += '_' + this.displayRecFileVersion;
11243
+ fn += '.wav';
11244
+ dataDnlLnk.download = fn;
11245
+ dataDnlLnk.click();
11246
+ }
11247
+ this.renderer.removeChild(document.body, dataDnlLnk);
11248
+ });
11249
+ }
11250
+ }
11251
+ }
11252
+ set displayRecFile(displayRecFile) {
11253
+ this._displayRecFile = displayRecFile;
11254
+ if (this._displayRecFile) {
11255
+ let ab = this._displayRecFile.audioBuffer;
11256
+ if (ab) {
11257
+ this.displayAudioClip = new AudioClip(ab);
11258
+ this.controlAudioPlayer.audioClip = this.displayAudioClip;
11259
+ }
11260
+ else {
11261
+ // clear for now ...
11262
+ this.displayAudioClip = null;
11263
+ this.controlAudioPlayer.audioClip = null;
11264
+ if (this._controlAudioPlayer && this._session) {
11265
+ //... and try to fetch from server
11266
+ this.audioFetchSubscription = this.recFileService.fetchAndApplyRecordingFile(this._controlAudioPlayer.context, this._session.project, this._displayRecFile).subscribe((rf) => {
11267
+ let fab = null;
11268
+ if (rf && this._displayRecFile) {
11269
+ fab = this._displayRecFile.audioBuffer;
11270
+ }
11271
+ else {
11272
+ this.statusMsg = 'Recording file could not be loaded.';
11273
+ this.statusAlertType = 'error';
11274
+ }
11275
+ if (fab) {
11276
+ this.displayAudioClip = new AudioClip(fab);
11277
+ }
11278
+ this.controlAudioPlayer.audioClip = this.displayAudioClip;
11279
+ this.showRecording();
11280
+ }, err => {
11281
+ console.error("Could not load recording file from server: " + err);
11282
+ this.statusMsg = 'Recording file could not be loaded: ' + err;
11283
+ this.statusAlertType = 'error';
11284
+ });
11285
+ }
11286
+ else {
11287
+ this.statusMsg = 'Recording file could not be decoded. Audio context unavailable.';
11288
+ this.statusAlertType = 'error';
11289
+ }
11290
+ }
11291
+ }
11292
+ else {
11293
+ this.displayAudioClip = null;
11294
+ this.controlAudioPlayer.audioClip = null;
11295
+ }
11296
+ this.showRecording();
11297
+ }
11298
+ get displayRecFile() {
11299
+ return this._displayRecFile;
11300
+ }
11301
+ showRecording() {
11302
+ this.controlAudioPlayer.stop();
11303
+ if (this.displayAudioClip) {
11304
+ this.levelMeasure.calcBufferLevelInfos(this.displayAudioClip.buffer, LEVEL_BAR_INTERVALL_SECONDS).then((levelInfos) => {
11305
+ this.displayLevelInfos = levelInfos;
11306
+ this.changeDetectorRef.detectChanges();
11307
+ });
11308
+ this.playStartAction.disabled = false;
11309
+ }
11310
+ else {
11311
+ // TODO
11312
+ // Setting to null does not trigger a change if it was null before (happens after nextitem() in AUTOPROGRESS mode)
11313
+ // The level bar display does not clear, it shows the last captured stream
11314
+ this.displayLevelInfos = null;
11315
+ this.playStartAction.disabled = true;
11316
+ // Collapse audio signal display if open
11317
+ if (!this.audioSignalCollapsed) {
11318
+ this.audioSignalCollapsed = true;
11319
+ }
11320
+ }
11321
+ this.changeDetectorRef.detectChanges();
11322
+ }
11323
+ updateStartActionDisableState() {
11324
+ this.transportActions.startAction.disabled = !(this.ac);
11325
+ }
11326
+ start() {
11327
+ this.statusAlertType = 'info';
11328
+ this.statusMsg = 'Starting session...';
11329
+ this.statusWaiting = false;
11330
+ if (this._session) {
11331
+ if (this._session.sealed) {
11332
+ this.readonly = true;
11333
+ this.statusMsg = 'Session sealed!';
11334
+ //let dialogRef = this.dialog.open(SessionSealedDialog, {});
11335
+ this.dialog.open(MessageDialog, {
11336
+ data: {
11337
+ type: 'error',
11338
+ title: 'Error',
11339
+ msg: "This session is sealed. Recordings cannot be added anymore.",
11340
+ advise: 'Please ask your experimenter what to do (e.g start a new session).',
11341
+ }
11342
+ });
11343
+ }
11344
+ else {
11345
+ let body = {};
11346
+ if (this._session.status === "CREATED") {
11347
+ this._session.status = "LOADED";
11348
+ body.status = this._session.status;
11349
+ if (!this._session.loadedDate) {
11350
+ this._session.loadedDate = new Date();
11351
+ body.loadedDate = this._session.loadedDate;
11352
+ }
11353
+ }
11354
+ else {
11355
+ this._session.restartedDate = new Date();
11356
+ body.restartedDate = this._session.restartedDate;
11357
+ }
11358
+ this.sessionService.patchSessionObserver(this._session, body).subscribe();
11359
+ }
11360
+ }
11361
+ //console.log("Session ID: "+this._session.session+ " status: "+this._session.status)
11362
+ this._selectedDeviceId = undefined;
11363
+ if (!this.readonly && this.ac) {
11364
+ this.statusMsg = 'Requesting audio permissions...';
11365
+ this.statusAlertType = 'info';
11366
+ this.ac.deviceInfos((mdis) => {
11367
+ let audioCaptureDeviceAvail = false;
11368
+ let audioPlayDeviceAvail = false;
11369
+ if (mdis && this.ac) {
11370
+ this.ac.printDevices(mdis);
11371
+ if (mdis.length > 0) {
11372
+ for (let mdii = 0; mdii < mdis.length; mdii++) {
11373
+ let mdi = mdis[mdii];
11374
+ let kind = mdi.kind;
11375
+ if (kind === "audioinput") {
11376
+ audioCaptureDeviceAvail = true;
11377
+ }
11378
+ else if (kind === "audiooutput") {
11379
+ audioPlayDeviceAvail = true;
11380
+ }
11381
+ }
11382
+ }
11383
+ if (this._session && this._session.type !== 'TEST_DEF_A' && this._audioDevices && this._audioDevices.length > 0) {
11384
+ let fdi = null;
11385
+ for (let adI = 0; adI < this._audioDevices.length; adI++) {
11386
+ let ad = this._audioDevices[adI];
11387
+ if (ad.playback) {
11388
+ // project audio device config for playback device
11389
+ // not used for now
11390
+ continue;
11391
+ }
11392
+ for (let mdii = 0; mdii < mdis.length; mdii++) {
11393
+ let mdi = mdis[mdii];
11394
+ let kind = mdi.kind;
11395
+ if (kind === "audioinput") {
11396
+ audioCaptureDeviceAvail = true;
11397
+ }
11398
+ else if (kind === "audiooutput") {
11399
+ audioPlayDeviceAvail = true;
11400
+ }
11401
+ if (ad.regex) {
11402
+ //console.log("Match?: \'"+mdi.label+"\' \'"+ad.name+"\'");
11403
+ if (mdi.label.match(ad.name)) {
11404
+ fdi = mdi;
11405
+ //console.log("Match!");
11406
+ }
11407
+ }
11408
+ else {
11409
+ if (mdi.label.trim() === ad.name.trim()) {
11410
+ fdi = mdi;
11411
+ }
11412
+ }
11413
+ if (fdi) {
11414
+ break;
11415
+ }
11416
+ }
11417
+ if (fdi) {
11418
+ break;
11419
+ }
11420
+ }
11421
+ if (fdi) {
11422
+ // matching device found
11423
+ // Not able to open device here since Chrome 71
11424
+ // Chrome 71 requires a user gesture before the AudioContext can be resumed
11425
+ // sessionmanager.ts:712 Open session with default audio device for 1 channels
11426
+ // capture.ts:128 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
11427
+ // push../projects/speechrecorderng/src/lib/audio/capture/capture.ts.AudioCapture.open @ capture.ts:128
11428
+ //this.ac.open(this._channelCount, fdi.deviceId);
11429
+ console.info("Set selected audio device: \'" + fdi.label + "\' Id: \'" + fdi.deviceId + "\'");
11430
+ this._selectedDeviceId = fdi.deviceId;
11431
+ this.enableStartUserGesture();
11432
+ }
11433
+ else {
11434
+ // device not found
11435
+ this.statusMsg = 'ERROR: Required audio device not available!';
11436
+ this.statusAlertType = 'error';
11437
+ this.readonly = true;
11438
+ this.dialog.open(MessageDialog, {
11439
+ data: {
11440
+ type: 'error',
11441
+ title: 'Required audio device',
11442
+ msg: "Required audio device not found",
11443
+ advice: "Please connect a suitable audio device for this project and retry (press the browser reload button)."
11444
+ }
11445
+ });
11446
+ }
11447
+ }
11448
+ else {
11449
+ if (!audioCaptureDeviceAvail && !audioPlayDeviceAvail) {
11450
+ // no device found
11451
+ this.statusMsg = 'ERROR: No audio device available!';
11452
+ this.statusAlertType = 'warn';
11453
+ //this.readonly = true;
11454
+ this.dialog.open(MessageDialog, {
11455
+ data: {
11456
+ type: 'warn',
11457
+ title: 'No audio device',
11458
+ msg: "No audio device found",
11459
+ advice: "Please connect an audio device and retry (press the browser reload button) or try to continue anyway."
11460
+ }
11461
+ });
11462
+ }
11463
+ else {
11464
+ if (!this.readonly && !audioCaptureDeviceAvail) {
11465
+ // no device found
11466
+ this.statusMsg = 'WARNING: No audio capture device available!';
11467
+ this.statusAlertType = 'warning';
11468
+ //this.readonly = true;
11469
+ this.dialog.open(MessageDialog, {
11470
+ data: {
11471
+ type: 'warning',
11472
+ title: 'No audio capture device',
11473
+ msg: "No audio capture device found",
11474
+ advice: "Please connect an audio capture device and retry (press the browser reload button) or try to continue anyway."
11475
+ }
11476
+ });
11477
+ }
11478
+ if (!audioPlayDeviceAvail) {
11479
+ // Firefox does not enumerate audiooutput devices
11480
+ // Do not show this warning, because it would always appear on Firefox
11481
+ // When https://bugzilla.mozilla.org/show_bug.cgi?id=1498512 is fixed the warning can be enabled for Firefox as well
11482
+ // It is already implemneted but kept behind a preference setting https://bugzilla.mozilla.org/show_bug.cgi?id=1152401
11483
+ // Output devices are listed if about:config media.setsinkid.enabled=true
11484
+ // but default setting is false
11485
+ if (!navigator.userAgent.match(".*Firefox.*")) {
11486
+ // no device found
11487
+ this.statusMsg = 'WARNING: No audio playback device available!';
11488
+ this.statusAlertType = 'warn';
11489
+ //this.readonly = true;
11490
+ this.dialog.open(MessageDialog, {
11491
+ data: {
11492
+ type: 'warn',
11493
+ title: 'No audio playback device',
11494
+ msg: "No audio playback device found",
11495
+ advice: "Please connect an audio playback device and retry (press the browser reload button) or try to continue anyway."
11496
+ }
11497
+ });
11498
+ }
11499
+ }
11500
+ }
11501
+ // Not able to open device here since Chrome 71
11502
+ // Chrome 71 requires a user gesture before the AudioContext can be resumed
11503
+ // sessionmanager.ts:712 Open session with default audio device for 1 channels
11504
+ // capture.ts:128 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
11505
+ // push../projects/speechrecorderng/src/lib/audio/capture/capture.ts.AudioCapture.open @ capture.ts:128
11506
+ //console.log("Open session with default audio device for "+this._channelCount+" channels");
11507
+ //this.ac.open(this._channelCount);
11508
+ // enable start gesture anyway
11509
+ this.enableStartUserGesture();
11510
+ }
11511
+ }
11512
+ });
11513
+ }
11514
+ if (this.recorderCombiPane.recordingListComp.recordingList.length > 0) {
11515
+ this.selectRecordingFile(this.recorderCombiPane.recordingListComp.recordingList[0]);
11516
+ }
11517
+ this.enableNavigation();
11518
+ }
11519
+ isRecording() {
11520
+ return (this.status === 2 /* RECORDING */);
11521
+ }
11522
+ isActive() {
11523
+ return (!(this.status === 0 /* BLOCKED */ || this.status === 1 /* IDLE */ || this.status === 4 /* ERROR */) || this.processingRecording || this.sessionService.uploadCount > 0);
11524
+ }
11525
+ updateNavigationActions() {
11526
+ this.transportActions.fwdAction.disabled = this.navigationDisabled;
11527
+ this.transportActions.bwdAction.disabled = this.navigationDisabled;
11528
+ }
11529
+ enableStartUserGesture() {
11530
+ this.statusAlertType = 'info';
11531
+ this.statusMsg = 'Ready.';
11532
+ //this.updateStartActionDisableState()
11533
+ this.transportActions.startAction.disabled = !(this.ac);
11534
+ }
11535
+ enableNavigation() {
11536
+ this.navigationDisabled = false;
11537
+ this.updateNavigationActions();
11538
+ }
11539
+ opened() {
11540
+ if (this.ac) {
11541
+ this.ac.start();
11542
+ }
11543
+ }
11544
+ started() {
11545
+ this.startedDate = new Date();
11546
+ this.transportActions.startAction.disabled = true;
11547
+ this.statusAlertType = 'info';
11548
+ this.statusMsg = 'Recording...';
11549
+ let maxRecordingTimeMs = MAX_RECORDING_TIME_MS;
11550
+ this.maxRecTimerId = window.setTimeout(() => {
11551
+ this.stopRecordingMaxRec();
11552
+ }, maxRecordingTimeMs);
11553
+ this.maxRecTimerRunning = true;
11554
+ this.status = 2 /* RECORDING */;
11555
+ this.transportActions.stopAction.disabled = false;
11556
+ }
11557
+ stopItem() {
11558
+ this.transportActions.stopAction.disabled = true;
11559
+ this.transportActions.nextAction.disabled = true;
11560
+ this.status = 3 /* STOPPING_STOP */;
11561
+ this.stopRecording();
11562
+ }
11563
+ stopRecording() {
11564
+ if (this.maxRecTimerRunning && this.maxRecTimerId != null) {
11565
+ window.clearTimeout(this.maxRecTimerId);
11566
+ this.maxRecTimerRunning = false;
11567
+ }
11568
+ if (this.ac) {
11569
+ this.ac.stop();
11570
+ }
11571
+ }
11572
+ stopRecordingMaxRec() {
11573
+ this.maxRecTimerRunning = false;
11574
+ this.status = 3 /* STOPPING_STOP */;
11575
+ if (this.ac) {
11576
+ this.ac.stop();
11577
+ }
11578
+ }
11579
+ // addRecordingFileByDescriptor(rfd:RecordingFileDescriptorImpl){
11580
+ // let prIdx=0;
11581
+ // if(this.items) {
11582
+ // let it = this.items[prIdx];
11583
+ // if (it) {
11584
+ // if (!it.recs) {
11585
+ // it.recs = new Array<SprRecordingFile>();
11586
+ // }
11587
+ //
11588
+ // } else {
11589
+ // //console.debug("WARN: No recording item with code: \"" +rfd.recording.itemcode+ "\" found.");
11590
+ // }
11591
+ // }
11592
+ // }
11593
+ //
11594
+ // addRecordingFileByPromptIndex(promptIndex:number, rf:SprRecordingFile){
11595
+ //
11596
+ // }
11597
+ stopped() {
11598
+ this.updateStartActionDisableState();
11599
+ this.transportActions.stopAction.disabled = true;
11600
+ this.transportActions.nextAction.disabled = true;
11601
+ this.transportActions.pauseAction.disabled = true;
11602
+ this.statusAlertType = 'info';
11603
+ this.statusMsg = 'Recorded.';
11604
+ //this.startStopSignalState = StartStopSignalState.IDLE;
11605
+ let ad;
11606
+ if (this.ac) {
11607
+ ad = this.ac.audioBuffer();
11608
+ //}
11609
+ //if (this._session && this._promptIndex ) {
11610
+ let sessId = 0;
11611
+ if (this._session) {
11612
+ sessId = this._session.sessionId;
11613
+ }
11614
+ // let cpIdx = this._promptIndex;
11615
+ // let it = this.items[cpIdx];
11616
+ // if (!it.recs) {
11617
+ // it.recs = new Array<RecordingFile>();
11618
+ // }
11619
+ let rf = new RecordingFile(UUID.generate(), sessId, ad);
11620
+ rf.startedDate = this.startedDate;
11621
+ // it.recs.push(rf);
11622
+ //
11623
+ // if (this.enableUploadRecordings) {
11624
+ // // TODO use SpeechRecorderconfig resp. RecfileService
11625
+ // //new REST API URL
11626
+ //
11627
+ let apiEndPoint = '';
11628
+ if (this.config && this.config.apiEndPoint) {
11629
+ apiEndPoint = this.config.apiEndPoint;
11630
+ }
11631
+ if (apiEndPoint !== '') {
11632
+ apiEndPoint = apiEndPoint + '/';
11633
+ }
11634
+ let sessionsUrl = apiEndPoint + SessionService.SESSION_API_CTX;
11635
+ let recUrl = sessionsUrl + '/' + rf.session + '/' + RECFILE_API_CTX + '/' + rf.uuid;
11636
+ //
11637
+ //
11638
+ //
11639
+ // // convert asynchronously to 16-bit integer PCM
11640
+ // // TODO could we avoid conversion to save CPU resources and transfer float PCM directly?
11641
+ // // TODO duplicate conversion for manual download
11642
+ // //console.log("Build wav writer...");
11643
+ this.processingRecording = true;
11644
+ let ww = new WavWriter();
11645
+ ww.writeAsync(ad, (wavFile) => {
11646
+ //this.postRecording(wavFile, recUrl);
11647
+ //rf._dateAsDateObj=new Date();
11648
+ rf.frames = ad.length;
11649
+ this.displayRecFile = rf;
11650
+ //this.recordingListComp.recordingList.push(rf);
11651
+ this.recorderCombiPane.push(rf);
11652
+ this.postRecordingMultipart(wavFile, rf.uuid, rf.session, rf.startedDate, recUrl);
11653
+ this.processingRecording = false;
11654
+ this.changeDetectorRef.detectChanges();
11655
+ });
11656
+ // }
11657
+ }
11658
+ // check complete session
11659
+ let complete = true;
11660
+ let autoStart = (this.status === 3 /* STOPPING_STOP */);
11661
+ this.status = 1 /* IDLE */;
11662
+ let startNext = false;
11663
+ this.navigationDisabled = false;
11664
+ this.updateNavigationActions();
11665
+ this.changeDetectorRef.detectChanges();
11666
+ }
11667
+ postRecording(wavFile, recUrl) {
11668
+ let wavBlob = new Blob([wavFile], { type: 'audio/wav' });
11669
+ let ul = new Upload(wavBlob, recUrl);
11670
+ this.uploader.queueUpload(ul);
11671
+ }
11672
+ postRecordingMultipart(wavFile, uuid, sessionId, startedDate, recUrl) {
11673
+ let wavBlob = new Blob([wavFile], { type: 'audio/wav' });
11674
+ let fd = new FormData();
11675
+ if (uuid) {
11676
+ fd.set('uuid', uuid);
11677
+ }
11678
+ if (sessionId !== null) {
11679
+ fd.set('sessionId', sessionId.toString());
11680
+ }
11681
+ if (startedDate) {
11682
+ fd.set('startedDate', startedDate.toJSON());
11683
+ }
11684
+ fd.set('audio', wavBlob);
11685
+ let ul = new Upload(fd, recUrl);
11686
+ this.uploader.queueUpload(ul);
11687
+ }
11688
+ stop() {
11689
+ if (this.ac) {
11690
+ this.ac.close();
11691
+ }
11692
+ }
11693
+ updateControlPlaybackPosition() {
11694
+ if (this._controlAudioPlayer.playPositionFrames) {
11695
+ this.recorderCombiPane.audioDisplay.playFramePosition = this._controlAudioPlayer.playPositionFrames;
11696
+ this.liveLevelDisplay.playFramePosition = this._controlAudioPlayer.playPositionFrames;
11697
+ }
11698
+ }
11699
+ audioPlayerUpdate(e) {
11700
+ if (EventType.READY === e.type) {
11701
+ }
11702
+ else if (EventType.STARTED === e.type) {
11703
+ //this.status = 'Playback...';
11704
+ this.updateTimerId = window.setInterval(() => this.updateControlPlaybackPosition(), 50);
11705
+ }
11706
+ else if (EventType.ENDED === e.type) {
11707
+ //.status='Ready.';
11708
+ window.clearInterval(this.updateTimerId);
11709
+ }
11710
+ if (!this.destroyed) {
11711
+ this.changeDetectorRef.detectChanges();
11712
+ }
11713
+ }
11714
+ closed() {
11715
+ this.statusAlertType = 'info';
11716
+ this.statusMsg = 'Session closed.';
11717
+ }
11718
+ error(msg = 'An unknown error occured during recording.', advice = 'Please retry.') {
11719
+ this.statusMsg = 'ERROR: Recording.';
11720
+ this.statusAlertType = 'error';
11721
+ this.dialog.open(MessageDialog, {
11722
+ data: {
11723
+ type: 'error',
11724
+ title: 'Recording error',
11725
+ msg: msg,
11726
+ advice: advice
11727
+ }
11728
+ });
11729
+ }
11730
+ }
11731
+ AudioRecorder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioRecorder, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.ActivatedRoute }, { token: i0.Renderer2 }, { token: i1$3.MatDialog }, { token: ProjectService }, { token: SessionService }, { token: RecordingService }, { token: SpeechRecorderUploader }, { token: SPEECHRECORDER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
11732
+ AudioRecorder.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.1", 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 }], ngImport: i0, template: `
11733
+ <app-warningbar [show]="isTestSession()" warningText="Test recording only!"></app-warningbar>
11734
+ <app-warningbar [show]="isDefaultAudioTestSession()"
11735
+ warningText="This test uses default audio device! Regular sessions may require a particular audio device (microphone)!"></app-warningbar>
11736
+ <app-recordercombipane (selectedRecordingFileChanged)="selectRecordingFile($event)"
11737
+ [audioSignalCollapsed]="audioSignalCollapsed"
11738
+ [selectedRecordingFile]="displayRecFile"
11739
+ [selectDisabled]="isActive()"
11740
+ [displayAudioClip]="displayAudioClip"
11741
+ [playStartAction]="controlAudioPlayer.startAction"
11742
+ [playStopAction]="controlAudioPlayer.stopAction"
11743
+ [playSelectionAction]="controlAudioPlayer.startSelectionAction"
11744
+ [autoPlayOnSelectToggleAction]="controlAudioPlayer.autoPlayOnSelectToggleAction"
11745
+ ></app-recordercombipane>
11746
+
11747
+ <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}"
11748
+ [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
11749
+ <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()"
11750
+ [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
11751
+ <div fxLayout="row">
11752
+ <spr-recordingitemcontrols fxFlex="10 0 1"
11753
+ [audioLoaded]="displayAudioClip?.buffer!==null"
11754
+ [playStartAction]="controlAudioPlayer?.startAction"
11755
+ [playStopAction]="controlAudioPlayer?.stopAction"
11756
+ [peakDbLvl]="peakLevelInDb"
11757
+ [agc]="this.ac?.agcStatus"
11758
+ (onShowRecordingDetails)="audioSignalCollapsed=!audioSignalCollapsed">
11759
+ </spr-recordingitemcontrols>
11760
+ <app-uploadstatus class="ricontrols dark" fxHide fxShow.xs fxFlex="0 0 0" *ngIf="enableUploadRecordings"
11761
+ [value]="uploadProgress"
11762
+ [status]="uploadStatus" [awaitNewUpload]="processingRecording"></app-uploadstatus>
11763
+ <app-readystateindicator class="ricontrols dark" fxHide fxShow.xs fxFlex="0 0 0"
11764
+ [ready]="dataSaved && !isActive()"></app-readystateindicator>
11765
+ </div>
11766
+ </div>
11767
+ <div #controlpanel class="controlpanel" fxLayout="row">
11768
+ <app-sprstatusdisplay fxHide.xs fxFlex="30% 1 30%" [statusMsg]="statusMsg" [statusAlertType]="statusAlertType"
11769
+ [statusWaiting]="statusWaiting"
11770
+ class="hidden-xs"></app-sprstatusdisplay>
11771
+ <div fxFlex="100% 0 100%" class="startstop">
11772
+ <div style="align-content: center">
11773
+ <button (click)="startStopPerform()" [disabled]="startDisabled() && stopDisabled()" mat-raised-button class="bigbutton">
11774
+ <mat-icon [style.color]="startStopNextIconColor()" inline="true">{{startStopNextIconName()}}</mat-icon>
11775
+ <span style="font-weight: bolder;font-size: 14px">{{startStopNextName()}}</span>
11776
+ </button>
11777
+ </div>
11778
+ </div>
11779
+ <div fxFlex="30% 1 30%" >
11780
+ <div fxFlex="1 1 auto"></div>
11781
+ <app-uploadstatus class="ricontrols" fxHide.xs fxFlex="0 0 0" *ngIf="enableUploadRecordings"
11782
+ [value]="uploadProgress"
11783
+ [status]="uploadStatus" [awaitNewUpload]="processingRecording"></app-uploadstatus>
11784
+ <app-readystateindicator class="ricontrols" fxHide.xs
11785
+ [ready]="dataSaved && !isActive()"></app-readystateindicator>
11786
+ </div>
11787
+ </div>
11788
+ `, 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"] }] });
11789
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: AudioRecorder, decorators: [{
11790
+ type: Component,
11791
+ args: [{
11792
+ selector: 'app-audiorecorder',
11793
+ providers: [SessionService],
11794
+ template: `
11795
+ <app-warningbar [show]="isTestSession()" warningText="Test recording only!"></app-warningbar>
11796
+ <app-warningbar [show]="isDefaultAudioTestSession()"
11797
+ warningText="This test uses default audio device! Regular sessions may require a particular audio device (microphone)!"></app-warningbar>
11798
+ <app-recordercombipane (selectedRecordingFileChanged)="selectRecordingFile($event)"
11799
+ [audioSignalCollapsed]="audioSignalCollapsed"
11800
+ [selectedRecordingFile]="displayRecFile"
11801
+ [selectDisabled]="isActive()"
11802
+ [displayAudioClip]="displayAudioClip"
11803
+ [playStartAction]="controlAudioPlayer.startAction"
11804
+ [playStopAction]="controlAudioPlayer.stopAction"
11805
+ [playSelectionAction]="controlAudioPlayer.startSelectionAction"
11806
+ [autoPlayOnSelectToggleAction]="controlAudioPlayer.autoPlayOnSelectToggleAction"
11807
+ ></app-recordercombipane>
11808
+
11809
+ <div fxLayout="row" fxLayout.xs="column" [ngStyle]="{'height.px':100,'min-height.px': 100}"
11810
+ [ngStyle.xs]="{'height.px':125,'min-height.px': 125}">
11811
+ <audio-levelbar fxFlex="1 0 1" [streamingMode]="isRecording()"
11812
+ [displayLevelInfos]="displayLevelInfos"></audio-levelbar>
11813
+ <div fxLayout="row">
11814
+ <spr-recordingitemcontrols fxFlex="10 0 1"
11815
+ [audioLoaded]="displayAudioClip?.buffer!==null"
11816
+ [playStartAction]="controlAudioPlayer?.startAction"
11817
+ [playStopAction]="controlAudioPlayer?.stopAction"
11818
+ [peakDbLvl]="peakLevelInDb"
11819
+ [agc]="this.ac?.agcStatus"
11820
+ (onShowRecordingDetails)="audioSignalCollapsed=!audioSignalCollapsed">
11821
+ </spr-recordingitemcontrols>
11822
+ <app-uploadstatus class="ricontrols dark" fxHide fxShow.xs fxFlex="0 0 0" *ngIf="enableUploadRecordings"
11823
+ [value]="uploadProgress"
11824
+ [status]="uploadStatus" [awaitNewUpload]="processingRecording"></app-uploadstatus>
11825
+ <app-readystateindicator class="ricontrols dark" fxHide fxShow.xs fxFlex="0 0 0"
11826
+ [ready]="dataSaved && !isActive()"></app-readystateindicator>
11827
+ </div>
11828
+ </div>
11829
+ <div #controlpanel class="controlpanel" fxLayout="row">
11830
+ <app-sprstatusdisplay fxHide.xs fxFlex="30% 1 30%" [statusMsg]="statusMsg" [statusAlertType]="statusAlertType"
11831
+ [statusWaiting]="statusWaiting"
11832
+ class="hidden-xs"></app-sprstatusdisplay>
11833
+ <div fxFlex="100% 0 100%" class="startstop">
11834
+ <div style="align-content: center">
11835
+ <button (click)="startStopPerform()" [disabled]="startDisabled() && stopDisabled()" mat-raised-button class="bigbutton">
11836
+ <mat-icon [style.color]="startStopNextIconColor()" inline="true">{{startStopNextIconName()}}</mat-icon>
11837
+ <span style="font-weight: bolder;font-size: 14px">{{startStopNextName()}}</span>
11838
+ </button>
11839
+ </div>
11840
+ </div>
11841
+ <div fxFlex="30% 1 30%" >
11842
+ <div fxFlex="1 1 auto"></div>
11843
+ <app-uploadstatus class="ricontrols" fxHide.xs fxFlex="0 0 0" *ngIf="enableUploadRecordings"
11844
+ [value]="uploadProgress"
11845
+ [status]="uploadStatus" [awaitNewUpload]="processingRecording"></app-uploadstatus>
11846
+ <app-readystateindicator class="ricontrols" fxHide.xs
11847
+ [ready]="dataSaved && !isActive()"></app-readystateindicator>
11848
+ </div>
11849
+ </div>
11850
+ `,
11851
+ styles: [`:host {
11852
+ flex: 2;
11853
+ background: lightgrey;
11854
+ display: flex; /* Vertical flex container: Bottom transport panel, above prompting panel */
11855
+ flex-direction: column;
11856
+ margin: 0;
11857
+ padding: 0;
11858
+ min-height: 0px;
11859
+
11860
+ /* Prevents horizontal scroll bar on swipe right */
11861
+ overflow: hidden;
11862
+ }`, `.ricontrols {
11863
+ padding: 4px;
11864
+ box-sizing: border-box;
11865
+ height: 100%;
11866
+ }`, `.dark {
11867
+ background: darkgray;
11868
+ }`, `.controlpanel {
11869
+ align-content: center;
11870
+ align-items: center;
11871
+ margin: 0;
11872
+ padding: 20px;
11873
+ min-height: min-content; /* important */
11874
+ }`, `.startstop {
11875
+ width: 100%;
11876
+ text-align: center;
11877
+ align-content: center;
11878
+ align-items: center;
11879
+ }`, `.bigbutton {
11880
+ min-width: 70px;
11881
+ min-height: 50px;
11882
+ font-size: 50px;
11883
+ border-radius: 20px;
11884
+ }`
11885
+ ]
11886
+ }]
11887
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.ActivatedRoute }, { type: i0.Renderer2 }, { type: i1$3.MatDialog }, { type: ProjectService }, { type: SessionService }, { type: RecordingService }, { type: SpeechRecorderUploader }, { type: SpeechRecorderConfig, decorators: [{
11888
+ type: Inject,
11889
+ args: [SPEECHRECORDER_CONFIG]
11890
+ }] }]; }, propDecorators: { projectName: [{
11891
+ type: Input
11892
+ }], recorderCombiPane: [{
11893
+ type: ViewChild,
11894
+ args: [RecorderCombiPane, { static: true }]
11895
+ }], liveLevelDisplay: [{
11896
+ type: ViewChild,
11897
+ args: [LevelBar, { static: true }]
11898
+ }], dataSaved: [{
11899
+ type: Input
11900
+ }], onKeyPress: [{
11901
+ type: HostListener,
11902
+ args: ['window:keypress', ['$event']]
11903
+ }], onKeyDown: [{
11904
+ type: HostListener,
11905
+ args: ['window:keydown', ['$event']]
11906
+ }] } });
11907
+
10328
11908
  const SPR_ROUTES = [
10329
11909
  { path: 'spr/session/:id', component: SpeechrecorderngComponent },
11910
+ { path: 'recorder', component: AudioRecorder },
10330
11911
  { path: 'spr/db/project/:project/session/:sessionId/recordingfile/_view/:recordingFileId', component: RecordingFileViewComponent },
10331
11912
  { path: 'spr/db/project/:project/session/:sessionId/recordingfile/_edit/:recordingFileId', component: RecordingFileUI },
10332
11913
  { path: 'spr/db/project/:project/session/:sessionId/recordingfile/_view', component: RecordingFileViewComponent },
@@ -10352,25 +11933,22 @@ class SpeechrecorderngModule {
10352
11933
  };
10353
11934
  }
10354
11935
  }
10355
- SpeechrecorderngModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechrecorderngModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10356
- SpeechrecorderngModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechrecorderngModule, declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
10357
- ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent], 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] });
10358
- SpeechrecorderngModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", 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]] });
10359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: SpeechrecorderngModule, decorators: [{
11936
+ SpeechrecorderngModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechrecorderngModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11937
+ SpeechrecorderngModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechrecorderngModule, declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
11938
+ 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] });
11939
+ SpeechrecorderngModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.1", 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]] });
11940
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.1", ngImport: i0, type: SpeechrecorderngModule, decorators: [{
10360
11941
  type: NgModule,
10361
11942
  args: [{
10362
11943
  declarations: [AudioSignal, Sonagram, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, Progress, SimpleTrafficLight, Recinstructions, Prompter, PromptContainer, PromptingContainer, Prompting, StatusDisplay,
10363
- ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent],
10364
- entryComponents: [
10365
- MessageDialog, SessionFinishedDialog
10366
- ],
10367
- exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar],
11944
+ ProgressDisplay, RecordingItemDisplay, RecordingItemControls, UploadStatus, TransportPanel, ReadyStateIndicator, ControlPanel, WarningBar, AudioRecorder, SessionManager, MessageDialog, SessionFinishedDialog, SpeechrecorderngComponent, RecordingFileViewComponent, RecordingFileUI, ScrollIntoViewDirective, RecordingFileNaviComponent, RecordingFileMetaComponent, RecordingList, RecorderCombiPane, AudioRecorder],
11945
+ exports: [MessageDialog, SpeechrecorderngComponent, ScrollPaneHorizontal, AudioClipUIContainer, AudioDisplayScrollPane, AudioDisplay, AudioDisplayPlayer, AudioDisplayControl, LevelBar, AudioRecorder],
10368
11946
  imports: [RouterModule.forChild(SPR_ROUTES), FlexLayoutModule, CommonModule, MatIconModule, MatButtonModule, MatDialogModule, MatProgressBarModule, MatProgressSpinnerModule, MatTooltipModule, HttpClientModule, MatCheckboxModule, MatCardModule, MatDividerModule, MatGridListModule, MatTableModule, MatInputModule, MatSelectModule, MatSnackBarModule],
10369
11947
  providers: [SessionService, ProjectService, ScriptService, RecordingService, RecordingFileService, SpeechRecorderUploader]
10370
11948
  }]
10371
11949
  }] });
10372
11950
 
10373
- const VERSION = '2.21.4';
11951
+ const VERSION = '2.22.0';
10374
11952
 
10375
11953
  /*
10376
11954
  * Public API Surface of speechrecorderng
@@ -10380,5 +11958,5 @@ const VERSION = '2.21.4';
10380
11958
  * Generated bundle index. Do not edit.
10381
11959
  */
10382
11960
 
10383
- export { Action, ApiType, AudioClip, AudioClipUIContainer, AudioContextProvider, AudioDisplay, AudioDisplayControl, AudioDisplayPlayer, AudioDisplayScrollPane, AudioPlayer, AudioPlayerEvent, EventType, LevelBar, MessageDialog, ProjectService, RecordingFile, RecordingFileService, RecordingFileUI, RecordingFileViewComponent, RecordingService, SPEECHRECORDER_CONFIG, ScriptService, ScrollPaneHorizontal, Selection, SessionService, SpeechRecorderConfig, SpeechrecorderngComponent, SpeechrecorderngModule, UUID, VERSION };
10384
- //# sourceMappingURL=speechrecorderng.js.map
11961
+ 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 };
11962
+ //# sourceMappingURL=speechrecorderng.mjs.map