@overwolf/ow-electron-packages-types 1.1.2-beta.4 → 1.1.2-beta.7

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 +2 -2
  2. package/types.d.ts +100 -24
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron-packages-types",
3
- "version": "1.1.2-beta.4",
3
+ "version": "1.1.2-beta.7",
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",
@@ -37,4 +37,4 @@
37
37
  "dependencies": {
38
38
  "glob": "^13.0.0"
39
39
  }
40
- }
40
+ }
package/types.d.ts CHANGED
@@ -940,6 +940,38 @@ interface VideoInformation {
940
940
  readonly defaultEncoder: kSupportedEncodersTypes;
941
941
  }
942
942
 
943
+ /**
944
+ * Information about the current Xbox Game DVR state on the system.
945
+ *
946
+ * Xbox Game DVR captures game video in the background and can interfere with
947
+ * recording. This interface reports whether it is active and the underlying
948
+ * registry values that drive it.
949
+ *
950
+ * @example
951
+ * const dvr: XboxDVRInfo = {
952
+ * enabled: true,
953
+ * appCaptureEnabled: true,
954
+ * gameDVREnabled: false
955
+ * };
956
+ */
957
+ interface XboxDVRInfo {
958
+ /**
959
+ * `true` if Xbox Game DVR is active via either capture path
960
+ * (`appCaptureEnabled || gameDVREnabled`).
961
+ */
962
+ readonly enabled: boolean;
963
+
964
+ /**
965
+ * The `AppCaptureEnabled` registry value.
966
+ */
967
+ readonly appCaptureEnabled: boolean;
968
+
969
+ /**
970
+ * The `GameDVR_Enabled` registry value.
971
+ */
972
+ readonly gameDVREnabled: boolean;
973
+ }
974
+
943
975
  /**
944
976
  * Information about the complete recording configuration for the current system.
945
977
  *
@@ -975,6 +1007,13 @@ interface RecordingInformation {
975
1007
  * @see MonitorInfo
976
1008
  */
977
1009
  monitors: MonitorInfo[];
1010
+
1011
+ /**
1012
+ * The current Xbox Game DVR state on the system.
1013
+ *
1014
+ * @see XboxDVRInfo
1015
+ */
1016
+ xboxDVR: XboxDVRInfo;
978
1017
  }
979
1018
 
980
1019
 
