@overwolf/ow-electron-packages-types 1.1.6-beta.1 → 1.1.6-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.
- package/package.json +1 -1
- package/types.d.ts +204 -21
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -70,9 +70,9 @@ interface IOverwolfUtilityApi {
|
|
|
70
70
|
* Allows injection into high elevation games.
|
|
71
71
|
* No-ops if files are already present.
|
|
72
72
|
*
|
|
73
|
-
* @throws
|
|
74
|
-
* @throws
|
|
75
|
-
* @throws
|
|
73
|
+
* @throws `HelperInstallError` `exitCode 1223` — user cancelled the UAC prompt (ERROR_CANCELLED)
|
|
74
|
+
* @throws `HelperInstallError` `err.exitCode !== 1223` — the installer process failed. Log `err.exitCode` and investigate.
|
|
75
|
+
* @throws `HelperInstallError` any other non-zero exitCode — installation failed.
|
|
76
76
|
*
|
|
77
77
|
* @remarks
|
|
78
78
|
* The helper binaries are installed to:
|
|
@@ -1782,7 +1782,8 @@ type VideoRecordingSplitType =
|
|
|
1782
1782
|
*
|
|
1783
1783
|
* This interface serves as a blueprint for all audio filters within the system,
|
|
1784
1784
|
* ensuring they have a unique identifier and a flexible container for settings.
|
|
1785
|
-
*
|
|
1785
|
+
*
|
|
1786
|
+
* @example
|
|
1786
1787
|
* ```typescript
|
|
1787
1788
|
* const lowPass: AudioFilterBase = {
|
|
1788
1789
|
* id: 'low-pass-001',
|
|
@@ -1808,7 +1809,8 @@ export interface AudioFilterBase {
|
|
|
1808
1809
|
|
|
1809
1810
|
/**
|
|
1810
1811
|
* A specialized filter for dynamic range compression.
|
|
1811
|
-
*
|
|
1812
|
+
*
|
|
1813
|
+
* @example
|
|
1812
1814
|
* ```typescript
|
|
1813
1815
|
* const vocalComp: AudioCompressorFilter = {
|
|
1814
1816
|
* id: 'compressor_filter',
|
|
@@ -1863,7 +1865,8 @@ export interface AudioCompressorFilter extends AudioFilterBase {
|
|
|
1863
1865
|
|
|
1864
1866
|
/**
|
|
1865
1867
|
* A specialized filter for dynamic range expansion or noise gating.
|
|
1866
|
-
*
|
|
1868
|
+
*
|
|
1869
|
+
* @example
|
|
1867
1870
|
* ```typescript
|
|
1868
1871
|
* const noiseGate: AudioExpanderFilter = {
|
|
1869
1872
|
* id: 'expander_filter',
|
|
@@ -1932,7 +1935,8 @@ export interface AudioExpanderFilter extends AudioFilterBase {
|
|
|
1932
1935
|
|
|
1933
1936
|
/**
|
|
1934
1937
|
* A simple filter used to adjust the volume or amplitude of an audio signal.
|
|
1935
|
-
*
|
|
1938
|
+
*
|
|
1939
|
+
* @example
|
|
1936
1940
|
* ```typescript
|
|
1937
1941
|
* const boost: AudioGainFilter = {
|
|
1938
1942
|
* id: 'gain_filter',
|
|
@@ -1963,7 +1967,8 @@ export interface AudioGainFilter extends AudioFilterBase {
|
|
|
1963
1967
|
|
|
1964
1968
|
/**
|
|
1965
1969
|
* A utility filter that flips the phase of the audio signal by 180 degrees.
|
|
1966
|
-
*
|
|
1970
|
+
*
|
|
1971
|
+
* @example
|
|
1967
1972
|
* ```typescript
|
|
1968
1973
|
* const phaseFlip: AudioInvertPolarityFilter = {
|
|
1969
1974
|
* id: 'invert_polarity_filter',
|
|
@@ -1985,7 +1990,8 @@ export interface AudioInvertPolarityFilter extends AudioFilterBase {
|
|
|
1985
1990
|
|
|
1986
1991
|
/**
|
|
1987
1992
|
* A specialized dynamics processor used to prevent an audio signal from exceeding a specific decibel level.
|
|
1988
|
-
*
|
|
1993
|
+
*
|
|
1994
|
+
* @example
|
|
1989
1995
|
* ```typescript
|
|
1990
1996
|
* const masterLimiter: AudioLimiterFilter = {
|
|
1991
1997
|
* id: 'limiter_filter',
|
|
@@ -2025,7 +2031,8 @@ export interface AudioLimiterFilter extends AudioFilterBase {
|
|
|
2025
2031
|
/**
|
|
2026
2032
|
* A noise gate filter used to attenuate signals that fall below a certain threshold.
|
|
2027
2033
|
* It is primarily used to remove background noise during silent passages.
|
|
2028
|
-
*
|
|
2034
|
+
*
|
|
2035
|
+
* @example
|
|
2029
2036
|
* ```typescript
|
|
2030
2037
|
* const gate: AudioNoiseGateFilter = {
|
|
2031
2038
|
* id: 'noise_gate_filter',
|
|
@@ -2083,7 +2090,8 @@ export interface AudioNoiseGateFilter extends AudioFilterBase {
|
|
|
2083
2090
|
|
|
2084
2091
|
/**
|
|
2085
2092
|
* An advanced noise suppression filter utilizing machine learning or digital signal processing algorithms.
|
|
2086
|
-
*
|
|
2093
|
+
*
|
|
2094
|
+
* @example
|
|
2087
2095
|
* ```typescript
|
|
2088
2096
|
* const aiDenoise: AudioNoiseSuppressFilterV2 = {
|
|
2089
2097
|
* id: 'noise_suppress_filter_v2',
|
|
@@ -3817,17 +3825,20 @@ interface EncoderInformation {
|
|
|
3817
3825
|
|
|
3818
3826
|
/**
|
|
3819
3827
|
* Crash dump detail level for the OBS host process.
|
|
3828
|
+
* - `off`: no crash dumps are captured. The OBS text crash report is still
|
|
3829
|
+
* written, and dump files already on disk are left untouched.
|
|
3820
3830
|
* - `mini`: small dump (thread stacks + module list); the default.
|
|
3821
3831
|
* - `full`: complete-memory dump; large — opt-in for debugging only.
|
|
3822
3832
|
*/
|
|
3823
|
-
type CrashDumpType = 'mini' | 'full';
|
|
3833
|
+
type CrashDumpType = 'off' | 'mini' | 'full';
|
|
3824
3834
|
|
|
3825
3835
|
/**
|
|
3826
3836
|
* Crash dump configuration for the OBS host process.
|
|
3827
3837
|
*/
|
|
3828
3838
|
interface CrashDumpOptions {
|
|
3829
3839
|
/**
|
|
3830
|
-
* Dump detail level; defaults to `mini`.
|
|
3840
|
+
* Dump detail level; defaults to `mini`. Set to `off` to disable crash dump
|
|
3841
|
+
* capture entirely. See {@link CrashDumpType}.
|
|
3831
3842
|
*/
|
|
3832
3843
|
type?: CrashDumpType;
|
|
3833
3844
|
|
|
@@ -3875,8 +3886,9 @@ interface RecordingAppOptions {
|
|
|
3875
3886
|
maxLogFiles?: number;
|
|
3876
3887
|
|
|
3877
3888
|
/**
|
|
3878
|
-
* Tune OBS-host crash dumps. Mini-dump capture is
|
|
3879
|
-
*
|
|
3889
|
+
* Tune OBS-host crash dumps. Mini-dump capture is on by default; these
|
|
3890
|
+
* options change the detail level and retention count, or turn capture off
|
|
3891
|
+
* entirely via `type: 'off'`.
|
|
3880
3892
|
*
|
|
3881
3893
|
* @see {@link CrashDumpOptions}
|
|
3882
3894
|
*/
|
|
@@ -4994,6 +5006,43 @@ type ZOrderType = "default" | "topMost" | "bottomMost";
|
|
|
4994
5006
|
|
|
4995
5007
|
|
|
4996
5008
|
|
|
5009
|
+
/**
|
|
5010
|
+
* Which GPU Windows should run this application on.
|
|
5011
|
+
*
|
|
5012
|
+
* - `default`—No preference is recorded; Windows decides (normally the adapter driving the primary display).
|
|
5013
|
+
* - `highPerformance`—Pin the application to the high-performance (usually discrete) adapter.
|
|
5014
|
+
*
|
|
5015
|
+
* @see {@link IOverwolfOverlayApi.setGpuPreference}.
|
|
5016
|
+
*
|
|
5017
|
+
* @since 2.0.5
|
|
5018
|
+
*/
|
|
5019
|
+
type GpuPreference = "default" | "highPerformance";
|
|
5020
|
+
|
|
5021
|
+
/**
|
|
5022
|
+
* Why the shared-texture rendering path cannot be used with the current game.
|
|
5023
|
+
*
|
|
5024
|
+
* - `unsupportedGraphicsApi`—The game's graphics API cannot composite GPU textures
|
|
5025
|
+
* (D3D9 / OpenGL / Vulkan). Nothing to fix; the overlay uses the CPU copy path for this
|
|
5026
|
+
* game.
|
|
5027
|
+
* - `gpuAdapterMismatch`—The game renders on a different GPU adapter than Chromium,
|
|
5028
|
+
* and a shared texture handle can only be opened on the adapter that created it. Fixable
|
|
5029
|
+
* with {@link IOverwolfOverlayApi.setGpuPreference} and an application restart.
|
|
5030
|
+
* - `copyFailure`—The game repeatedly failed to open the shared texture handles it
|
|
5031
|
+
* received in-game. The overlay retried, then fell back to the CPU copy path.
|
|
5032
|
+
* {@link IOverwolfOverlayApi.setGpuPreference} may help when the root cause is
|
|
5033
|
+
* adapter-related.
|
|
5034
|
+
*
|
|
5035
|
+
* @see {@link IOverwolfOverlayApi.on} `shared-texture-unavailable`.
|
|
5036
|
+
*
|
|
5037
|
+
* @since 2.0.5
|
|
5038
|
+
*/
|
|
5039
|
+
type SharedTextureUnavailableReason =
|
|
5040
|
+
| "unsupportedGraphicsApi"
|
|
5041
|
+
| "gpuAdapterMismatch"
|
|
5042
|
+
| "copyFailure";
|
|
5043
|
+
|
|
5044
|
+
|
|
5045
|
+
|
|
4997
5046
|
/**
|
|
4998
5047
|
* Overlay configuration options for creating or modifying an overlay window.
|
|
4999
5048
|
*
|
|
@@ -5079,6 +5128,8 @@ interface OverlayWindowOptions
|
|
|
5079
5128
|
*
|
|
5080
5129
|
* @default false
|
|
5081
5130
|
*
|
|
5131
|
+
* @see {@link https://www.electronjs.org/docs/latest/tutorial/offscreen-rendering#software-output-device | Software output device}
|
|
5132
|
+
*
|
|
5082
5133
|
* @since 1.13.20
|
|
5083
5134
|
*/
|
|
5084
5135
|
disableHardwareAcceleration?: boolean;
|
|
@@ -5093,10 +5144,11 @@ interface OverlayWindowOptions
|
|
|
5093
5144
|
* composites it without any CPU-side pixel copy, significantly lowering
|
|
5094
5145
|
* per-frame CPU overhead.
|
|
5095
5146
|
*
|
|
5096
|
-
* Requires hardware acceleration to be enabled and the
|
|
5097
|
-
*
|
|
5098
|
-
* The flag is silently
|
|
5099
|
-
*
|
|
5147
|
+
* Requires hardware acceleration to be enabled and the shared-texture path to
|
|
5148
|
+
* be usable with the current game (see
|
|
5149
|
+
* {@link GameWindowInfo.isSharedTextureAvailable}). The flag is silently
|
|
5150
|
+
* ignored when either condition is not met, falling back to the
|
|
5151
|
+
* shared-memory (CPU copy) path.
|
|
5100
5152
|
*
|
|
5101
5153
|
* The rendering path follows the active game: when the overlay moves to a
|
|
5102
5154
|
* different game, a shared-texture window automatically falls back to the
|
|
@@ -5106,6 +5158,8 @@ interface OverlayWindowOptions
|
|
|
5106
5158
|
*
|
|
5107
5159
|
* @default false
|
|
5108
5160
|
*
|
|
5161
|
+
* @see {@link https://dev.overwolf.com/ow-electron/reference/examples/overlay | Overlay examples}
|
|
5162
|
+
*
|
|
5109
5163
|
* @since 2.0.2
|
|
5110
5164
|
*/
|
|
5111
5165
|
useSharedTexture?: boolean;
|
|
@@ -5465,10 +5519,36 @@ interface GameWindowInfo {
|
|
|
5465
5519
|
readonly isOOPOFullscreenRenderingDisabled?: boolean;
|
|
5466
5520
|
|
|
5467
5521
|
/**
|
|
5468
|
-
* Indicates
|
|
5522
|
+
* Indicates whether the game's **graphics API** supports shared-texture (GPU) overlay
|
|
5523
|
+
* rendering: `true` for D3D11 / D3D12, `false` for D3D9 / OpenGL / Vulkan.
|
|
5524
|
+
*
|
|
5525
|
+
* This is a capability probe only — to decide whether the path can actually be used
|
|
5526
|
+
* on this machine, gate on {@link GameWindowInfo.isSharedTextureAvailable} instead.
|
|
5527
|
+
*
|
|
5528
|
+
* `undefined` until the game is injected and its graphics API is detected.
|
|
5529
|
+
*
|
|
5469
5530
|
* @since 2.0.0
|
|
5470
5531
|
*/
|
|
5471
5532
|
readonly isSharedTextureSupported?: boolean;
|
|
5533
|
+
|
|
5534
|
+
/**
|
|
5535
|
+
* Indicates whether shared-texture (GPU) overlay rendering can actually be used with this
|
|
5536
|
+
* game — gate `useSharedTexture` window creation on it.
|
|
5537
|
+
*
|
|
5538
|
+
* `true` when the game's graphics API supports it
|
|
5539
|
+
* ({@link GameWindowInfo.isSharedTextureSupported}), no GPU adapter mismatch was detected,
|
|
5540
|
+
* **and** the path was not abandoned after repeated in-game copy failures. When it is
|
|
5541
|
+
* `false`, the `shared-texture-unavailable` event names the reason. It can therefore turn
|
|
5542
|
+
* `false` mid-game: the copy-failure verdict is reached only after frames were sent and
|
|
5543
|
+
* repeatedly failed to draw.
|
|
5544
|
+
*
|
|
5545
|
+
* `undefined` until the game is injected and its graphics API is detected.
|
|
5546
|
+
*
|
|
5547
|
+
* @see {@link https://dev.overwolf.com/ow-electron/reference/examples/overlay | Overlay examples}
|
|
5548
|
+
*
|
|
5549
|
+
* @since 2.0.5
|
|
5550
|
+
*/
|
|
5551
|
+
readonly isSharedTextureAvailable?: boolean;
|
|
5472
5552
|
}
|
|
5473
5553
|
|
|
5474
5554
|
/**
|
|
@@ -5809,7 +5889,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
5809
5889
|
* Allows injection into high elevation games.
|
|
5810
5890
|
* No-ops if files are already present.
|
|
5811
5891
|
*
|
|
5812
|
-
* @throws
|
|
5892
|
+
* @throws `HelperInstallError`
|
|
5813
5893
|
* - `exitCode 1223` — user cancelled the UAC prompt (ERROR_CANCELLED)
|
|
5814
5894
|
* - `err.exitCode !== 1223` — the installer process failed. Log `err.exitCode` and investigate.
|
|
5815
5895
|
* - any other non-zero exitCode — installation failed.
|
|
@@ -5929,6 +6009,65 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
5929
6009
|
*/
|
|
5930
6010
|
takeScreenshot(filePath: string, format?: 'jpg' | 'bmp'): Promise<void>;
|
|
5931
6011
|
|
|
6012
|
+
/**
|
|
6013
|
+
* Records a Windows per-executable GPU preference for this application, so
|
|
6014
|
+
* Chromium's GPU process runs on the same adapter as games do.
|
|
6015
|
+
*
|
|
6016
|
+
* The shared-texture path requires that: a shared GPU texture handle can only be opened on
|
|
6017
|
+
* the adapter that created it, and Chromium takes the adapter driving the **primary
|
|
6018
|
+
* display** while games run on the discrete GPU. When those differ the overlay falls back
|
|
6019
|
+
* to the CPU copy path and emits `shared-texture-unavailable`.
|
|
6020
|
+
*
|
|
6021
|
+
* **An application restart is normally required.** DXGI reads this preference when a
|
|
6022
|
+
* process creates its D3D device, which Chromium's GPU process has already done by the time
|
|
6023
|
+
* this API is reachable. Call {@link IOverwolfOverlayApi.getGpuPreference} to learn whether
|
|
6024
|
+
* the application is *already* aligned and therefore needs no restart; this method is
|
|
6025
|
+
* idempotent, so calling it unconditionally is safe.
|
|
6026
|
+
*
|
|
6027
|
+
* **Side effects — read before calling.** It moves the **entire application's**
|
|
6028
|
+
* rendering to that GPU, draining laptop battery and keeping the discrete GPU awake; it is
|
|
6029
|
+
* persistent, user-visible Windows state under
|
|
6030
|
+
* Settings → System → Display → Graphics; and it is keyed on the executable
|
|
6031
|
+
* path, so moving or renaming the application leaves a stale entry behind. It is therefore
|
|
6032
|
+
* **never applied implicitly**. Pass `'default'` to remove the entry, the recommended
|
|
6033
|
+
* revert on uninstall or when the user turns the overlay off.
|
|
6034
|
+
*
|
|
6035
|
+
* @param preference - `'highPerformance'` to pin this application to the high-performance
|
|
6036
|
+
* adapter, or `'default'` to remove the entry and let Windows decide.
|
|
6037
|
+
* @returns A promise that resolves once the preference has been recorded.
|
|
6038
|
+
* @throws If the registry cannot be written, or on a non-Windows platform.
|
|
6039
|
+
* @see {@link GpuPreference}.
|
|
6040
|
+
* @see {@link https://dev.overwolf.com/ow-electron/reference/examples/overlay | Overlay examples}
|
|
6041
|
+
*
|
|
6042
|
+
* @example
|
|
6043
|
+
* ```ts
|
|
6044
|
+
* overlay.on('shared-texture-unavailable', async (reason) => {
|
|
6045
|
+
* if (reason !== 'gpuAdapterMismatch') return;
|
|
6046
|
+
* if ((await overlay.getGpuPreference()) === 'highPerformance') return;
|
|
6047
|
+
* await overlay.setGpuPreference('highPerformance');
|
|
6048
|
+
* promptUserToRestart(); // takes effect on the next launch
|
|
6049
|
+
* });
|
|
6050
|
+
* ```
|
|
6051
|
+
*
|
|
6052
|
+
* @since 2.0.5
|
|
6053
|
+
*/
|
|
6054
|
+
setGpuPreference(preference: GpuPreference): Promise<void>;
|
|
6055
|
+
|
|
6056
|
+
/**
|
|
6057
|
+
* Returns the GPU preference currently recorded for this application's executable.
|
|
6058
|
+
*
|
|
6059
|
+
* Resolves to `'default'` when no entry exists — "no entry" and "let Windows decide"
|
|
6060
|
+
* are the same state, so this never resolves `undefined`.
|
|
6061
|
+
*
|
|
6062
|
+
* @returns A promise resolving to the recorded preference.
|
|
6063
|
+
* @throws On a non-Windows platform.
|
|
6064
|
+
* @see {@link IOverwolfOverlayApi.setGpuPreference}.
|
|
6065
|
+
* @see {@link GpuPreference}.
|
|
6066
|
+
*
|
|
6067
|
+
* @since 2.0.5
|
|
6068
|
+
*/
|
|
6069
|
+
getGpuPreference(): Promise<GpuPreference>;
|
|
6070
|
+
|
|
5932
6071
|
/**
|
|
5933
6072
|
* Fires when an internal error occurs within the overlay system.
|
|
5934
6073
|
*/
|
|
@@ -6050,6 +6189,50 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
6050
6189
|
eventName: 'game-input-exclusive-mode-changed',
|
|
6051
6190
|
listener: (info: GameInputInterception) => void,
|
|
6052
6191
|
): this;
|
|
6192
|
+
|
|
6193
|
+
/**
|
|
6194
|
+
* Fires when the shared-texture rendering path cannot be used with the current game, with
|
|
6195
|
+
* the reason:
|
|
6196
|
+
*
|
|
6197
|
+
* - `unsupportedGraphicsApi`—the game's graphics API cannot composite GPU textures
|
|
6198
|
+
* (D3D9 / OpenGL / Vulkan). Nothing to fix.
|
|
6199
|
+
* - `gpuAdapterMismatch`—the game renders on a **different GPU adapter than
|
|
6200
|
+
* Chromium**; a shared texture handle can only be opened on the adapter that created it.
|
|
6201
|
+
* Fixable with {@link IOverwolfOverlayApi.setGpuPreference} and a restart; both adapters
|
|
6202
|
+
* are named in the overlay log.
|
|
6203
|
+
* - `copyFailure`—the game **repeatedly failed to open the shared texture handles it
|
|
6204
|
+
* received in-game**. The overlay retried, then abandoned the path for this game.
|
|
6205
|
+
* {@link IOverwolfOverlayApi.setGpuPreference} may help when the root cause is
|
|
6206
|
+
* adapter-related; details are in the overlay log.
|
|
6207
|
+
*
|
|
6208
|
+
* Fires at most **once per injected game**. The first two reasons are detected when the
|
|
6209
|
+
* game's graphics are detected, before any frame is sent; `copyFailure` is reached only
|
|
6210
|
+
* after frames were sent and repeatedly failed to draw. Either way, the affected overlay
|
|
6211
|
+
* windows have already been switched to the CPU copy path by the time the event fires, so
|
|
6212
|
+
* they stay visible and interactive, and
|
|
6213
|
+
* {@link GameWindowInfo.isSharedTextureAvailable} reports `false` for the game.
|
|
6214
|
+
*
|
|
6215
|
+
* @param eventName - `shared-texture-unavailable`
|
|
6216
|
+
* @param listener - Callback invoked once for the current game with the reason.
|
|
6217
|
+
*
|
|
6218
|
+
* @see {@link https://dev.overwolf.com/ow-electron/reference/examples/overlay | Overlay examples}
|
|
6219
|
+
*
|
|
6220
|
+
* @example
|
|
6221
|
+
* ```ts
|
|
6222
|
+
* overlay.on('shared-texture-unavailable', async (reason) => {
|
|
6223
|
+
* if (reason !== 'gpuAdapterMismatch') return;
|
|
6224
|
+
* if ((await overlay.getGpuPreference()) === 'highPerformance') return;
|
|
6225
|
+
* await overlay.setGpuPreference('highPerformance');
|
|
6226
|
+
* promptUserToRestart();
|
|
6227
|
+
* });
|
|
6228
|
+
* ```
|
|
6229
|
+
*
|
|
6230
|
+
* @since 2.0.5
|
|
6231
|
+
*/
|
|
6232
|
+
on(
|
|
6233
|
+
eventName: 'shared-texture-unavailable',
|
|
6234
|
+
listener: (reason: SharedTextureUnavailableReason) => void,
|
|
6235
|
+
): this;
|
|
6053
6236
|
}
|
|
6054
6237
|
|
|
6055
6238
|
|