@overwolf/ow-electron-packages-types 1.1.10 → 1.1.11-beta.0
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 +137 -39
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -697,6 +697,17 @@ interface EncoderInfoBase {
|
|
|
697
697
|
* A human-readable name for the encoder (e.g., shown in UI).
|
|
698
698
|
*/
|
|
699
699
|
readonly name: string;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Optional map of encoder-specific configuration properties, keyed by
|
|
703
|
+
* setting name (e.g. `bitrate`, `rate_control`). Each property describes a
|
|
704
|
+
* setting that can be adjusted for this encoder.
|
|
705
|
+
*
|
|
706
|
+
* Reported for both video and audio encoders.
|
|
707
|
+
*
|
|
708
|
+
* @see {@link EncoderProperty}
|
|
709
|
+
*/
|
|
710
|
+
readonly properties?: Record<string, EncoderProperty>;
|
|
700
711
|
}
|
|
701
712
|
|
|
702
713
|
/**
|
|
@@ -706,14 +717,22 @@ interface EncoderInfoBase {
|
|
|
706
717
|
* Provides metadata to help display options in a UI or validate configuration.
|
|
707
718
|
*
|
|
708
719
|
* @example
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
716
|
-
*
|
|
720
|
+
* // An enum-like setting - `values` lists every accepted value.
|
|
721
|
+
* const rateControl: EncoderProperty = {
|
|
722
|
+
* default: 'CBR',
|
|
723
|
+
* description: 'Rate Control',
|
|
724
|
+
* values: ['CBR', 'CQP', 'VBR', 'CQVBR'],
|
|
725
|
+
* valuesDesc: ['CBR', 'CQP', 'VBR', 'CQVBR']
|
|
726
|
+
* };
|
|
727
|
+
*
|
|
728
|
+
* @example
|
|
729
|
+
* // A numeric range setting - no `values`; the range is min/max/step.
|
|
730
|
+
* const bitrate: EncoderProperty = {
|
|
731
|
+
* default: 10000,
|
|
732
|
+
* description: 'Bitrate',
|
|
733
|
+
* min: 50,
|
|
734
|
+
* max: 4294967,
|
|
735
|
+
* step: 50
|
|
717
736
|
* };
|
|
718
737
|
*/
|
|
719
738
|
interface EncoderProperty {
|
|
@@ -728,8 +747,14 @@ interface EncoderProperty {
|
|
|
728
747
|
readonly description: string;
|
|
729
748
|
|
|
730
749
|
/**
|
|
731
|
-
*
|
|
750
|
+
* The complete set of accepted values for this property, present only for
|
|
751
|
+
* enum-like settings (e.g. `rate_control`, `preset`, `profile`, `tune`).
|
|
732
752
|
* Useful for dropdowns or presets.
|
|
753
|
+
*
|
|
754
|
+
* Numeric range settings such as `bitrate`, `max_bitrate` or `keyint_sec`
|
|
755
|
+
* do **not** report `values` - they describe their range through `min`,
|
|
756
|
+
* `max` and `step` instead. An absent or single-entry `values` array
|
|
757
|
+
* therefore does not mean the setting is restricted to one option.
|
|
733
758
|
*/
|
|
734
759
|
readonly values?: (string | number)[];
|
|
735
760
|
|
|
@@ -738,6 +763,29 @@ interface EncoderProperty {
|
|
|
738
763
|
* Helps provide additional context for each option.
|
|
739
764
|
*/
|
|
740
765
|
readonly valuesDesc?: string[];
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* The smallest value this setting accepts.
|
|
769
|
+
*
|
|
770
|
+
* Reported for numeric settings only (`bitrate`, `keyint_sec`, `cqp`, ...);
|
|
771
|
+
* enum-like settings use `values` instead.
|
|
772
|
+
*/
|
|
773
|
+
readonly min?: number;
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* The largest value this setting accepts.
|
|
777
|
+
*
|
|
778
|
+
* Reported for numeric settings only.
|
|
779
|
+
*/
|
|
780
|
+
readonly max?: number;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* The granularity between accepted values.
|
|
784
|
+
*
|
|
785
|
+
* Reported for numeric settings only. A `bitrate` with a `step` of 50
|
|
786
|
+
* accepts 50, 100, 150 and so on.
|
|
787
|
+
*/
|
|
788
|
+
readonly step?: number;
|
|
741
789
|
}
|
|
742
790
|
|
|
743
791
|
/**
|
|
@@ -752,7 +800,10 @@ interface EncoderProperty {
|
|
|
752
800
|
* const audioEncoder: AudioEncoderInfo = {
|
|
753
801
|
* codec: 'aac',
|
|
754
802
|
* name: 'FFmpeg AAC Encoder',
|
|
755
|
-
* type: 'ffmpeg_aac'
|
|
803
|
+
* type: 'ffmpeg_aac',
|
|
804
|
+
* properties: {
|
|
805
|
+
* bitrate: { default: 128, description: 'Bitrate' }
|
|
806
|
+
* }
|
|
756
807
|
* };
|
|
757
808
|
*/
|
|
758
809
|
interface AudioEncoderInfo extends EncoderInfoBase {
|
|
@@ -769,8 +820,9 @@ interface AudioEncoderInfo extends EncoderInfoBase {
|
|
|
769
820
|
/**
|
|
770
821
|
* Information for a supported video encoder.
|
|
771
822
|
*
|
|
772
|
-
* This interface extends `EncoderInfoBase` and adds specific
|
|
773
|
-
*
|
|
823
|
+
* This interface extends `EncoderInfoBase` and adds the specific video encoder
|
|
824
|
+
* type identifier. Configurable encoder settings are reported through the
|
|
825
|
+
* inherited `properties` map.
|
|
774
826
|
*
|
|
775
827
|
* @extends EncoderInfoBase
|
|
776
828
|
*
|
|
@@ -780,14 +832,11 @@ interface AudioEncoderInfo extends EncoderInfoBase {
|
|
|
780
832
|
* name: 'NVIDIA NVENC H.264',
|
|
781
833
|
* type: 'obs_nvenc_h264_tex',
|
|
782
834
|
* properties: {
|
|
783
|
-
* bitrate: {
|
|
784
|
-
*
|
|
785
|
-
*
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
* 6000: 'Medium quality',
|
|
789
|
-
* 8000: 'High quality'
|
|
790
|
-
* }
|
|
835
|
+
* bitrate: { default: 10000, description: 'Bitrate' },
|
|
836
|
+
* rate_control: {
|
|
837
|
+
* default: 'CBR',
|
|
838
|
+
* description: 'Rate Control',
|
|
839
|
+
* values: ['CBR', 'CQP', 'VBR', 'CQVBR']
|
|
791
840
|
* }
|
|
792
841
|
* }
|
|
793
842
|
* };
|
|
@@ -795,19 +844,10 @@ interface AudioEncoderInfo extends EncoderInfoBase {
|
|
|
795
844
|
interface VideoEncoderInfo extends EncoderInfoBase {
|
|
796
845
|
/**
|
|
797
846
|
* The identifier for the specific video encoder type.
|
|
798
|
-
*
|
|
847
|
+
*
|
|
799
848
|
* @see {@link kSupportedEncodersTypes}
|
|
800
849
|
*/
|
|
801
850
|
readonly type: kSupportedEncodersTypes;
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* Optional map of encoder-specific configuration properties.
|
|
805
|
-
* Each property defines a setting that can be adjusted,
|
|
806
|
-
* such as bitrate, profile, or keyframe interval.
|
|
807
|
-
*
|
|
808
|
-
* @see {@link EncoderProperty}
|
|
809
|
-
*/
|
|
810
|
-
readonly properties?: Record<string, EncoderProperty>;
|
|
811
851
|
}
|
|
812
852
|
|
|
813
853
|
|
|
@@ -911,7 +951,7 @@ interface AudioInformation {
|
|
|
911
951
|
* adapterIndex: 0,
|
|
912
952
|
* id: 'MONITOR\\GSM5B10\\{4d36e96e-e325-11ce-bfc1-08002be10318}_0',
|
|
913
953
|
* altId: 'DISPLAY1',
|
|
914
|
-
* dpi:
|
|
954
|
+
* dpi: 1.25,
|
|
915
955
|
* attachedToDesktop: true,
|
|
916
956
|
* friendlyName: 'LG UltraFine 4K',
|
|
917
957
|
* refreshRate: 60,
|
|
@@ -937,7 +977,8 @@ interface MonitorInfo {
|
|
|
937
977
|
readonly altId: string;
|
|
938
978
|
|
|
939
979
|
/**
|
|
940
|
-
*
|
|
980
|
+
* Display scale factor (system DPI / 96), not a DPI value.
|
|
981
|
+
* `1` = 100%, `1.25` = 125%, `2` = 200%.
|
|
941
982
|
*/
|
|
942
983
|
readonly dpi: number;
|
|
943
984
|
|
|
@@ -1477,7 +1518,13 @@ type kAMDEncoderProfile264 =
|
|
|
1477
1518
|
* | `'CBR'` | Constant Bitrate. Maintains a consistent bitrate throughout the recording. Useful for streaming and bandwidth-limited scenarios. |
|
|
1478
1519
|
* | `'CQP'` | Constant Quantization Parameter. Prioritizes visual quality by keeping a consistent quantization level. File sizes may vary significantly. |
|
|
1479
1520
|
* | `'VBR'` | Variable Bitrate. Adjusts bitrate dynamically based on scene complexity. Provides better compression but less predictability in file size. |
|
|
1480
|
-
* | `'
|
|
1521
|
+
* | `'CQVBR'` | Constrained Quality VBR. Targets a quality level (`target_quality`) while respecting `max_bitrate`. |
|
|
1522
|
+
* | `'lossless'` | Encodes without compression loss. Produces very high-quality output at the cost of large file sizes. |
|
|
1523
|
+
*
|
|
1524
|
+
* These values are **case-sensitive**: NVENC compares `CQP` and `lossless`
|
|
1525
|
+
* exactly as spelled here. Any value it does not recognize falls back to `CBR`
|
|
1526
|
+
* silently, with no error - so pass these strings verbatim and do not
|
|
1527
|
+
* upper- or lower-case them.
|
|
1481
1528
|
*
|
|
1482
1529
|
* @example
|
|
1483
1530
|
* const rateControl: kNVENCEncoderRateControl = 'CQP';
|
|
@@ -1502,10 +1549,18 @@ type kNVENCEncoderRateControl =
|
|
|
1502
1549
|
| 'VBR'
|
|
1503
1550
|
|
|
1504
1551
|
/**
|
|
1505
|
-
* `
|
|
1552
|
+
* `CQVBR` — Constrained Quality VBR. Targets the quality level given by
|
|
1553
|
+
* `target_quality` while keeping within `max_bitrate`.
|
|
1554
|
+
*/
|
|
1555
|
+
| 'CQVBR'
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* `lossless` — Encodes without compression loss.
|
|
1506
1559
|
* Produces very high-quality output at the cost of large file sizes.
|
|
1560
|
+
*
|
|
1561
|
+
* Lower-case by design: NVENC matches this value case-sensitively.
|
|
1507
1562
|
*/
|
|
1508
|
-
| '
|
|
1563
|
+
| 'lossless';
|
|
1509
1564
|
|
|
1510
1565
|
/**
|
|
1511
1566
|
* Specifies the multipass encoding mode for NVIDIA's NVENC encoder.
|
|
@@ -5412,6 +5467,11 @@ interface OverlayWindowOptions
|
|
|
5412
5467
|
* ignored when either condition is not met, falling back to the
|
|
5413
5468
|
* shared-memory (CPU copy) path.
|
|
5414
5469
|
*
|
|
5470
|
+
* There is no need to wait for {@link GameWindowInfo.isSharedTextureAvailable} before
|
|
5471
|
+
* creating the window. While the game's support is still unknown the window starts on the
|
|
5472
|
+
* shared-texture path, and switches to the CPU copy path if the game turns out not to
|
|
5473
|
+
* support it.
|
|
5474
|
+
*
|
|
5415
5475
|
* The rendering path follows the active game: when the overlay moves to a
|
|
5416
5476
|
* different game, a shared-texture window automatically falls back to the
|
|
5417
5477
|
* shared-memory (CPU copy) path on a game that does not support shared
|
|
@@ -5719,6 +5779,11 @@ interface InjectionError {
|
|
|
5719
5779
|
* - Screen display information.
|
|
5720
5780
|
* - Bounding rectangle of the game window.
|
|
5721
5781
|
*
|
|
5782
|
+
* Not available at injection time: the injected client reports the window only once the
|
|
5783
|
+
* game's graphics device initializes, a few seconds after `game-injected`. Until then
|
|
5784
|
+
* {@link ActiveGameInfo.gameWindowInfo} is `undefined`. The first `game-window-changed`
|
|
5785
|
+
* event delivers it and is the earliest point where every field below holds a real value.
|
|
5786
|
+
*
|
|
5722
5787
|
* @example
|
|
5723
5788
|
* ```ts
|
|
5724
5789
|
* overlay.on('game-window-changed', (windowInfo, gameInfo, reason) => {
|
|
@@ -5787,7 +5852,8 @@ interface GameWindowInfo {
|
|
|
5787
5852
|
* This is a capability probe only — to decide whether the path can actually be used
|
|
5788
5853
|
* on this machine, gate on {@link GameWindowInfo.isSharedTextureAvailable} instead.
|
|
5789
5854
|
*
|
|
5790
|
-
* `undefined` until the game
|
|
5855
|
+
* `undefined` until the game's graphics device initializes, a few seconds after
|
|
5856
|
+
* `game-injected`; the first `game-window-changed` event carries the resolved value.
|
|
5791
5857
|
*
|
|
5792
5858
|
* @since 2.0.0
|
|
5793
5859
|
*/
|
|
@@ -5795,7 +5861,11 @@ interface GameWindowInfo {
|
|
|
5795
5861
|
|
|
5796
5862
|
/**
|
|
5797
5863
|
* Indicates whether shared-texture (GPU) overlay rendering can actually be used with this
|
|
5798
|
-
* game
|
|
5864
|
+
* game.
|
|
5865
|
+
*
|
|
5866
|
+
* Not a precondition for creating a window: a `useSharedTexture` window may be created
|
|
5867
|
+
* before this value resolves, and the overlay corrects the rendering path on its own. Read
|
|
5868
|
+
* it to observe the outcome, or to branch when the window behaves differently on each path.
|
|
5799
5869
|
*
|
|
5800
5870
|
* `true` when the game's graphics API supports it
|
|
5801
5871
|
* ({@link GameWindowInfo.isSharedTextureSupported}), no GPU adapter mismatch was detected,
|
|
@@ -5804,7 +5874,8 @@ interface GameWindowInfo {
|
|
|
5804
5874
|
* `false` mid-game: the copy-failure verdict is reached only after frames were sent and
|
|
5805
5875
|
* repeatedly failed to draw.
|
|
5806
5876
|
*
|
|
5807
|
-
* `undefined` until the game
|
|
5877
|
+
* `undefined` until the game's graphics device initializes, a few seconds after
|
|
5878
|
+
* `game-injected`; the first `game-window-changed` event carries the resolved value.
|
|
5808
5879
|
*
|
|
5809
5880
|
* @see {@link https://dev.overwolf.com/ow-electron/reference/examples/overlay | Overlay examples}
|
|
5810
5881
|
*
|
|
@@ -5862,6 +5933,10 @@ interface ActiveGameInfo {
|
|
|
5862
5933
|
readonly gameInfo: GameInfo;
|
|
5863
5934
|
/**
|
|
5864
5935
|
* Window-specific details for the running game.
|
|
5936
|
+
*
|
|
5937
|
+
* `undefined` between injection and the first `game-window-changed` event: the injected
|
|
5938
|
+
* client reports the window only once the game's graphics device initializes.
|
|
5939
|
+
*
|
|
5865
5940
|
* @see {@link GameWindowInfo}.
|
|
5866
5941
|
*/
|
|
5867
5942
|
readonly gameWindowInfo: GameWindowInfo;
|
|
@@ -6395,6 +6470,11 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
6395
6470
|
/**
|
|
6396
6471
|
* Fires when the game window focus state changes.
|
|
6397
6472
|
*
|
|
6473
|
+
* Also fires for a game whose injection was dismissed
|
|
6474
|
+
* ({@link GameLaunchEvent.dismiss}). That window info carries position, size and focus
|
|
6475
|
+
* only, with no graphics or shared-texture fields, so it is not a substitute for the first
|
|
6476
|
+
* `game-window-changed`.
|
|
6477
|
+
*
|
|
6398
6478
|
* @param eventName - `game-focus-changed`
|
|
6399
6479
|
* @param listener - Callback with window info, game info, and focus state.
|
|
6400
6480
|
* @see {@link GameWindowInfo}.
|
|
@@ -6410,7 +6490,9 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
6410
6490
|
): this;
|
|
6411
6491
|
|
|
6412
6492
|
/**
|
|
6413
|
-
* Fires when the game window is resized or changes position
|
|
6493
|
+
* Fires when the game window is resized or changes position, and once when the injected
|
|
6494
|
+
* client first reports the window. That first event is the earliest point where
|
|
6495
|
+
* {@link GameWindowInfo} is available.
|
|
6414
6496
|
*
|
|
6415
6497
|
* @param eventName - `game-window-changed`
|
|
6416
6498
|
* @param listener - Callback with window info, game info, and optional reason.
|
|
@@ -6427,6 +6509,22 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
6427
6509
|
) => void,
|
|
6428
6510
|
): this;
|
|
6429
6511
|
|
|
6512
|
+
/**
|
|
6513
|
+
* Fires when the injected game's window is destroyed, which on many games
|
|
6514
|
+
* happens seconds before the process exits. `game-exit` still follows and
|
|
6515
|
+
* remains the authoritative end-of-session event.
|
|
6516
|
+
*
|
|
6517
|
+
* Not emitted for OOPO games.
|
|
6518
|
+
*
|
|
6519
|
+
* @param eventName - `game-window-destroyed`
|
|
6520
|
+
* @param listener - Callback with the game info of the destroyed window.
|
|
6521
|
+
* @see {@link GameInfo}.
|
|
6522
|
+
*/
|
|
6523
|
+
on(
|
|
6524
|
+
eventName: 'game-window-destroyed',
|
|
6525
|
+
listener: (gameInfo: GameInfo) => void,
|
|
6526
|
+
): this;
|
|
6527
|
+
|
|
6430
6528
|
/**
|
|
6431
6529
|
* Fires when the game input interception capability changes.
|
|
6432
6530
|
*
|