-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
69 lines (58 loc) · 1.61 KB
/
Copy pathtypes.ts
File metadata and controls
69 lines (58 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
export enum AudioLevel {
SILENT = "silent",
LOW = "low",
HIGH = "high",
}
export enum MediaAggregationType {
NONE = "NONE",
COMPOSITE = "COMPOSITE",
}
export enum MediaType {
AUDIO = "AUDIO",
VIDEO = "VIDEO",
APPLICATION = "APPLICATION",
}
export enum EndpointType {
ENDPOINT = "ENDPOINT",
CALL_ID = "CALL_ID",
PHONE_NUMBER = "PHONE_NUMBER",
}
export type AudioLevelChangeHandler = { (audioLevel: AudioLevel): void };
/**
* @property {string} endpointToken - The endpoint token is a "string" in the JWT format.
* To be possible the token utilization, parse the token using "jwt_decode" function, the expected result should be a {@link JwtPayload} object.
*/
export interface RtcAuthParams {
endpointToken: string;
}
export interface RtcOptions {
websocketUrl?: string;
iceServers?: RTCIceServer[];
iceTransportPolicy?: RTCIceTransportPolicy;
/**
* When true (default), the gateway sets autoAccepted=true on the streamAvailable
* notification so the SDK skips the accept/decline prompt and the call connects
* immediately. Set to false to show a prompt and require the user to call
* acceptStream or declineStream.
*/
autoAccept?: boolean;
}
export interface RtcStream {
mediaTypes: MediaType[];
mediaStream?: MediaStream;
callId?: string;
autoAccepted?: boolean;
}
export class BandwidthRtcError extends Error {}
export interface ReadyMetadata {
endpointId: string;
deviceId: string;
territory: string; // TODO enum
region: string; // TODO enum
}
export interface OutboundConnectionResult {
accepted: boolean;
}
export interface HangupResult {
result: string;
}