@overwolf/ow-electron-packages-types 0.1.0-beta.3 → 0.1.0-beta.4
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/README.md +44 -44
- package/common/common.d.ts +47 -47
- package/docs/packages.md +23 -23
- package/docs/recorder/api-specification.md +95 -95
- package/docs/recorder/recorder.md +397 -397
- package/game-list.d.ts +52 -35
- package/gep-supported-games.d.ts +8 -6
- package/overlay/overlay.d.ts +298 -298
- package/package.json +29 -29
- package/recorder/index.ts +1 -1
- package/recorder/recording-api.interface.d.ts +195 -195
- package/recorder/recording-api.types.d.ts +1177 -1177
- package/types.d.ts +5 -5
package/README.md
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
# @overwolf/ow-electron-packages-types
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
Overwolf Electron packages type definition files for autocompletion and documentation purposes.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
To install this package, simply run
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
$ npm i --save-dev @overwolf/ow-electron-packages-types
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
In newer versions of ow-electron, this package should be automatically bundled in.
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
|
-
|
|
19
|
-
To use this package in your Typescript project, simply import the relevant members from any relevant files
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
import "@overwolf/ow-electron-packages-types";
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Alternatively, you can add it directly to your tsconfig file, like so:
|
|
26
|
-
```
|
|
27
|
-
{
|
|
28
|
-
"compilerOptions":{
|
|
29
|
-
...,
|
|
30
|
-
"types": [
|
|
31
|
-
...,
|
|
32
|
-
"@overwolf/ow-electron-packages-types"
|
|
33
|
-
...
|
|
34
|
-
]
|
|
35
|
-
...,
|
|
36
|
-
}
|
|
37
|
-
...
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
This way, it will always be available in all of your files, even without an explicit import.
|
|
42
|
-
|
|
43
|
-
## Getting started with ow-electron packages
|
|
44
|
-
|
|
1
|
+
# @overwolf/ow-electron-packages-types
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Overwolf Electron packages type definition files for autocompletion and documentation purposes.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
To install this package, simply run
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
$ npm i --save-dev @overwolf/ow-electron-packages-types
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
In newer versions of ow-electron, this package should be automatically bundled in.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
To use this package in your Typescript project, simply import the relevant members from any relevant files
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
import "@overwolf/ow-electron-packages-types";
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Alternatively, you can add it directly to your tsconfig file, like so:
|
|
26
|
+
```
|
|
27
|
+
{
|
|
28
|
+
"compilerOptions":{
|
|
29
|
+
...,
|
|
30
|
+
"types": [
|
|
31
|
+
...,
|
|
32
|
+
"@overwolf/ow-electron-packages-types"
|
|
33
|
+
...
|
|
34
|
+
]
|
|
35
|
+
...,
|
|
36
|
+
}
|
|
37
|
+
...
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This way, it will always be available in all of your files, even without an explicit import.
|
|
42
|
+
|
|
43
|
+
## Getting started with ow-electron packages
|
|
44
|
+
|
|
45
45
|
[ow-electron packages](./docs/packages.md)
|
package/common/common.d.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import {overwolf} from '@overwolf/ow-electron/'
|
|
2
|
-
import { IOverwolfRecordingApi } from '../recorder';
|
|
3
|
-
import { IOverwolfOverlayApi } from '../overlay';
|
|
4
|
-
|
|
5
|
-
// -----------------------------------------------------------------------------
|
|
6
|
-
export declare type GameProcessInfo = {
|
|
7
|
-
pid?: number;
|
|
8
|
-
|
|
9
|
-
fullPath: string;
|
|
10
|
-
|
|
11
|
-
commandLine?: string;
|
|
12
|
-
|
|
13
|
-
is32Bit?: boolean;
|
|
14
|
-
|
|
15
|
-
isElevated?: boolean;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// -----------------------------------------------------------------------------
|
|
19
|
-
export declare type GameInfo = {
|
|
20
|
-
id: number;
|
|
21
|
-
|
|
22
|
-
classId: number;
|
|
23
|
-
|
|
24
|
-
name: string;
|
|
25
|
-
|
|
26
|
-
supported: boolean;
|
|
27
|
-
|
|
28
|
-
processInfo?: GameProcessInfo;
|
|
29
|
-
|
|
30
|
-
flags?: any;
|
|
31
|
-
|
|
32
|
-
type: 'Game' | 'Launcher';
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// -----------------------------------------------------------------------------
|
|
36
|
-
export interface GamesFilter {
|
|
37
|
-
all?: boolean;
|
|
38
|
-
|
|
39
|
-
includeUnsupported?: boolean;
|
|
40
|
-
|
|
41
|
-
gamesIds: number[];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// -----------------------------------------------------------------------------
|
|
45
|
-
export interface OWPackages extends overwolf.packages.OverwolfPackageManager {
|
|
46
|
-
recorder: IOverwolfRecordingApi;
|
|
47
|
-
overlay: IOverwolfOverlayApi;
|
|
1
|
+
import {overwolf} from '@overwolf/ow-electron/'
|
|
2
|
+
import { IOverwolfRecordingApi } from '../recorder';
|
|
3
|
+
import { IOverwolfOverlayApi } from '../overlay';
|
|
4
|
+
|
|
5
|
+
// -----------------------------------------------------------------------------
|
|
6
|
+
export declare type GameProcessInfo = {
|
|
7
|
+
pid?: number;
|
|
8
|
+
|
|
9
|
+
fullPath: string;
|
|
10
|
+
|
|
11
|
+
commandLine?: string;
|
|
12
|
+
|
|
13
|
+
is32Bit?: boolean;
|
|
14
|
+
|
|
15
|
+
isElevated?: boolean;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// -----------------------------------------------------------------------------
|
|
19
|
+
export declare type GameInfo = {
|
|
20
|
+
id: number;
|
|
21
|
+
|
|
22
|
+
classId: number;
|
|
23
|
+
|
|
24
|
+
name: string;
|
|
25
|
+
|
|
26
|
+
supported: boolean;
|
|
27
|
+
|
|
28
|
+
processInfo?: GameProcessInfo;
|
|
29
|
+
|
|
30
|
+
flags?: any;
|
|
31
|
+
|
|
32
|
+
type: 'Game' | 'Launcher';
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// -----------------------------------------------------------------------------
|
|
36
|
+
export interface GamesFilter {
|
|
37
|
+
all?: boolean;
|
|
38
|
+
|
|
39
|
+
includeUnsupported?: boolean;
|
|
40
|
+
|
|
41
|
+
gamesIds: number[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// -----------------------------------------------------------------------------
|
|
45
|
+
export interface OWPackages extends overwolf.packages.OverwolfPackageManager {
|
|
46
|
+
recorder: IOverwolfRecordingApi;
|
|
47
|
+
overlay: IOverwolfOverlayApi;
|
|
48
48
|
}
|
package/docs/packages.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
# Working with ow-electron packages
|
|
3
|
-
|
|
4
|
-
In order to add more/remove certain ow-electron "packages" from the project, simply edit the `overwolf.packages` array in the [package.json](/package.json) file, like so:
|
|
5
|
-
|
|
6
|
-
```json
|
|
7
|
-
{
|
|
8
|
-
...
|
|
9
|
-
"overwolf": {
|
|
10
|
-
"packages": [
|
|
11
|
-
"gep",
|
|
12
|
-
"overlay",
|
|
13
|
-
"recorder"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
...
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Available packages detailed information
|
|
21
|
-
* [recorder](./recorder/recorder.md)
|
|
22
|
-
* [gep](./gep/game-events-provider.md)
|
|
23
|
-
* [overlay](/overlay/overlay.md)
|
|
1
|
+
|
|
2
|
+
# Working with ow-electron packages
|
|
3
|
+
|
|
4
|
+
In order to add more/remove certain ow-electron "packages" from the project, simply edit the `overwolf.packages` array in the [package.json](/package.json) file, like so:
|
|
5
|
+
|
|
6
|
+
```json
|
|
7
|
+
{
|
|
8
|
+
...
|
|
9
|
+
"overwolf": {
|
|
10
|
+
"packages": [
|
|
11
|
+
"gep",
|
|
12
|
+
"overlay",
|
|
13
|
+
"recorder"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
...
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Available packages detailed information
|
|
21
|
+
* [recorder](./recorder/recorder.md)
|
|
22
|
+
* [gep](./gep/game-events-provider.md)
|
|
23
|
+
* [overlay](/overlay/overlay.md)
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
# API Specification
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
- `options`: Contains global options for debugging [RecordingAppOptions](types.md#recordingappoptions)
|
|
7
|
-
|
|
8
|
-
## Methods
|
|
9
|
-
|
|
10
|
-
> **Important:** It is recommended to wrap the methods in a try/catch block to handle any possible exceptions from the recording API.
|
|
11
|
-
|
|
12
|
-
- `isActive()`: Checks if recording or replays status is active.
|
|
13
|
-
```javascript
|
|
14
|
-
const active = await recorderApi.isActive();
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
- `queryInformation()`: Queries system information, including supported encoders and available audio/video devices and monitors.
|
|
18
|
-
```javascript
|
|
19
|
-
const info = await recorderApi.queryInformation();
|
|
20
|
-
console.log(info.monitors);
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
- `registerGames(filter)`: Registers game launches, triggering the `game-launched` event for detected processes. Accepts the [GamesFilter](types.md#gamesfilter) object.
|
|
24
|
-
```javascript
|
|
25
|
-
const gamesFilter = {
|
|
26
|
-
gameIds: [1111, 2222], // use [] for all games
|
|
27
|
-
};
|
|
28
|
-
recorderApi.registerGames(gamesFilter);
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
- `createSettingsBuilder(options)`: Creates the [Settings Builder](types.md#capturesettingsbuilder) object.
|
|
32
|
-
- Parameters: [CaptureSettingsOptions](types.md#capturesettingsoptions)
|
|
33
|
-
|
|
34
|
-
- `startRecording(options, setting, listener)`: Starts recording based on provided settings.
|
|
35
|
-
- Parameters:
|
|
36
|
-
- [RecordingOptions](types.md#recordingoptions)
|
|
37
|
-
- [CaptureSettings](types.md#capturesettings)
|
|
38
|
-
- StopCallback with [RecordStopEventArgs](types.md#recordstopeventargs)
|
|
39
|
-
|
|
40
|
-
- `stopRecording(listener)`: Stops the recording.
|
|
41
|
-
- Parameters: StopCallback with [RecordStopEventArgs](types.md#recordstopeventargs)
|
|
42
|
-
|
|
43
|
-
- `splitRecording(listener)`: Manually splits the video at the moment of calling the method, creating a subfolder in the current output directory for the split videos.
|
|
44
|
-
- Parameters: SplitCallback with [SplitRecordArgs](types.md#splitrecordargs)
|
|
45
|
-
|
|
46
|
-
## Events
|
|
47
|
-
|
|
48
|
-
- `recording-started`: Fired when video recording starts. Returns StartCallback with [RecordEventArgs](types.md#recordeventargs).
|
|
49
|
-
```javascript
|
|
50
|
-
recorderApi.on('recording-started', (RecordEventArgs) => {
|
|
51
|
-
console.log(RecordEventArgs.filePath);
|
|
52
|
-
});
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
- `recording-stopped`: Fired when video recording stops. Returns StopCallback with [RecordStopEventArgs](types.md#recordstopeventargs).
|
|
56
|
-
```javascript
|
|
57
|
-
recorderApi.on('recording-stopped', (RecordStopEventArgs) => {
|
|
58
|
-
console.log(RecordStopEventArgs.duration);
|
|
59
|
-
});
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
- `recording-split`: Fired when a recording video is split (manual/size/time). Returns SplitCallback with [SplitRecordArgs](types.md#splitrecordargs).
|
|
63
|
-
```javascript
|
|
64
|
-
recorderApi.on('recording-split', (SplitRecordArgs) => {
|
|
65
|
-
console.log(SplitRecordArgs.splitCount);
|
|
66
|
-
});
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
- `replays-started`: Fired when replays recording starts. Returns StartCallback with [RecordEventArgs](types.md#recordeventargs).
|
|
70
|
-
```javascript
|
|
71
|
-
recorderApi.on('replays-started', (RecordEventArgs) => {
|
|
72
|
-
console.log(RecordEventArgs.filePath);
|
|
73
|
-
});
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
- `replays-stopped`: Fired when replays recording stops. Returns ReplayStopCallback with [RecordEventArgs](types.md#recordeventargs).
|
|
77
|
-
```javascript
|
|
78
|
-
recorderApi.on('replays-stopped', (RecordEventArgs) => {
|
|
79
|
-
console.log(RecordEventArgs.filePath);
|
|
80
|
-
});
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
- `replay-captured`: Fired when a replay video is captured. Returns ReplayCallback with [ReplayVideo](types.md#replayvideo).
|
|
84
|
-
```javascript
|
|
85
|
-
recorderApi.on('replay-captured', (ReplayVideo) => {
|
|
86
|
-
console.log(ReplayVideo.duration);
|
|
87
|
-
});
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
- `stats`: Fired at every `statsIntervalMS` (defined in RecordingAppOptions) interval. Returns [RecorderStats](types.md#recorderstats).
|
|
91
|
-
```javascript
|
|
92
|
-
recorderApi.on('stats', (RecorderStats) => {
|
|
93
|
-
console.log(RecorderStats.cpuUsage);
|
|
94
|
-
});
|
|
95
|
-
```
|
|
1
|
+
|
|
2
|
+
# API Specification
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
- `options`: Contains global options for debugging [RecordingAppOptions](types.md#recordingappoptions)
|
|
7
|
+
|
|
8
|
+
## Methods
|
|
9
|
+
|
|
10
|
+
> **Important:** It is recommended to wrap the methods in a try/catch block to handle any possible exceptions from the recording API.
|
|
11
|
+
|
|
12
|
+
- `isActive()`: Checks if recording or replays status is active.
|
|
13
|
+
```javascript
|
|
14
|
+
const active = await recorderApi.isActive();
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- `queryInformation()`: Queries system information, including supported encoders and available audio/video devices and monitors.
|
|
18
|
+
```javascript
|
|
19
|
+
const info = await recorderApi.queryInformation();
|
|
20
|
+
console.log(info.monitors);
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `registerGames(filter)`: Registers game launches, triggering the `game-launched` event for detected processes. Accepts the [GamesFilter](types.md#gamesfilter) object.
|
|
24
|
+
```javascript
|
|
25
|
+
const gamesFilter = {
|
|
26
|
+
gameIds: [1111, 2222], // use [] for all games
|
|
27
|
+
};
|
|
28
|
+
recorderApi.registerGames(gamesFilter);
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- `createSettingsBuilder(options)`: Creates the [Settings Builder](types.md#capturesettingsbuilder) object.
|
|
32
|
+
- Parameters: [CaptureSettingsOptions](types.md#capturesettingsoptions)
|
|
33
|
+
|
|
34
|
+
- `startRecording(options, setting, listener)`: Starts recording based on provided settings.
|
|
35
|
+
- Parameters:
|
|
36
|
+
- [RecordingOptions](types.md#recordingoptions)
|
|
37
|
+
- [CaptureSettings](types.md#capturesettings)
|
|
38
|
+
- StopCallback with [RecordStopEventArgs](types.md#recordstopeventargs)
|
|
39
|
+
|
|
40
|
+
- `stopRecording(listener)`: Stops the recording.
|
|
41
|
+
- Parameters: StopCallback with [RecordStopEventArgs](types.md#recordstopeventargs)
|
|
42
|
+
|
|
43
|
+
- `splitRecording(listener)`: Manually splits the video at the moment of calling the method, creating a subfolder in the current output directory for the split videos.
|
|
44
|
+
- Parameters: SplitCallback with [SplitRecordArgs](types.md#splitrecordargs)
|
|
45
|
+
|
|
46
|
+
## Events
|
|
47
|
+
|
|
48
|
+
- `recording-started`: Fired when video recording starts. Returns StartCallback with [RecordEventArgs](types.md#recordeventargs).
|
|
49
|
+
```javascript
|
|
50
|
+
recorderApi.on('recording-started', (RecordEventArgs) => {
|
|
51
|
+
console.log(RecordEventArgs.filePath);
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `recording-stopped`: Fired when video recording stops. Returns StopCallback with [RecordStopEventArgs](types.md#recordstopeventargs).
|
|
56
|
+
```javascript
|
|
57
|
+
recorderApi.on('recording-stopped', (RecordStopEventArgs) => {
|
|
58
|
+
console.log(RecordStopEventArgs.duration);
|
|
59
|
+
});
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- `recording-split`: Fired when a recording video is split (manual/size/time). Returns SplitCallback with [SplitRecordArgs](types.md#splitrecordargs).
|
|
63
|
+
```javascript
|
|
64
|
+
recorderApi.on('recording-split', (SplitRecordArgs) => {
|
|
65
|
+
console.log(SplitRecordArgs.splitCount);
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- `replays-started`: Fired when replays recording starts. Returns StartCallback with [RecordEventArgs](types.md#recordeventargs).
|
|
70
|
+
```javascript
|
|
71
|
+
recorderApi.on('replays-started', (RecordEventArgs) => {
|
|
72
|
+
console.log(RecordEventArgs.filePath);
|
|
73
|
+
});
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- `replays-stopped`: Fired when replays recording stops. Returns ReplayStopCallback with [RecordEventArgs](types.md#recordeventargs).
|
|
77
|
+
```javascript
|
|
78
|
+
recorderApi.on('replays-stopped', (RecordEventArgs) => {
|
|
79
|
+
console.log(RecordEventArgs.filePath);
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- `replay-captured`: Fired when a replay video is captured. Returns ReplayCallback with [ReplayVideo](types.md#replayvideo).
|
|
84
|
+
```javascript
|
|
85
|
+
recorderApi.on('replay-captured', (ReplayVideo) => {
|
|
86
|
+
console.log(ReplayVideo.duration);
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
- `stats`: Fired at every `statsIntervalMS` (defined in RecordingAppOptions) interval. Returns [RecorderStats](types.md#recorderstats).
|
|
91
|
+
```javascript
|
|
92
|
+
recorderApi.on('stats', (RecorderStats) => {
|
|
93
|
+
console.log(RecorderStats.cpuUsage);
|
|
94
|
+
});
|
|
95
|
+
```
|