@overwolf/ow-electron-packages-types 1.1.12-beta.2 → 1.1.12-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +69 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron-packages-types",
3
- "version": "1.1.12-beta.2",
3
+ "version": "1.1.12-beta.3",
4
4
  "description": "Type definition file for autocompletion and documentation purposes for ow-electron packages",
5
5
  "license": "MIT",
6
6
  "types": "types.d.ts",
package/types.d.ts CHANGED
@@ -4232,6 +4232,24 @@ type CrashDumpType = 'off' | 'mini' | 'full';
4232
4232
  */
4233
4233
  type ObsHostMode = 'process' | 'dll';
4234
4234
 
4235
+ /**
4236
+ * Lifecycle of the recording or replays output.
4237
+ *
4238
+ * | Value | Meaning |
4239
+ * | ------------ | -------------------------------------------------------------------- |
4240
+ * | `idle` | Not started. |
4241
+ * | `starting` | Start accepted, output not running yet - OBS waits for a capture source to hook. |
4242
+ * | `active` | Running and producing frames. |
4243
+ *
4244
+ * An output stays `starting` for as long as its capture source fails to hook,
4245
+ * with no timeout. Operations that need a running output - `captureReplay`,
4246
+ * `splitRecording` - fail with `CaptureSourceNotHooked` while it does.
4247
+ *
4248
+ * @see {@link IOverwolfRecordingApi.getRecordingState}
4249
+ * @see {@link IOverwolfRecordingApi.getReplayState}
4250
+ */
4251
+ type OutputState = 'idle' | 'starting' | 'active';
4252
+
4235
4253
  /**
4236
4254
  * Crash dump configuration for the OBS host process.
4237
4255
  */
@@ -4321,6 +4339,10 @@ interface RecordingAppOptions {
4321
4339
  * | `-998` | `ConnectionOBSError` | Failed to connect to the OBS process. |
4322
4340
  * | `-997` | `AlreadyRunning` | Operation attempted while recording is already running. |
4323
4341
  * | `-996` | `ElevationHelperMissing` | Elevated game capture requested while the High Elevation Helper isn't installed. |
4342
+ * | `-995` | `CaptureSourceNotHooked` | Output accepted by OBS but not running yet - waiting for a capture source. |
4343
+ * | `-994` | `CaptureSourceNotFound` | A game or window capture source's target process wasn't found. Retryable. |
4344
+ * | `-993` | `CaptureSourceCreationFailed`| OBS refused to create the capture source. Not retryable. |
4345
+ * | `-992` | `OBSNotReady` | OBS accepted the connection but its core isn't initialized yet. Retryable. |
4324
4346
  * | `-12` | `SplitRecordingDisabled` | Attempted to split recording when split recording is disabled. |
4325
4347
  * | `-11` | `MissingOrInvalidParameters` | One or more required parameters are missing or invalid. |
4326
4348
  * | `-10` | `NoActiveRecording` | No active recording session found. |
@@ -4348,6 +4370,10 @@ type ErrorCode =
4348
4370
  | -998 // Failed to connect to the OBS process. 'ConnectionOBSError'
4349
4371
  | -997 // Operation attempted while recording is already running. 'AlreadyRunning'
4350
4372
  | -996 // Elevated game capture requested while the High Elevation Helper isn't installed. 'ElevationHelperMissing'
4373
+ | -995 // Output accepted by OBS but not running yet - waiting for a capture source. 'CaptureSourceNotHooked'
4374
+ | -994 // A game or window capture source's target process wasn't found. Retryable. 'CaptureSourceNotFound'
4375
+ | -993 // OBS refused to create the capture source. 'CaptureSourceCreationFailed'
4376
+ | -992 // OBS accepted the connection but its core isn't initialized yet. Retryable. 'OBSNotReady'
4351
4377
  | -12 // Attempted to split recording when split recording is disabled. 'SplitRecordingDisabled'
4352
4378
  | -11 // One or more required parameters are missing or invalid. 'MissingOrInvalidParameters'
4353
4379
  | -10 // No active recording session found. 'NoActiveRecording'
@@ -4936,20 +4962,60 @@ interface IOverwolfRecordingApi {
4936
4962
  readonly binFolderPath: string;
4937
4963
 
4938
4964
  /**
4939
- * Checks if either recording or replays are currently active.
4965
+ * Whether a recording or a replays service has been started and not yet
4966
+ * stopped - `true` for both the `starting` and `active` states.
4967
+ *
4968
+ * @see {@link getRecordingState}
4969
+ * @see {@link getReplayState}
4940
4970
  */
4941
4971
  isActive(): Promise<boolean>;
4942
4972
 
4943
4973
  /**
4944
- * Checks if a recording is currently active.
4974
+ * Whether a recording has been started and not yet stopped.
4975
+ *
4976
+ * `true` from the moment {@link startRecording} resolves, including while the
4977
+ * output is still `starting` - waiting for a capture source to hook - so it
4978
+ * does not mean frames are being written.
4979
+ *
4980
+ * @see {@link getRecordingState} to tell those apart.
4945
4981
  */
4946
4982
  isRecordingActive(): Promise<boolean>;
4947
4983
 
4948
4984
  /**
4949
- * Checks if a replay session is currently active.
4985
+ * Whether a replays service has been started and not yet stopped.
4986
+ *
4987
+ * `true` from the moment {@link startReplays} resolves, including while the
4988
+ * buffer is still `starting` - waiting for a capture source to hook - so it
4989
+ * does not mean the buffer holds any footage.
4990
+ *
4991
+ * @see {@link getReplayState} to tell those apart.
4950
4992
  */
4951
4993
  isReplayActive(): Promise<boolean>;
4952
4994
 
4995
+ /**
4996
+ * The recording output's current state.
4997
+ *
4998
+ * @example
4999
+ * ```ts
5000
+ * if (await recorder.getRecordingState() === 'starting') {
5001
+ * // started, but no capture source has hooked yet - nothing is written
5002
+ * }
5003
+ * ```
5004
+ *
5005
+ * @see {@link OutputState}
5006
+ */
5007
+ getRecordingState(): Promise<OutputState>;
5008
+
5009
+ /**
5010
+ * The replays buffer's current state.
5011
+ *
5012
+ * {@link captureReplay} fails with `CaptureSourceNotHooked` while this is
5013
+ * `starting`, since the buffer holds no footage yet.
5014
+ *
5015
+ * @see {@link OutputState}
5016
+ */
5017
+ getReplayState(): Promise<OutputState>;
5018
+
4953
5019
  /**
4954
5020
  * Queries supported encoders, audio/video devices, and configuration options.
4955
5021
  *