@overwolf/ow-electron-packages-types 1.0.0-beta.5 → 1.0.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.
- package/package.json +1 -1
- package/types.d.ts +52 -215
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { overwolf } from '@overwolf/ow-electron';
|
|
2
|
-
import {
|
|
3
|
-
BrowserWindow,
|
|
4
|
-
BrowserWindowConstructorOptions,
|
|
5
|
-
Size,
|
|
6
|
-
WebContents,
|
|
7
|
-
Display,
|
|
8
|
-
Rectangle
|
|
9
|
-
} from 'electron';
|
|
10
|
-
|
|
11
|
-
import { EventEmitter } from 'events';
|
|
12
|
-
|
|
13
|
-
// -----------------------------------------------------------------------------
|
|
14
|
-
|
|
15
|
-
// --- modules\utility.d.ts ---
|
|
1
|
+
import { overwolf } from '@overwolf/ow-electron';
|
|
2
|
+
import {
|
|
3
|
+
BrowserWindow,
|
|
4
|
+
BrowserWindowConstructorOptions,
|
|
5
|
+
Size,
|
|
6
|
+
WebContents,
|
|
7
|
+
Display,
|
|
8
|
+
Rectangle
|
|
9
|
+
} from 'electron';
|
|
10
|
+
|
|
11
|
+
import { EventEmitter } from 'events';
|
|
12
|
+
|
|
13
|
+
// -----------------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
// --- modules\utility.d.ts ---
|
|
16
16
|
/**
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*
|
|
@@ -79,9 +79,9 @@ interface IOverwolfUtilityApi {
|
|
|
79
79
|
*/
|
|
80
80
|
on(eventName: 'game-exit', listener: (gameInfo: GameInfo) => void): this;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// --- modules\recorder.d.ts ---
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
// --- modules\recorder.d.ts ---
|
|
85
85
|
/**
|
|
86
86
|
*
|
|
87
87
|
* The Overwolf Electron recording APIs integrate recording into the Overwolf Electron framework allowing you to record both audio and video.
|
|
@@ -1972,135 +1972,6 @@ interface AudioGeneralSettings {
|
|
|
1972
1972
|
*/
|
|
1973
1973
|
lowLatencyAudioBuffering?: boolean;
|
|
1974
1974
|
}
|
|
1975
|
-
/**
|
|
1976
|
-
* Defines the alignment options specifying a position by using [Vertical][Horizontal]
|
|
1977
|
-
* (e.g., 'TopLeft', 'Center', 'BottomRight'). Typically used for positioning
|
|
1978
|
-
* UI elements, popovers, or text blocks.
|
|
1979
|
-
*/
|
|
1980
|
-
export declare type AlignmentOptions =
|
|
1981
|
-
| 'TopLeft'
|
|
1982
|
-
| 'TopCenter'
|
|
1983
|
-
| 'TopRight'
|
|
1984
|
-
| 'CenterLeft'
|
|
1985
|
-
| 'Center'
|
|
1986
|
-
| 'CenterRight'
|
|
1987
|
-
| 'BottomLeft'
|
|
1988
|
-
| 'BottomCenter'
|
|
1989
|
-
| 'BottomRight';
|
|
1990
|
-
|
|
1991
|
-
/**
|
|
1992
|
-
* Defines the type of bounding or scaling applied to an element's dimensions
|
|
1993
|
-
* within a container.
|
|
1994
|
-
*
|
|
1995
|
-
* Typically used to control how content (like an image or video)
|
|
1996
|
-
* is resized to fit or fill a specific area.
|
|
1997
|
-
*/
|
|
1998
|
-
export declare type BoundsType =
|
|
1999
|
-
| 'None'
|
|
2000
|
-
| 'Stretch'
|
|
2001
|
-
| 'ScaleInner'
|
|
2002
|
-
| 'ScaleOuter'
|
|
2003
|
-
| 'ScaleToWidth'
|
|
2004
|
-
| 'ScaleToHeight'
|
|
2005
|
-
| 'MaxOnly';
|
|
2006
|
-
|
|
2007
|
-
/**
|
|
2008
|
-
* Options for transforming and positioning a source element (e.g. an image or video) within an output container or scene.
|
|
2009
|
-
*
|
|
2010
|
-
* Typically used to control how content is translated, scaled, rotated, aligned,
|
|
2011
|
-
* and cropped within a visual presentation area.
|
|
2012
|
-
*/
|
|
2013
|
-
export interface SourceTransformOptions {
|
|
2014
|
-
/**
|
|
2015
|
-
* Position X in pixels. Default is 0.
|
|
2016
|
-
*/
|
|
2017
|
-
positionX?: number;
|
|
2018
|
-
|
|
2019
|
-
/**
|
|
2020
|
-
* Position Y in pixels. Default is 0.
|
|
2021
|
-
*/
|
|
2022
|
-
positionY?: number;
|
|
2023
|
-
|
|
2024
|
-
/**
|
|
2025
|
-
* Rotation in degrees (-360.0 to 360.0). Default is 0.
|
|
2026
|
-
*/
|
|
2027
|
-
rotation?: number;
|
|
2028
|
-
|
|
2029
|
-
/**
|
|
2030
|
-
* Size Width in pixels.
|
|
2031
|
-
*/
|
|
2032
|
-
sizeWidth?: number;
|
|
2033
|
-
|
|
2034
|
-
/**
|
|
2035
|
-
* Size Height in pixels.
|
|
2036
|
-
*/
|
|
2037
|
-
sizeHeight?: number;
|
|
2038
|
-
|
|
2039
|
-
/**
|
|
2040
|
-
* Alignment of the source within the output.
|
|
2041
|
-
* The alignment is relative to the top-left corner of the output.
|
|
2042
|
-
*
|
|
2043
|
-
* Default is TopLeft.
|
|
2044
|
-
*/
|
|
2045
|
-
alignment?: AlignmentOptions;
|
|
2046
|
-
|
|
2047
|
-
/**
|
|
2048
|
-
* Defines a bounding box for the source within the output.
|
|
2049
|
-
*
|
|
2050
|
-
* Changing the bounds type or alignment only has an effect
|
|
2051
|
-
* if a bounds width or height is specified.
|
|
2052
|
-
*
|
|
2053
|
-
* Type of bounds to apply.
|
|
2054
|
-
* Default is None.
|
|
2055
|
-
*/
|
|
2056
|
-
boundsType?: BoundsType;
|
|
2057
|
-
|
|
2058
|
-
/**
|
|
2059
|
-
* Alignment of the source within the bounding box.
|
|
2060
|
-
*
|
|
2061
|
-
* Relevant only when bounds width or height are defined.
|
|
2062
|
-
* Default is Center.
|
|
2063
|
-
*/
|
|
2064
|
-
boundsAlignment?: AlignmentOptions;
|
|
2065
|
-
|
|
2066
|
-
/**
|
|
2067
|
-
* Bounding box width in pixels.
|
|
2068
|
-
*/
|
|
2069
|
-
boundsWidth?: number;
|
|
2070
|
-
|
|
2071
|
-
/**
|
|
2072
|
-
* Bounding box height in pixels.
|
|
2073
|
-
*/
|
|
2074
|
-
boundsHeight?: number;
|
|
2075
|
-
|
|
2076
|
-
/**
|
|
2077
|
-
* Crop to bounds. Default is False.
|
|
2078
|
-
*/
|
|
2079
|
-
cropToBounds?: boolean;
|
|
2080
|
-
|
|
2081
|
-
/**
|
|
2082
|
-
* Crop options in pixels. Default is no crop.
|
|
2083
|
-
*/
|
|
2084
|
-
cropLeft?: number;
|
|
2085
|
-
cropRight?: number;
|
|
2086
|
-
cropTop?: number;
|
|
2087
|
-
cropBottom?: number;
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
/**
|
|
2091
|
-
* Defines a complete transformation operation to be applied to a specific source element.
|
|
2092
|
-
*
|
|
2093
|
-
* Typically used on a target source by its name with the full set of
|
|
2094
|
-
* transformation and positioning properties it should adopt.
|
|
2095
|
-
*/
|
|
2096
|
-
export interface SourceTransform {
|
|
2097
|
-
/**
|
|
2098
|
-
* Source name to update.
|
|
2099
|
-
*/
|
|
2100
|
-
readonly sourceName: string;
|
|
2101
|
-
|
|
2102
|
-
readonly transform: SourceTransformOptions;
|
|
2103
|
-
}
|
|
2104
1975
|
|
|
2105
1976
|
/**
|
|
2106
1977
|
* Configuration settings for how a capture source is rendered in the output video.
|
|
@@ -2109,25 +1980,15 @@ export interface SourceTransform {
|
|
|
2109
1980
|
* content relative to the output resolution.
|
|
2110
1981
|
*/
|
|
2111
1982
|
interface CaptureSourceSettings {
|
|
2112
|
-
/**
|
|
2113
|
-
* Unique Source name (for easier identification).
|
|
2114
|
-
*/
|
|
2115
|
-
name?: string;
|
|
2116
|
-
|
|
2117
1983
|
/**
|
|
2118
1984
|
* Whether the capture source should be centered and stretched to fit the output video size.
|
|
2119
1985
|
*
|
|
2120
1986
|
* When set to `true`, the source will automatically scale and center itself to match
|
|
2121
1987
|
* the output resolution, even if it requires stretching.
|
|
2122
1988
|
*
|
|
2123
|
-
* @default true
|
|
1989
|
+
* @default true
|
|
2124
1990
|
*/
|
|
2125
1991
|
stretchToOutputSize?: boolean;
|
|
2126
|
-
|
|
2127
|
-
/**
|
|
2128
|
-
* Transform options for the source.
|
|
2129
|
-
*/
|
|
2130
|
-
transform?: SourceTransformOptions;
|
|
2131
1992
|
}
|
|
2132
1993
|
|
|
2133
1994
|
/**
|
|
@@ -2245,16 +2106,8 @@ interface WindowCaptureSourceSettings extends CaptureSourceSettings {
|
|
|
2245
2106
|
* The name of the executable associated with the window to capture.
|
|
2246
2107
|
*
|
|
2247
2108
|
* This is typically the process name (e.g., `"notepad.exe"` or `"chrome.exe"`).
|
|
2248
|
-
*
|
|
2249
|
-
* Mandatory field when using Window Capture source.
|
|
2250
|
-
* Optional when using Browser Window source.
|
|
2251
2109
|
*/
|
|
2252
|
-
executable
|
|
2253
|
-
|
|
2254
|
-
/**
|
|
2255
|
-
* The window title, if multiple windows of the same executable exist.
|
|
2256
|
-
*/
|
|
2257
|
-
windowTitle?: string;
|
|
2110
|
+
executable: string;
|
|
2258
2111
|
|
|
2259
2112
|
/**
|
|
2260
2113
|
* The capture method used to record the window.
|
|
@@ -2312,13 +2165,6 @@ interface CaptureSource {
|
|
|
2312
2165
|
* capture method, and more, depending on the selected source type.
|
|
2313
2166
|
*/
|
|
2314
2167
|
readonly properties: any;
|
|
2315
|
-
|
|
2316
|
-
/**
|
|
2317
|
-
* Optional name for the capture source.
|
|
2318
|
-
*
|
|
2319
|
-
* Can be used later for setting transform properties.
|
|
2320
|
-
*/
|
|
2321
|
-
readonly name?: string;
|
|
2322
2168
|
}
|
|
2323
2169
|
|
|
2324
2170
|
/**
|
|
@@ -3009,26 +2855,6 @@ interface CaptureSettingsBuilder extends CaptureSettings {
|
|
|
3009
2855
|
*/
|
|
3010
2856
|
addGameSource(settings: GameCaptureSourceSettings): CaptureSettingsBuilder;
|
|
3011
2857
|
|
|
3012
|
-
/**
|
|
3013
|
-
* Add Window video capture source
|
|
3014
|
-
* settings. Executable is mandatory.
|
|
3015
|
-
* @param settings
|
|
3016
|
-
*/
|
|
3017
|
-
addWindowSource(
|
|
3018
|
-
settings: WindowCaptureSourceSettings
|
|
3019
|
-
): CaptureSettingsBuilder;
|
|
3020
|
-
|
|
3021
|
-
/**
|
|
3022
|
-
* Add Electron window capture source
|
|
3023
|
-
* settings. Executable is optional.
|
|
3024
|
-
* @param browserWindow
|
|
3025
|
-
* @param settings
|
|
3026
|
-
*/
|
|
3027
|
-
addBrowserWindowSource(
|
|
3028
|
-
browserWindow: BrowserWindow,
|
|
3029
|
-
setting: WindowCaptureSourceSettings
|
|
3030
|
-
): CaptureSettingsBuilder;
|
|
3031
|
-
|
|
3032
2858
|
/**
|
|
3033
2859
|
* Adds an audio device for capturing input or output audio.
|
|
3034
2860
|
*
|
|
@@ -3188,6 +3014,24 @@ interface RecordingAppOptions {
|
|
|
3188
3014
|
* Can be used to troubleshoot issues during recording.
|
|
3189
3015
|
*/
|
|
3190
3016
|
enableDebugLogs?: boolean;
|
|
3017
|
+
|
|
3018
|
+
/**
|
|
3019
|
+
* Additional command-line arguments to pass when launching the recorder.
|
|
3020
|
+
* This can be used to customize the underlying OBS runtime behavior.
|
|
3021
|
+
*/
|
|
3022
|
+
customCommandLineArgs?: string[];
|
|
3023
|
+
|
|
3024
|
+
/**
|
|
3025
|
+
* Specifies a custom folder path to override the default OBS binaries used by the recorder.
|
|
3026
|
+
* Useful for testing with a modified or custom OBS build.
|
|
3027
|
+
*/
|
|
3028
|
+
overrideOBSFolder?: string;
|
|
3029
|
+
|
|
3030
|
+
/**
|
|
3031
|
+
* Interval in milliseconds for emitting 'stats' events.
|
|
3032
|
+
* Default is 2000 (2 seconds). Set to `0` to disable stats reporting.
|
|
3033
|
+
*/
|
|
3034
|
+
statsInterval?: number;
|
|
3191
3035
|
}
|
|
3192
3036
|
|
|
3193
3037
|
|
|
@@ -3890,6 +3734,7 @@ interface IOverwolfRecordingApi {
|
|
|
3890
3734
|
* Registers games to monitor and track for launch/exit detection.
|
|
3891
3735
|
*
|
|
3892
3736
|
* @param filter Filtering rules for which games to track.
|
|
3737
|
+
*
|
|
3893
3738
|
*/
|
|
3894
3739
|
registerGames(filter: GamesFilter): void;
|
|
3895
3740
|
|
|
@@ -3900,17 +3745,9 @@ interface IOverwolfRecordingApi {
|
|
|
3900
3745
|
* @see {@link AudioDeviceSettingsUpdateInfo}
|
|
3901
3746
|
* @since 0.32.0
|
|
3902
3747
|
*/
|
|
3903
|
-
updateAudioDevice(
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
* Set a source to transform.
|
|
3907
|
-
*
|
|
3908
|
-
* Defines how the source will be rendered (for example, position, scale, crop, etc.).
|
|
3909
|
-
* Throws an error if the source is not found or if the transform is invalid.
|
|
3910
|
-
*
|
|
3911
|
-
* @param sourceTransform
|
|
3912
|
-
*/
|
|
3913
|
-
setSourceTransform(sourceTransform: SourceTransform): Promise<void>;
|
|
3748
|
+
updateAudioDevice(
|
|
3749
|
+
device: AudioDeviceSettingsUpdateInfo
|
|
3750
|
+
): Promise<void>;
|
|
3914
3751
|
|
|
3915
3752
|
/** @event Fired when a registered game is launched. */
|
|
3916
3753
|
on(eventName: 'game-launched', listener: (gameInfo: GameInfo) => void): this;
|
|
@@ -3942,9 +3779,9 @@ interface IOverwolfRecordingApi {
|
|
|
3942
3779
|
*/
|
|
3943
3780
|
on(eventName: 'stats', listener: (args: RecorderStats) => void): this;
|
|
3944
3781
|
}
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
// --- modules\packages.d.ts ---
|
|
3782
|
+
|
|
3783
|
+
|
|
3784
|
+
// --- modules\packages.d.ts ---
|
|
3948
3785
|
// -----------------------------------------------------------------------------
|
|
3949
3786
|
//
|
|
3950
3787
|
/**
|
|
@@ -3999,9 +3836,9 @@ interface OWPackages extends overwolf.packages.OverwolfPackageManager {
|
|
|
3999
3836
|
*/
|
|
4000
3837
|
crn: IOverwolfCRNApi;
|
|
4001
3838
|
}
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
// --- modules\overlay.d.ts ---
|
|
3839
|
+
|
|
3840
|
+
|
|
3841
|
+
// --- modules\overlay.d.ts ---
|
|
4005
3842
|
/**
|
|
4006
3843
|
* APIs for controlling and creating overlays in games. Overlay is the ability to show windows on top of the current game window.
|
|
4007
3844
|
*
|
|
@@ -5005,9 +4842,9 @@ interface IOverwolfOverlayApi extends EventEmitter {
|
|
|
5005
4842
|
listener: (info: GameInputInterception) => void
|
|
5006
4843
|
): this;
|
|
5007
4844
|
}
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
// --- modules\crn.d.ts ---
|
|
4845
|
+
|
|
4846
|
+
|
|
4847
|
+
// --- modules\crn.d.ts ---
|
|
5011
4848
|
/**
|
|
5012
4849
|
* The *Content Recommendation Notification* (CRN) APIs give you tools to help manage the content notification settings in your app.
|
|
5013
4850
|
*
|
|
@@ -5144,4 +4981,4 @@ export interface IOverwolfCRNApi {
|
|
|
5144
4981
|
eventName: 'notification-action',
|
|
5145
4982
|
listener: (event: CRNActionType) => void
|
|
5146
4983
|
): this;
|
|
5147
|
-
}
|
|
4984
|
+
}
|