steelseries-sonar-sdk 0.1.1 → 0.2.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 +3 -3
- package/src/consts/fetch-options-put.d.ts +3 -0
- package/src/enums.d.ts +81 -0
- package/src/exceptions.d.ts +32 -0
- package/src/functions/audio/get-audio-data-classic.d.ts +7 -0
- package/src/functions/audio/get-audio-data-stream.d.ts +7 -0
- package/src/functions/audio/get-audio-mode.d.ts +7 -0
- package/src/functions/audio/set-audio-mode.d.ts +8 -0
- package/src/functions/audio/set-channel-mute-classic.d.ts +9 -0
- package/src/functions/audio/set-channel-mute-streamer.d.ts +10 -0
- package/src/functions/audio/set-channel-volume-classic.d.ts +9 -0
- package/src/functions/audio/set-channel-volume-streamer.d.ts +10 -0
- package/src/functions/chatmix/get-chat-mix-state.d.ts +7 -0
- package/src/functions/chatmix/set-chat-mix-balance.d.ts +7 -0
- package/src/functions/converters/convert-channel-to-api.d.ts +3 -0
- package/src/functions/converters/convert-chat-mix-balance-to-api.d.ts +2 -0
- package/src/functions/converters/convert-chat-mix-balance-to-user.d.ts +2 -0
- package/src/functions/converters/convert-profile-channel-to-api.d.ts +3 -0
- package/src/functions/converters/convert-profile-channel-to-user.d.ts +3 -0
- package/src/functions/converters/convert-volume-to-api.d.ts +1 -0
- package/src/functions/converters/convert-volume-to-user.d.ts +1 -0
- package/src/functions/devices/get-audio-devices.d.ts +3 -0
- package/src/functions/devices/set-audio-device.d.ts +3 -0
- package/src/functions/endpoint/get-app-endpoint.d.ts +14 -0
- package/src/functions/endpoint/get-sonar-endpoint-cached.d.ts +1 -0
- package/src/functions/endpoint/get-sonar-endpoint.d.ts +14 -0
- package/src/functions/profile/get-channel-profiles.d.ts +3 -0
- package/src/functions/profile/get-selected-profiles.d.ts +2 -0
- package/src/functions/profile/set-selected-profile.d.ts +2 -0
- package/src/index.d.ts +29 -0
- package/src/sonar/models/audio-settings/chatmix-data.d.ts +5 -0
- package/src/sonar/models/audio-settings/enums/audio-mode.d.ts +4 -0
- package/src/sonar/models/audio-settings/enums/chat-mix-state.d.ts +6 -0
- package/src/sonar/models/audio-settings/enums/device-data-flow.d.ts +5 -0
- package/src/sonar/models/audio-settings/enums/device-default-roles.d.ts +6 -0
- package/src/sonar/models/audio-settings/enums/device-role.d.ts +9 -0
- package/src/sonar/models/audio-settings/enums/device-state.d.ts +8 -0
- package/src/sonar/models/audio-settings/enums/sonar-channel.d.ts +8 -0
- package/src/sonar/models/audio-settings/enums/streaming-path.d.ts +4 -0
- package/src/sonar/models/audio-settings/volume-info-classic.d.ts +4 -0
- package/src/sonar/models/audio-settings/volume-info-streamer.d.ts +10 -0
- package/src/sonar/models/audio-settings/volume-settings-classic.d.ts +9 -0
- package/src/sonar/models/audio-settings/volume-settings-streamer.d.ts +9 -0
- package/src/sonar/models/config/config.d.ts +8 -0
- package/src/sonar/models/config/enums/VirtualAudioDevice.d.ts +7 -0
- package/src/sonar/models/devices/audio-device.d.ts +16 -0
- package/src/sonar/models/devices/changed-device.d.ts +6 -0
- package/src/sonar/requests/audio-devices/change-audio-device.d.ts +3 -0
- package/src/sonar/requests/audio-devices/request-audio-devices.d.ts +9 -0
- package/src/sonar/requests/chatmix/change-chat-mix-balance.d.ts +2 -0
- package/src/sonar/requests/chatmix/request-chat-mix-state.d.ts +2 -0
- package/src/sonar/requests/mode/change-audio-mode.d.ts +2 -0
- package/src/sonar/requests/mode/request-audio-mode.d.ts +2 -0
- package/src/sonar/requests/profiles/change-selected-config.d.ts +2 -0
- package/src/sonar/requests/profiles/request-configs.d.ts +3 -0
- package/src/sonar/requests/profiles/request-selected-configs.d.ts +2 -0
- package/src/sonar/requests/volume-settings/change-volume-level-classic.d.ts +3 -0
- package/src/sonar/requests/volume-settings/change-volume-level-streamer.d.ts +4 -0
- package/src/sonar/requests/volume-settings/change-volume-mute-classic.d.ts +3 -0
- package/src/sonar/requests/volume-settings/change-volume-mute-streamer.d.ts +4 -0
- package/src/sonar/requests/volume-settings/request-volume-settings-classic.d.ts +2 -0
- package/src/sonar/requests/volume-settings/request-volume-settings-streamer.d.ts +2 -0
- package/src/types/audio-device.d.ts +6 -0
- package/src/types/changed-device.d.ts +6 -0
- package/src/types/channel-volume-classic.d.ts +4 -0
- package/src/types/channel-volume-streamer-path.d.ts +4 -0
- package/src/types/channel-volume-streamer.d.ts +5 -0
- package/src/types/channel-volumes-classic.d.ts +7 -0
- package/src/types/channel-volumes-streamer.d.ts +7 -0
- package/src/types/chat-mix-data.d.ts +6 -0
- package/src/types/profile-option.d.ts +8 -0
- package/tsconfig.build.json +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "steelseries-sonar-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "An SDK for interacting with the SteelSeries Sonar software.",
|
|
5
5
|
"author": "Harley Torrisi <mail@harleycodes.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test-e2e-endpoint": "bun test ./tests/e2e/**/*.test.ts -t getSonarEndpoint",
|
|
26
26
|
"test-unit": "bun test ./tests/unit/**/*.test.ts",
|
|
27
27
|
"test-all": "bun test-unit && bun test-e2e",
|
|
28
|
-
"package": "bun build
|
|
29
|
-
"package-minify": "bun build
|
|
28
|
+
"package": "bunx tsc --emitDeclarationOnly --outDir dist -p tsconfig.build.json && bun build src/index.ts --outdir dist --target=node",
|
|
29
|
+
"package-minify": "bunx tsc --emitDeclarationOnly --outDir dist -p tsconfig.build.json && bun build src/index.ts --outdir dist --minify --target=node"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/src/enums.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sonar audio mixing channels.
|
|
3
|
+
* @property {@link AudioChannel.Master} - Master volume channel.
|
|
4
|
+
* @property {@link AudioChannel.Game} - Game audio channel.
|
|
5
|
+
* @property {@link AudioChannel.Chat} - Chat audio channel.
|
|
6
|
+
* @property {@link AudioChannel.Media} - Media audio channel.
|
|
7
|
+
* @property {@link AudioChannel.Aux} - Auxiliary audio channel.
|
|
8
|
+
* @property {@link AudioChannel.Mic} - Microphone audio channel.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum AudioChannel {
|
|
11
|
+
Master = "master",
|
|
12
|
+
Game = "game",
|
|
13
|
+
Chat = "chat",
|
|
14
|
+
Media = "media",
|
|
15
|
+
Aux = "aux",
|
|
16
|
+
Mic = "mic"
|
|
17
|
+
}
|
|
18
|
+
export declare enum ProfileChannel {
|
|
19
|
+
Game = "game",
|
|
20
|
+
Chat = "chat",
|
|
21
|
+
Media = "media",
|
|
22
|
+
Aux = "aux",
|
|
23
|
+
Mic = "mic"
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Sonar device channels.
|
|
27
|
+
* @property {@link DeviceChannel.Output} - All output channels.
|
|
28
|
+
* @property {@link DeviceChannel.Game} - Game output channel.
|
|
29
|
+
* @property {@link DeviceChannel.Chat} - Chat output channel.
|
|
30
|
+
* @property {@link DeviceChannel.Media} - Media output channel.
|
|
31
|
+
* @property {@link DeviceChannel.Aux} - Auxiliary output channel.
|
|
32
|
+
* @property {@link DeviceChannel.Mic} - Microphone input channel.
|
|
33
|
+
*/
|
|
34
|
+
export declare enum DeviceChannel {
|
|
35
|
+
Output = "render",
|
|
36
|
+
Game = "game",
|
|
37
|
+
Chat = "chat",
|
|
38
|
+
Media = "media",
|
|
39
|
+
Aux = "aux",
|
|
40
|
+
Mic = "mic"
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Sonar Streamer Mode path.
|
|
44
|
+
* @property {@link StreamerPath.Streaming} - What the audience will hear.
|
|
45
|
+
* @property {@link StreamerPath.Monitoring} - What the owner will hear.
|
|
46
|
+
*/
|
|
47
|
+
export declare enum StreamerPath {
|
|
48
|
+
Streaming = "streaming",
|
|
49
|
+
Monitoring = "monitoring"
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Sonar mixing state.
|
|
53
|
+
* @property {@link AudioMode.Classic} - Basic mixing.
|
|
54
|
+
* @property {@link AudioMode.Streamer} - Advanced mixing - has stream/monitor path each channel.
|
|
55
|
+
*/
|
|
56
|
+
export declare enum AudioMode {
|
|
57
|
+
Classic = "classic",
|
|
58
|
+
Streamer = "stream"
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The state of CHATMIX availability.
|
|
62
|
+
* @property {@link ChatMixState.Enabled} - CHATMIX is enabled and available.
|
|
63
|
+
* @property {@link ChatMixState.FiniteWheel} - CHATMIX is available but the user cannot interact with it via software.
|
|
64
|
+
* @property {@link ChatMixState.DifferentDeviceSelected} - CHATMIX is unavailable because a different output device is selected.
|
|
65
|
+
* @property {@link ChatMixState.NoDeviceSelected} - CHATMIX is unavailable because no output device is selected.
|
|
66
|
+
*/
|
|
67
|
+
export declare enum ChatMixState {
|
|
68
|
+
Enabled = "enabled",
|
|
69
|
+
FiniteWheel = "finiteWheel",
|
|
70
|
+
DifferentDeviceSelected = "differentDeviceSelected",
|
|
71
|
+
NoDeviceSelected = "noDeviceSelected"
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Type of audio device.
|
|
75
|
+
* @property {@link DeviceFlow.Output} - Device used to render audio (e.g. speakers, headphones).
|
|
76
|
+
* @property {@link DeviceFlow.Input} - Device used to capture audio (e.g. microphones).
|
|
77
|
+
*/
|
|
78
|
+
export declare enum DeviceFlow {
|
|
79
|
+
Output = "output",
|
|
80
|
+
Input = "input"
|
|
81
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type RequestErrorProps = {
|
|
2
|
+
message?: string;
|
|
3
|
+
innerException?: Error;
|
|
4
|
+
};
|
|
5
|
+
export declare enum InitializeErrorReason {
|
|
6
|
+
BadConfig = "Bad Config",
|
|
7
|
+
OSUnsupported = "OS Unsupported",
|
|
8
|
+
NotEnabled = "Not Enabled",
|
|
9
|
+
NotRunning = "Not Running",
|
|
10
|
+
NotReady = "Not Ready",
|
|
11
|
+
NotResponding = "Not Responding",
|
|
12
|
+
NotAvailable = "Not Available"
|
|
13
|
+
}
|
|
14
|
+
type InitializeErrorProps = {
|
|
15
|
+
message?: string;
|
|
16
|
+
innerException?: Error;
|
|
17
|
+
reason: InitializeErrorReason;
|
|
18
|
+
};
|
|
19
|
+
/** Base exception for all handled Sonar related exception. */
|
|
20
|
+
export declare abstract class SonarException extends Error {
|
|
21
|
+
constructor(message: string, cause?: Error);
|
|
22
|
+
}
|
|
23
|
+
/** Thrown when the server responds in an unexpected way. */
|
|
24
|
+
export declare class SonarRequestException extends SonarException {
|
|
25
|
+
constructor(error?: RequestErrorProps);
|
|
26
|
+
}
|
|
27
|
+
/** Thrown when the server cannot be determined. */
|
|
28
|
+
export declare class SonarInitializationException extends SonarException {
|
|
29
|
+
reason: InitializeErrorReason;
|
|
30
|
+
constructor(error: InitializeErrorProps);
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChannelVolumesClassic } from '@/types/channel-volumes-classic';
|
|
2
|
+
/**
|
|
3
|
+
* Gets audio data for all channels.
|
|
4
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
5
|
+
* @returns volume in the range of 0 to 100,
|
|
6
|
+
*/
|
|
7
|
+
export declare function getAudioDataClassic(sonarEndpoint: string): Promise<ChannelVolumesClassic>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChannelVolumesStreamer } from '@/types/channel-volumes-streamer';
|
|
2
|
+
/**
|
|
3
|
+
* Gets audio data for all channels.
|
|
4
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
5
|
+
* @returns volume in the range of 0 to 100,
|
|
6
|
+
*/
|
|
7
|
+
export declare function getAudioDataStream(sonarEndpoint: string): Promise<ChannelVolumesStreamer>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AudioMode } from '@/enums';
|
|
2
|
+
/**
|
|
3
|
+
* Gets audio data for all channels.
|
|
4
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
5
|
+
* @param audioMode Target audio mode
|
|
6
|
+
* @returns classic or streamer mode
|
|
7
|
+
*/
|
|
8
|
+
export declare function setAudioMode(sonarEndpoint: string, audioMode: AudioMode): Promise<AudioMode>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AudioChannel } from '@/enums';
|
|
2
|
+
import type { ChannelVolumeClassic } from '@/types/channel-volume-classic';
|
|
3
|
+
/**
|
|
4
|
+
* Sets audio data for target channel.
|
|
5
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
6
|
+
* @param isMuted Will mute if true.
|
|
7
|
+
* @param channel Target audio channel
|
|
8
|
+
*/
|
|
9
|
+
export declare function setChannelMuteClassic(sonarEndpoint: string, isMuted: boolean, channel: AudioChannel): Promise<ChannelVolumeClassic>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AudioChannel, StreamerPath } from '@/enums';
|
|
2
|
+
import type { ChannelVolumeStreamerPath } from '@/types/channel-volume-streamer-path';
|
|
3
|
+
/**
|
|
4
|
+
* Sets audio data for target channel.
|
|
5
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
6
|
+
* @param isMuted Will mute if true.
|
|
7
|
+
* @param channel Target audio channel
|
|
8
|
+
* @param path Target streamer path
|
|
9
|
+
*/
|
|
10
|
+
export declare function setChannelMuteStreamer(sonarEndpoint: string, isMuted: boolean, channel: AudioChannel, path: StreamerPath): Promise<ChannelVolumeStreamerPath>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AudioChannel } from '@/enums';
|
|
2
|
+
import type { ChannelVolumeClassic } from '@/types/channel-volume-classic';
|
|
3
|
+
/**
|
|
4
|
+
* Sets audio data for target channel.
|
|
5
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
6
|
+
* @param volumePercent Volume in the range of 0 to 100
|
|
7
|
+
* @param channel Target audio channel
|
|
8
|
+
*/
|
|
9
|
+
export declare function setChannelVolumeClassic(sonarEndpoint: string, volumePercent: number, channel: AudioChannel): Promise<ChannelVolumeClassic>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AudioChannel, StreamerPath } from '@/enums';
|
|
2
|
+
import type { ChannelVolumeStreamerPath } from '@/types/channel-volume-streamer-path';
|
|
3
|
+
/**
|
|
4
|
+
* Sets audio data for target channel.
|
|
5
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
6
|
+
* @param volumePercent Volume in the range of 0 to 100
|
|
7
|
+
* @param channel Target audio channel
|
|
8
|
+
* @param path Target streamer path
|
|
9
|
+
*/
|
|
10
|
+
export declare function setChannelVolumeStreamer(sonarEndpoint: string, volumePercent: number, channel: AudioChannel, path: StreamerPath): Promise<ChannelVolumeStreamerPath>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChatMixData } from '@/types/chat-mix-data';
|
|
2
|
+
/**
|
|
3
|
+
* Set CHATMIX balance between audio(0%) and chat(100%).
|
|
4
|
+
* @param sonarEndpoint Sonar endpoint URL
|
|
5
|
+
* @param chatBalance Balance as 0 - 100,
|
|
6
|
+
*/
|
|
7
|
+
export declare function setChatMixBalance(sonarEndpoint: string, chatBalance: number): Promise<ChatMixData>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function convertVolumeToApi(value: number): number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function convertVolumeToUser(value: number): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the SteelSeries GG application's encrypted address from the coreProps.json file.
|
|
3
|
+
*
|
|
4
|
+
* @returns A promise that resolves to the GG application's secure address string (e.g., "https://..."),
|
|
5
|
+
* as found in the ggEncryptedAddress property of coreProps.json.
|
|
6
|
+
*
|
|
7
|
+
* @throws {SonarInitializationException} If the GG server cannot be determined.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* - Only supports Windows OS; throws on other platforms.
|
|
11
|
+
* - Locates coreProps.json in the ProgramData directory under SteelSeries folders.
|
|
12
|
+
* - Reads and parses the file, returning the encrypted address as a secure URL.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getAppEndpoint(): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getSonarEndpointCached(appAddress: string, seconds?: number): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieves the Sonar web server address from an application server's /subApps endpoint.
|
|
3
|
+
*
|
|
4
|
+
* @param appEndpoint - The base URL of the application server (e.g. "https://localhost:1234").
|
|
5
|
+
* @returns A promise that resolves to the Sonar web server address.
|
|
6
|
+
*
|
|
7
|
+
* @throws {SonarInitializationException} If the sonar server cannot be determined.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* - Performs a GET request to `${appAddress}/subApps`.
|
|
11
|
+
* - The response body is expected to conform to the SubAppsResponse shape and contain `subApps.sonar`.
|
|
12
|
+
* - Uses a fetch TLS option that disables certificate verification (rejectUnauthorized: false).
|
|
13
|
+
*/
|
|
14
|
+
export declare function getSonarEndpoint(appEndpoint: string): Promise<string>;
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from '@/enums';
|
|
2
|
+
export * from '@/exceptions';
|
|
3
|
+
export * from '@/functions/audio/get-audio-data-classic';
|
|
4
|
+
export * from '@/functions/audio/get-audio-data-stream';
|
|
5
|
+
export * from '@/functions/audio/get-audio-mode';
|
|
6
|
+
export * from '@/functions/audio/set-audio-mode';
|
|
7
|
+
export * from '@/functions/audio/set-channel-mute-classic';
|
|
8
|
+
export * from '@/functions/audio/set-channel-mute-streamer';
|
|
9
|
+
export * from '@/functions/audio/set-channel-volume-classic';
|
|
10
|
+
export * from '@/functions/audio/set-channel-volume-streamer';
|
|
11
|
+
export * from '@/functions/chatmix/get-chat-mix-state';
|
|
12
|
+
export * from '@/functions/chatmix/set-chat-mix-balance';
|
|
13
|
+
export * from '@/functions/devices/get-audio-devices';
|
|
14
|
+
export * from '@/functions/devices/set-audio-device';
|
|
15
|
+
export * from '@/functions/endpoint/get-app-endpoint';
|
|
16
|
+
export * from '@/functions/endpoint/get-sonar-endpoint';
|
|
17
|
+
export * from '@/functions/endpoint/get-sonar-endpoint-cached';
|
|
18
|
+
export * from '@/functions/profile/get-channel-profiles';
|
|
19
|
+
export * from '@/functions/profile/get-selected-profiles';
|
|
20
|
+
export * from '@/functions/profile/set-selected-profile';
|
|
21
|
+
export * from '@/types/audio-device';
|
|
22
|
+
export * from '@/types/changed-device';
|
|
23
|
+
export * from '@/types/channel-volume-classic';
|
|
24
|
+
export * from '@/types/channel-volume-streamer';
|
|
25
|
+
export * from '@/types/channel-volume-streamer-path';
|
|
26
|
+
export * from '@/types/channel-volumes-classic';
|
|
27
|
+
export * from '@/types/channel-volumes-streamer';
|
|
28
|
+
export * from '@/types/chat-mix-data';
|
|
29
|
+
export * from '@/types/profile-option';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DeviceDataFlow } from '@/sonar/models/audio-settings/enums/device-data-flow';
|
|
2
|
+
import type { DeviceDefaultRoles } from '@/sonar/models/audio-settings/enums/device-default-roles';
|
|
3
|
+
import type { DeviceRole } from '@/sonar/models/audio-settings/enums/device-role';
|
|
4
|
+
import type { DeviceState } from '@/sonar/models/audio-settings/enums/device-state';
|
|
5
|
+
export type AudioDevice = {
|
|
6
|
+
id: string;
|
|
7
|
+
friendlyName: string;
|
|
8
|
+
dataFlow: DeviceDataFlow;
|
|
9
|
+
role: DeviceRole;
|
|
10
|
+
channels: number;
|
|
11
|
+
defaultRole: DeviceDefaultRoles;
|
|
12
|
+
fwUpdateRequired: boolean;
|
|
13
|
+
state: DeviceState;
|
|
14
|
+
/** `true` if {@link DeviceRole} ≠ {@link DeviceRole.None} */
|
|
15
|
+
isVad: boolean;
|
|
16
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeviceDataFlow } from '@/sonar/models/audio-settings/enums/device-data-flow';
|
|
2
|
+
import type { AudioDevice as SonarAudioDevice } from '@/sonar/models/devices/audio-device';
|
|
3
|
+
type Params = {
|
|
4
|
+
deviceDataFlow?: DeviceDataFlow;
|
|
5
|
+
onlySteelSeriesVAD?: boolean;
|
|
6
|
+
removeSteelSeriesVAD?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function requestAudioDevices(sonarEndpoint: string, params: Params): Promise<SonarAudioDevice[]>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SonarChannel } from '@/sonar/models/audio-settings/enums/sonar-channel';
|
|
2
|
+
import type { VolumeSettingsClassic } from '@/sonar/models/audio-settings/volume-settings-classic';
|
|
3
|
+
export declare function changeVolumeLevelClassic(sonarEndpoint: string, volume: number, deviceRole: SonarChannel): Promise<VolumeSettingsClassic>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SonarChannel } from '@/sonar/models/audio-settings/enums/sonar-channel';
|
|
2
|
+
import type { StreamingPath } from '@/sonar/models/audio-settings/enums/streaming-path';
|
|
3
|
+
import type { VolumeSettingsStreamer } from '@/sonar/models/audio-settings/volume-settings-streamer';
|
|
4
|
+
export declare function changeVolumeLevelStreamer(sonarEndpoint: string, volume: number, channel: SonarChannel, path: StreamingPath): Promise<VolumeSettingsStreamer>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SonarChannel } from '@/sonar/models/audio-settings/enums/sonar-channel';
|
|
2
|
+
import type { VolumeSettingsClassic } from '@/sonar/models/audio-settings/volume-settings-classic';
|
|
3
|
+
export declare function changeVolumeMuteClassic(sonarEndpoint: string, isMuted: boolean, deviceRole: SonarChannel): Promise<VolumeSettingsClassic>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SonarChannel } from '@/sonar/models/audio-settings/enums/sonar-channel';
|
|
2
|
+
import type { StreamingPath } from '@/sonar/models/audio-settings/enums/streaming-path';
|
|
3
|
+
import type { VolumeSettingsStreamer } from '@/sonar/models/audio-settings/volume-settings-streamer';
|
|
4
|
+
export declare function changeVolumeMuteStreamer(sonarEndpoint: string, isMuted: boolean, deviceRole: SonarChannel, path: StreamingPath): Promise<VolumeSettingsStreamer>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AudioChannel } from '@/enums';
|
|
2
|
+
import type { ChannelVolumeClassic } from '@/types/channel-volume-classic';
|
|
3
|
+
export type ChannelVolumesClassic = {
|
|
4
|
+
[AudioChannel.Master]: ChannelVolumeClassic;
|
|
5
|
+
} & {
|
|
6
|
+
[K in Exclude<AudioChannel, 'master'>]?: ChannelVolumeClassic;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AudioChannel } from '@/enums';
|
|
2
|
+
import type { ChannelVolumeStreamer } from '@/types/channel-volume-streamer';
|
|
3
|
+
export type ChannelVolumesStreamer = {
|
|
4
|
+
[AudioChannel.Master]: ChannelVolumeStreamer;
|
|
5
|
+
} & {
|
|
6
|
+
[K in AudioChannel]?: ChannelVolumeStreamer;
|
|
7
|
+
};
|