@overwolf/ow-electron-packages-types 0.0.9 → 0.1.0-beta.3
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/LICENSE +21 -21
- package/README.md +45 -41
- package/common/common.d.ts +48 -0
- package/common/index.ts +1 -0
- package/docs/gep/game-events-provider.md +0 -0
- package/docs/overlay/overlay.md +0 -0
- package/docs/packages.md +23 -0
- package/docs/recorder/api-specification.md +95 -0
- package/docs/recorder/recorder.md +397 -0
- package/docs/recorder/types.md +343 -0
- package/{game-list.ts → game-list.d.ts} +34 -34
- package/gep-supported-games.d.ts +6 -0
- package/overlay/index.ts +1 -0
- package/{overlay.d.ts → overlay/overlay.d.ts} +298 -332
- package/package.json +29 -23
- package/recorder/index.ts +2 -0
- package/recorder/recording-api.interface.d.ts +195 -0
- package/recorder/recording-api.types.d.ts +1177 -0
- package/types.d.ts +5 -0
- package/gep-supported-games.ts +0 -4
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Overwolf Ltd.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Overwolf Ltd.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,41 +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.
|
|
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
|
+
[ow-electron packages](./docs/packages.md)
|
|
@@ -0,0 +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;
|
|
48
|
+
}
|
package/common/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './common'
|
|
File without changes
|
|
File without changes
|
package/docs/packages.md
ADDED
|
@@ -0,0 +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)
|
|
@@ -0,0 +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
|
+
```
|