@opencxh/domain 1.9.0 → 1.12.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/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export * from './platform/menu';
|
|
|
27
27
|
export * from './platform/reactive';
|
|
28
28
|
export * from './platform/routing';
|
|
29
29
|
export * from './platform/sdk';
|
|
30
|
+
export * from './platform/settings';
|
|
30
31
|
export * from './platform/service-registry';
|
|
31
32
|
export * from './platform/services';
|
|
32
33
|
export * from './platform/ui';
|
package/dist/platform/sdk.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { CommsAccount, Session } from './communication';
|
|
|
4
4
|
import { PlatformConfig, PlatformContext } from './kernel';
|
|
5
5
|
import { AudioChunk } from './media';
|
|
6
6
|
import { ServiceCallOptions, ServiceMap } from './services';
|
|
7
|
+
import { DeepPartial, DeviceList, UserSettings } from './settings';
|
|
7
8
|
import { ExtensionConfig, ToastConfig } from './ui';
|
|
8
9
|
type ServiceKey<S extends ServiceMap> = keyof S;
|
|
9
10
|
export type ParamsOf<S extends ServiceMap, K extends ServiceKey<S>> = S[K]['params'];
|
|
@@ -58,12 +59,29 @@ export interface InternalSDK<LocalServices extends ServiceMap = {}, TranslationK
|
|
|
58
59
|
readonly media: {
|
|
59
60
|
localStream$: Observable<MediaStream | null>;
|
|
60
61
|
audioChunks$: Observable<AudioChunk>;
|
|
62
|
+
devices$: Observable<DeviceList>;
|
|
61
63
|
emitAudioChunk(chunk: AudioChunk): void;
|
|
62
64
|
setInputDevice(deviceId: string): Promise<void>;
|
|
63
65
|
toggleMute(mute?: boolean): void;
|
|
64
66
|
attachProviderStream(sessionId: string, stream: MediaStream): void;
|
|
65
67
|
detachStream(sessionId: string): void;
|
|
66
68
|
setAudioOutput(deviceId: string): Promise<void>;
|
|
69
|
+
getInputDevices(): MediaDeviceInfo[];
|
|
70
|
+
getOutputDevices(): MediaDeviceInfo[];
|
|
71
|
+
enumerateDevices(): Promise<void>;
|
|
72
|
+
};
|
|
73
|
+
readonly settings: {
|
|
74
|
+
settings$: Observable<UserSettings>;
|
|
75
|
+
get(): UserSettings;
|
|
76
|
+
update(partial: DeepPartial<UserSettings>): void;
|
|
77
|
+
getIceServers(): RTCIceServer[];
|
|
78
|
+
getAudioInputDeviceId(): string;
|
|
79
|
+
setAudioInputDeviceId(deviceId: string): void;
|
|
80
|
+
getAudioOutputDeviceId(): string;
|
|
81
|
+
setAudioOutputDeviceId(deviceId: string): void;
|
|
82
|
+
getVideoDeviceId(): string;
|
|
83
|
+
setVideoDeviceId(deviceId: string): void;
|
|
84
|
+
setIceServers(servers: RTCIceServer[]): void;
|
|
67
85
|
};
|
|
68
86
|
}
|
|
69
87
|
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export interface UserSettings {
|
|
3
|
+
audio: {
|
|
4
|
+
selectedMicrophone: string;
|
|
5
|
+
selectedSpeaker: string;
|
|
6
|
+
microphoneVolume: number;
|
|
7
|
+
speakerVolume: number;
|
|
8
|
+
};
|
|
9
|
+
video: {
|
|
10
|
+
selectedCamera: string;
|
|
11
|
+
cameraEnabled: boolean;
|
|
12
|
+
videoQuality: string;
|
|
13
|
+
};
|
|
14
|
+
communication: {
|
|
15
|
+
ringtoneEnabled: boolean;
|
|
16
|
+
ringbackEnabled: boolean;
|
|
17
|
+
callWaitingEnabled: boolean;
|
|
18
|
+
autoAnswerCall: boolean;
|
|
19
|
+
iceServers: RTCIceServer[];
|
|
20
|
+
};
|
|
21
|
+
notifications: {
|
|
22
|
+
soundEnabled: boolean;
|
|
23
|
+
desktopNotifications: boolean;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export type DeepPartial<T> = {
|
|
27
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
28
|
+
};
|
|
29
|
+
export interface DeviceList {
|
|
30
|
+
input: MediaDeviceInfo[];
|
|
31
|
+
output: MediaDeviceInfo[];
|
|
32
|
+
}
|
|
33
|
+
export interface ISettingsManager {
|
|
34
|
+
readonly settings$: Observable<UserSettings>;
|
|
35
|
+
get(): UserSettings;
|
|
36
|
+
update(partial: DeepPartial<UserSettings>): void;
|
|
37
|
+
getIceServers(): RTCIceServer[];
|
|
38
|
+
getAudioInputDeviceId(): string;
|
|
39
|
+
setAudioInputDeviceId(deviceId: string): void;
|
|
40
|
+
getAudioOutputDeviceId(): string;
|
|
41
|
+
setAudioOutputDeviceId(deviceId: string): void;
|
|
42
|
+
getVideoDeviceId(): string;
|
|
43
|
+
setVideoDeviceId(deviceId: string): void;
|
|
44
|
+
setIceServers(servers: RTCIceServer[]): void;
|
|
45
|
+
}
|