@@ -4340,10 +4379,15 @@ interface IOverwolfRecordingApi {
4340
4379
  readonly version: string;
4341
4380
 
4342
4381
  /**
4343
- * Path to ffmpeg file.
4382
+ * Path to ffmpeg executable
4344
4383
  */
4345
4384
  readonly ffmpegPath: string;
4346
4385
 
4386
+ /**
4387
+ * Path to ffprobe executable
4388
+ */
4389
+ readonly ffprobePath: string;
4390
+
4347
4391
  /**
4348
4392
  * Path to OBS binaries folder.
4349
4393
  */
@@ -4367,12 +4411,31 @@ interface IOverwolfRecordingApi {
4367
4411
  /**
4368
4412
  * Queries supported encoders, audio/video devices, and configuration options.
4369
4413
  *
4414
+ * The result also includes the current Xbox Game DVR state (`xboxDVR`).
4415
+ *
4370
4416
  * @param overrideCache If `true`, bypasses cached result and queries OBS directly.
4371
4417
  * @returns A promise that resolves to the full recording capability information.
4372
4418
  * @see {@link RecordingInformation}
4373
4419
  */
4374
4420
  queryInformation(overrideCache?: boolean): Promise<RecordingInformation>;
4375
4421
 
4422
+ /**
4423
+ * Returns whether Xbox Game DVR is enabled, checking both the
4424
+ * `GameDVR_Enabled` and `AppCaptureEnabled` registry values.
4425
+ *
4426
+ * @returns A promise that resolves to the current Xbox Game DVR state.
4427
+ * @see {@link XboxDVRInfo}
4428
+ */
4429
+ isXboxDVREnabled(): Promise<XboxDVRInfo>;
4430
+
4431
+ /**
4432
+ * Disables Xbox Game DVR by setting `AppCaptureEnabled` and
4433
+ * `GameDVR_Enabled` to `0` in the registry.
4434
+ *
4435
+ * @returns A promise that resolves once the values have been written.
4436
+ */
4437
+ disableXboxDVR(): Promise<void>;
4438
+
4376
4439
  /**
4377
4440
  * Creates a capture settings builder instance to configure video/audio sources.
4378
4441
  *
@@ -5574,7 +5637,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
5574
5637
  */
5575
5638
  exitExclusiveMode(): void;
5576
5639
 
5577
- /**
5640
+ /**
5578
5641
  * Install ow-electron helpers to
5579
5642
  * `%CommonProgramFiles%\<app-name>\` with UAC elevation.
5580
5643
  * Allows injection into high elevation games.
@@ -5620,20 +5683,20 @@ interface IOverwolfOverlayApi extends EventEmitter {
5620
5683
  * }
5621
5684
  * ```
5622
5685
  * @returns Resolves when installation completes.
5623
- *
5624
- *
5625
- *
5686
+ *
5687
+ *
5688
+ *
5626
5689
  */
5627
5690
  installHighElevationHelper?(): Promise<void>;
5628
5691
 
5629
5692
  /**
5630
5693
  * Returns true if ow-electron helpers is already installed in
5631
5694
  * `%CommonProgramFiles%\<app-name>\`.
5632
- *
5695
+ *
5633
5696
  * @returns `true` if the helper is installed and ready.
5634
- *
5697
+ *
5635
5698
  * @example
5636
- * ```ts
5699
+ * ```ts
5637
5700
  * const installed: boolean = await api.isHighElevationHelperInstalled();
5638
5701
  * if (!installed) {
5639
5702
  * // Prompt the user to run the one-time setup before injecting into elevated games
@@ -5649,17 +5712,24 @@ interface IOverwolfOverlayApi extends EventEmitter {
5649
5712
  * while a previous capture is still pending will reject immediately —
5650
5713
  * wait for the returned promise to settle before issuing the next call.
5651
5714
  *
5652
- * The file extension in `filePath` is normalized automatically: if it does
5653
- * not already end with `.jpg` or `.bmp` (matching `format`), the correct
5654
- * extension is appended.
5715
+ * The output format is resolved by precedence: an explicit `format`
5716
+ * argument wins; otherwise the extension already present in `filePath`
5717
+ * (`.jpg`/`.jpeg` or `.bmp`) is used; otherwise it defaults to `'bmp'`.
5718
+ * The file extension is then normalized to match the resolved format, so
5719
+ * an existing extension is rewritten rather than doubled (e.g.
5720
+ * `shot.jpg` stays `shot.jpg`, and `shot.png` with `format: 'jpg'` becomes
5721
+ * `shot.jpg`).
5655
5722
  *
5656
5723
  * Internally all backends (D3D9, D3D11, D3D12, Vulkan) capture as BMP
5657
5724
  * first and transcode to JPEG on demand, ensuring correct colors across
5658
5725
  * all graphics APIs and formats.
5659
5726
  *
5660
5727
  * @param filePath - Absolute path (UTF-8) where the image will be saved.
5661
- * @param format - Output image format: `'jpg'` or `'bmp'`. Defaults to `'bmp'`.
5662
- * @returns A promise that resolves with `void` when the file is written.
5728
+ * @param format - Output image format: `'jpg'` or `'bmp'`. When omitted,
5729
+ * the extension in `filePath` is used, falling back to `'bmp'`.
5730
+ * @returns A promise that resolves with the absolute path the file was
5731
+ * actually written to, including the normalized extension (which may
5732
+ * differ from `filePath`).
5663
5733
  *
5664
5734
  * @throws `'no active game'` — the overlay is not currently injected into
5665
5735
  * any game. Wait for the `game-injected` event before calling.
@@ -5681,8 +5751,8 @@ interface IOverwolfOverlayApi extends EventEmitter {
5681
5751
  * const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
5682
5752
  * const filePath = path.join(app.getPath('pictures'), `screenshot_${ts}`);
5683
5753
  * try {
5684
- * await overlay.takeScreenshot(filePath, 'jpg');
5685
- * // file written to filePath + '.jpg'
5754
+ * const savedPath = await overlay.takeScreenshot(filePath, 'jpg');
5755
+ * console.log('screenshot written to', savedPath); // ...filePath.jpg
5686
5756
  * } catch (err) {
5687
5757
  * console.error('Screenshot failed:', err.message);
5688
5758
  * }
@@ -5706,7 +5776,10 @@ interface IOverwolfOverlayApi extends EventEmitter {
5706
5776
  * @param listener - Callback with game launch event and game metadata.
5707
5777
  * @see {@link GameInfo}.
5708
5778
  */
5709
- on(eventName: 'game-launched', listener: (event: GameLaunchEvent, gameInfo: GameInfo) => void): this;
5779
+ on(
5780
+ eventName: 'game-launched',
5781
+ listener: (event: GameLaunchEvent, gameInfo: GameInfo) => void,
5782
+ ): this;
5710
5783
 
5711
5784
  /**
5712
5785
  * Fires when a registered game process terminates.
@@ -5726,7 +5799,10 @@ interface IOverwolfOverlayApi extends EventEmitter {
5726
5799
  *
5727
5800
  * @see {@link GameInfo}.
5728
5801
  */
5729
- on(eventName: 'game-exit', listener: (gameInfo: GameInfo, wasInjected: boolean) => void): this;
5802
+ on(
5803
+ eventName: 'game-exit',
5804
+ listener: (gameInfo: GameInfo, wasInjected: boolean) => void,
5805
+ ): this;
5730
5806
 
5731
5807
  /**
5732
5808
  * Fires when the overlay is ready and successfully injected into the game.
@@ -5746,7 +5822,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
5746
5822
  */
5747
5823
  on(
5748
5824
  eventName: 'game-injection-error',
5749
- listener: (gameInfo: GameInfo, error: string, ...args: any[]) => void
5825
+ listener: (gameInfo: GameInfo, error: string, ...args: any[]) => void,
5750
5826
  ): this;
5751
5827
 
5752
5828
  /**
@@ -5762,8 +5838,8 @@ interface IOverwolfOverlayApi extends EventEmitter {
5762
5838
  listener: (
5763
5839
  window: GameWindowInfo,
5764
5840
  gameInfo: GameInfo,
5765
- focus: boolean
5766
- ) => void
5841
+ focus: boolean,
5842
+ ) => void,
5767
5843
  ): this;
5768
5844
 
5769
5845
  /**
@@ -5780,8 +5856,8 @@ interface IOverwolfOverlayApi extends EventEmitter {
5780
5856
  listener: (
5781
5857
  window: GameWindowInfo,
5782
5858
  gameInfo: GameInfo,
5783
- reason?: GameWindowUpdateReason
5784
- ) => void
5859
+ reason?: GameWindowUpdateReason,
5860
+ ) => void,
5785
5861
  ): this;
5786
5862
 
5787
5863
  /**
@@ -5794,7 +5870,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
5794
5870
  */
5795
5871
  on(
5796
5872
  eventName: 'game-input-interception-changed',
5797
- listener: (info: GameInputInterception) => void
5873
+ listener: (info: GameInputInterception) => void,
5798
5874
  ): this;
5799
5875
 
5800
5876
  /**
@@ -5806,7 +5882,7 @@ interface IOverwolfOverlayApi extends EventEmitter {
5806
5882
  */
5807
5883
  on(
5808
5884
  eventName: 'game-input-exclusive-mode-changed',
5809
- listener: (info: GameInputInterception) => void
5885
+ listener: (info: GameInputInterception) => void,
5810
5886
  ): this;
5811
5887
  }
5812
5888