@overwolf/ow-electron-packages-types 1.1.14-beta.0 → 1.1.14-beta.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types.d.ts +68 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron-packages-types",
3
- "version": "1.1.14-beta.0",
3
+ "version": "1.1.14-beta.2",
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
@@ -4565,16 +4565,17 @@ interface ReplayOptions extends RecordingBaseOptions {
4565
4565
  rootFolder: string;
4566
4566
 
4567
4567
  /**
4568
- * How long (ms) to wait for OBS to acknowledge a stop before force-killing
4569
- * the process. Defaults to `30000` ms.
4568
+ * How long (ms) a replays stop may take before it is forced. A forced stop
4569
+ * ends on the next frame and drops whatever the encoder had not caught up
4570
+ * on yet. If it still has not stopped 30 s later, OBS is restarted and
4571
+ * every running output is reported stopped with `ProcessTerminated`.
4572
+ * Defaults to `60000` ms.
4570
4573
  */
4571
4574
  stopReplaysKillTimeoutMs?: number;
4572
4575
 
4573
4576
  /**
4574
- * Output frame-skip rate (0–1) at which OBS is considered critically
4575
- * overloaded during an active recording. If this threshold is reached when
4576
- * the stop-replays timeout fires, OBS is force-killed even while a recording
4577
- * is active. Defaults to `0.5`.
4577
+ * @deprecated No effect. Stops are now forced and, if needed, OBS restarted
4578
+ * on a fixed schedule; see `stopReplaysKillTimeoutMs`.
4578
4579
  */
4579
4580
  criticalEncodeSkipRate?: number;
4580
4581
  }
@@ -4682,6 +4683,10 @@ interface CaptureReplayOptions {
4682
4683
  /**
4683
4684
  * The video length, in milliseconds, to include prior to the time this method is called.
4684
4685
  * This allows capturing moments that happened just before the replay trigger.
4686
+ *
4687
+ * A clip must start on a keyframe, so it starts on the last keyframe before
4688
+ * that point and can be up to one keyframe interval longer than asked. Set
4689
+ * `keyint_sec` (e.g. `1`) in the video encoder settings for tighter clips.
4685
4690
  */
4686
4691
  pastDuration: number;
4687
4692
 
@@ -4942,6 +4947,45 @@ interface RecorderStats {
4942
4947
  outputTotalFrames: number;
4943
4948
  }
4944
4949
 
4950
+ /**
4951
+ * What a 'performance-warning' measured. Both show as a choppy or frozen
4952
+ * video, but different settings fix them.
4953
+ * - `encoding-lag`: the encoder could not keep up, so frames were skipped and
4954
+ * the previous one repeated. The video also falls behind real time, so clips
4955
+ * and recordings can hold older footage than requested. Use a faster encoder
4956
+ * preset, a lower resolution or frame rate, or another encoder. Bitrate has
4957
+ * little effect.
4958
+ * - `rendering-lag`: the recorder could not compose frames in time, usually
4959
+ * because the game takes the whole GPU. Lower the frame rate (most effective)
4960
+ * or the resolution; an encoder change does not help.
4961
+ */
4962
+ type PerformanceWarningType = 'encoding-lag' | 'rendering-lag';
4963
+
4964
+ /**
4965
+ * Reported with the 'performance-warning' event.
4966
+ *
4967
+ * Measured since the recording or replays started, after a warm-up of 1000
4968
+ * rendered frames, and over at least 1000 more.
4969
+ */
4970
+ interface PerformanceWarningArgs {
4971
+ type: PerformanceWarningType;
4972
+
4973
+ /**
4974
+ * Percentage of frames skipped, 0 to 100.
4975
+ */
4976
+ percentage: number;
4977
+
4978
+ /**
4979
+ * Number of frames skipped.
4980
+ */
4981
+ skippedFrames: number;
4982
+
4983
+ /**
4984
+ * Number of frames measured.
4985
+ */
4986
+ totalFrames: number;
4987
+ }
4988
+
4945
4989
  /**
4946
4990
  * Recording error information including a specific error code and description.
4947
4991
  * Useful for detailed debugging and error handling during recording operations.
@@ -5235,6 +5279,18 @@ interface IOverwolfRecordingApi {
5235
5279
  *
5236
5280
  */
5237
5281
  on(eventName: 'stats', listener: (args: RecorderStats) => void): this;
5282
+
5283
+ /**
5284
+ * @event Fired on every 5% rise of skipped frames while recording or replays
5285
+ * run (5%, 10%, ...).
5286
+ *
5287
+ * The recorder only reports; lowering the capture settings is the caller's
5288
+ * decision. See {@link PerformanceWarningType} for what helps.
5289
+ */
5290
+ on(
5291
+ eventName: 'performance-warning',
5292
+ listener: (args: PerformanceWarningArgs) => void,
5293
+ ): this;
5238
5294
  }
5239
5295
 
5240
5296
 
@@ -5572,8 +5628,8 @@ type GpuPreference = "default" | "highPerformance";
5572
5628
  * Why the shared-texture rendering path cannot be used with the current game.
5573
5629
  *
5574
5630
  * - `unsupportedGraphicsApi`—The game's graphics API cannot composite GPU textures
5575
- * (D3D9 / OpenGL / Vulkan). Nothing to fix; the overlay uses the CPU copy path for this
5576
- * game.
5631
+ * (D3D9 / Vulkan, or OpenGL on a GPU driver without `WGL_NV_DX_interop2`). Nothing to
5632
+ * fix; the overlay uses the CPU copy path for this game.
5577
5633
  * - `gpuAdapterMismatch`—The game renders on a different GPU adapter than Chromium,
5578
5634
  * and a shared texture handle can only be opened on the adapter that created it. Fixable
5579
5635
  * with {@link IOverwolfOverlayApi.setGpuPreference} and an application restart, or from
@@ -6085,7 +6141,8 @@ interface GameWindowInfo {
6085
6141
 
6086
6142
  /**
6087
6143
  * Indicates whether the game's **graphics API** supports shared-texture (GPU) overlay
6088
- * rendering: `true` for D3D11 / D3D12, `false` for D3D9 / OpenGL / Vulkan.
6144
+ * rendering: `true` for D3D11 / D3D12, and for OpenGL when the GPU driver supports
6145
+ * `WGL_NV_DX_interop2`; `false` for D3D9 / Vulkan and for OpenGL without it.
6089
6146
  *
6090
6147
  * This is a capability probe only — to decide whether the path can actually be used
6091
6148
  * on this machine, gate on {@link GameWindowInfo.isSharedTextureAvailable} instead.
@@ -6819,7 +6876,8 @@ interface IOverwolfOverlayApi extends EventEmitter {
6819
6876
  * the reason:
6820
6877
  *
6821
6878
  * - `unsupportedGraphicsApi`—the game's graphics API cannot composite GPU textures
6822
- * (D3D9 / OpenGL / Vulkan). Nothing to fix.
6879
+ * (D3D9 / Vulkan, or OpenGL on a GPU driver without `WGL_NV_DX_interop2`). Nothing to
6880
+ * fix.
6823
6881
  * - `gpuAdapterMismatch`—the game renders on a **different GPU adapter than
6824
6882
  * Chromium**; a shared texture handle can only be opened on the adapter that created it.
6825
6883
  * Fixable with {@link IOverwolfOverlayApi.setGpuPreference} and a restart, or from the