@overwolf/ow-electron-packages-types 1.1.9 → 1.1.10-beta.1

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 +123 -35
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron-packages-types",
3
- "version": "1.1.9",
3
+ "version": "1.1.10-beta.1",
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
@@ -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
- * const bitrateProperty: EncoderProperty = {
710
- * default: 4500,
711
- * description: 'Target video bitrate in kbps.',
712
- * values: {
713
- * 3000: 'Low quality',
714
- * 4500: 'Medium quality (default)',
715
- * 6000: 'High quality'
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
- * Optional array of possible values for this property.
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 information
773
- * about the video encoder type and any configurable encoder properties.
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
- * default: 6000,
785
- * description: 'Target video bitrate in kbps.',
786
- * values: {
787
- * 4000: 'Low quality',
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: 96,
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
- * The DPI (dots per inch) value of the monitor.
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
- * | `'Lossless'` | Encodes without compression loss. Produces very high-quality output at the cost of large file sizes. |
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
- * `Lossless` — Encodes without compression loss.
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
- | 'Lossless';
1563
+ | 'lossless';
1509
1564
 
1510
1565
  /**
1511
1566
  * Specifies the multipass encoding mode for NVIDIA's NVENC encoder.
@@ -4052,6 +4107,13 @@ interface EncoderInformation {
4052
4107
  */
4053
4108
  type CrashDumpType = 'off' | 'mini' | 'full';
4054
4109
 
4110
+ /**
4111
+ * How OBS is hosted.
4112
+ * - `process`: OBS runs as its own standalone process; the default.
4113
+ * - `dll`: OBS runs inside a helper process launched by the app.
4114
+ */
4115
+ type ObsHostMode = 'process' | 'dll';
4116
+
4055
4117
  /**
4056
4118
  * Crash dump configuration for the OBS host process.
4057
4119
  */
@@ -4113,6 +4175,16 @@ interface RecordingAppOptions {
4113
4175
  * @see {@link CrashDumpOptions}
4114
4176
  */
4115
4177
  crashDumps?: CrashDumpOptions;
4178
+
4179
+ /**
4180
+ * How to host OBS. Defaults to `process`.
4181
+ *
4182
+ * Applied the next time OBS starts, so changing it while a recording is
4183
+ * running does not affect that recording.
4184
+ *
4185
+ * @see {@link ObsHostMode}
4186
+ */
4187
+ hostMode?: ObsHostMode;
4116
4188
  }
4117
4189
 
4118
4190
 
@@ -6410,6 +6482,22 @@ interface IOverwolfOverlayApi extends EventEmitter {
6410
6482
  ) => void,
6411
6483
  ): this;
6412
6484
 
6485
+ /**
6486
+ * Fires when the injected game's window is destroyed, which on many games
6487
+ * happens seconds before the process exits. `game-exit` still follows and
6488
+ * remains the authoritative end-of-session event.
6489
+ *
6490
+ * Not emitted for OOPO games.
6491
+ *
6492
+ * @param eventName - `game-window-destroyed`
6493
+ * @param listener - Callback with the game info of the destroyed window.
6494
+ * @see {@link GameInfo}.
6495
+ */
6496
+ on(
6497
+ eventName: 'game-window-destroyed',
6498
+ listener: (gameInfo: GameInfo) => void,
6499
+ ): this;
6500
+
6413
6501
  /**
6414
6502
  * Fires when the game input interception capability changes.
6415
6503
  *