speechrecorderng 2.25.1 → 2.25.2

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.
@@ -21,9 +21,10 @@ import * as i0 from "@angular/core";
21
21
  export declare const enum Status {
22
22
  BLOCKED = 0,
23
23
  IDLE = 1,
24
- RECORDING = 2,
25
- STOPPING_STOP = 3,
26
- ERROR = 4
24
+ STARTING = 2,
25
+ RECORDING = 3,
26
+ STOPPING_STOP = 4,
27
+ ERROR = 5
27
28
  }
28
29
  export declare class Item {
29
30
  promptAsString: string;
@@ -17,13 +17,14 @@ import * as i0 from "@angular/core";
17
17
  export declare const enum Status {
18
18
  BLOCKED = 0,
19
19
  IDLE = 1,
20
- PRE_RECORDING = 2,
21
- RECORDING = 3,
22
- POST_REC_STOP = 4,
23
- POST_REC_PAUSE = 5,
24
- STOPPING_STOP = 6,
25
- STOPPING_PAUSE = 7,
26
- ERROR = 8
20
+ STARTING = 2,
21
+ PRE_RECORDING = 3,
22
+ RECORDING = 4,
23
+ POST_REC_STOP = 5,
24
+ POST_REC_PAUSE = 6,
25
+ STOPPING_STOP = 7,
26
+ STOPPING_PAUSE = 8,
27
+ ERROR = 9
27
28
  }
28
29
  export declare class SessionManager extends BasicRecorder implements AfterViewInit, OnDestroy, AudioCaptureListener, ChunkAudioBufferReceiver {
29
30
  private changeDetectorRef;
@@ -1 +1 @@
1
- export declare const VERSION = "2.25.1";
1
+ export declare const VERSION = "2.25.2";
@@ -1,11 +1,23 @@
1
1
  import { BehaviorSubject } from "rxjs";
2
+ /**
3
+ * Utility to prevent devices from screen lock.
4
+ * If supported uses the HTML5 wake lock API, if not, plays an invisible video.
5
+ *
6
+ * Note: I've used the GitHub project richtr/nosleep.js for that. The worked in most cases, but failed sometimes on an
7
+ * Android smartphone.
8
+ */
2
9
  export declare class WakeLockManager {
3
10
  get behaviorSubject(): BehaviorSubject<boolean>;
4
11
  private wakeLockSentinel;
5
12
  private mp4VideoElement?;
6
13
  private wakeLockApiSupported;
14
+ private wakeLockRetryCount;
15
+ private userAgent?;
16
+ private randomSeekRequired;
7
17
  private _behaviorSubject;
18
+ private readonly VIDEO_LENGTH;
8
19
  constructor();
9
20
  enableWakeLock(): void;
21
+ private startWakeLockVideo;
10
22
  disableWakeLock(): void;
11
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speechrecorderng",
3
- "version": "2.25.1",
3
+ "version": "2.25.2",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "~13.3.2",
6
6
  "@angular/cdk": "~13.3.2",