@videosdk.live/react-sdk 0.8.1 → 0.8.2
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.js +2998 -0
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +2949 -0
- package/dist/index.modern.js.map +1 -0
- package/dist/types/agentParticipant.d.ts +140 -0
- package/dist/types/character.d.ts +113 -0
- package/dist/types/connection.d.ts +19 -0
- package/dist/types/connectionMeeting.d.ts +49 -0
- package/dist/types/connectionParticipant.d.ts +15 -0
- package/dist/types/deviceInfo.d.ts +28 -0
- package/dist/types/index.d.ts +2267 -0
- package/dist/types/meeting.d.ts +621 -0
- package/dist/types/participant.d.ts +237 -0
- package/dist/types/permission.d.ts +5 -0
- package/dist/types/stream.d.ts +27 -0
- package/package.json +1 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export class AgentParticipant {
|
|
2
|
+
/**
|
|
3
|
+
* @description This represents the participant's ID
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* @description This represents the participant's name
|
|
8
|
+
*/
|
|
9
|
+
displayName: string;
|
|
10
|
+
/**
|
|
11
|
+
* @description This represents the all the Streams that the participant is producing
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
streams: Map<string, Stream>;
|
|
15
|
+
/**
|
|
16
|
+
* @description This represents whether the participant is an agent.
|
|
17
|
+
*/
|
|
18
|
+
isAgent: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description This represents the agent ID of the agentParticipant.
|
|
21
|
+
*/
|
|
22
|
+
agentId: string;
|
|
23
|
+
/**
|
|
24
|
+
* @description This represents participant's current pin state
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
pinState: {
|
|
28
|
+
cam: boolean;
|
|
29
|
+
share: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @description This represents participant's current webcam status
|
|
33
|
+
*/
|
|
34
|
+
webcamOn: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @description This represents participant's current mic status
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
micOn: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @description This represents participant's current mode
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
mode: 'SEND_AND_RECV' | 'SIGNALLING_ONLY' | 'RECV_ONLY'
|
|
45
|
+
/**
|
|
46
|
+
* @description This represents metaData which is passed in MeetingProvider
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
metaData: object;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @description This method can be used to kickout a participant from the meeting
|
|
53
|
+
*/
|
|
54
|
+
remove(): void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param type If `SHARE_AND_CAM` is provided, it will pin screenshare and camera of the participant.
|
|
58
|
+
* If `CAM` is provided, it will only pin the participant's camera, If `SHARE` is provided, it will only pin the participant's screen share
|
|
59
|
+
*/
|
|
60
|
+
pin(type: 'SHARE_AND_CAM' | 'CAM' | 'SHARE'): void;
|
|
61
|
+
/**
|
|
62
|
+
* @param type If `SHARE_AND_CAM` is provided, it will unpin screenshare and camera of the participant.
|
|
63
|
+
* If `CAM` is provided, it will only unpin the participant's camera, If `SHARE` is provided, it will only unpin the participant's screen share
|
|
64
|
+
*/
|
|
65
|
+
unpin(type: 'SHARE_AND_CAM' | 'CAM' | 'SHARE'): void;
|
|
66
|
+
/**
|
|
67
|
+
* @description This method returns the Video Statistics of the participant.
|
|
68
|
+
* To learn more about the video statistics check these [reference](https://docs.videosdk.live/react/guide/video-and-audio-calling-api-sdk/render-media/understanding-call-quality)
|
|
69
|
+
*/
|
|
70
|
+
getVideoStats(): Promise<
|
|
71
|
+
Array<{
|
|
72
|
+
bitrate: number;
|
|
73
|
+
rtt: number;
|
|
74
|
+
network: string;
|
|
75
|
+
codec: string;
|
|
76
|
+
jitter: number;
|
|
77
|
+
limitation: any;
|
|
78
|
+
totalPackets: number;
|
|
79
|
+
packetsLost: number;
|
|
80
|
+
concealmentEvents: number;
|
|
81
|
+
insertedSamplesForDecelaration: number;
|
|
82
|
+
removedSamplesForAccelaration: number;
|
|
83
|
+
size: any;
|
|
84
|
+
currentSpatialLayer: number;
|
|
85
|
+
currentTemporalLayer: number;
|
|
86
|
+
preferredSpatialLayer: number;
|
|
87
|
+
preferredTemporalLayer: number;
|
|
88
|
+
}>
|
|
89
|
+
>;
|
|
90
|
+
/**
|
|
91
|
+
* @description This method returns the Audio Statistics of the participant.
|
|
92
|
+
* To learn more about the video statistics check these [reference](https://docs.videosdk.live/react/guide/video-and-audio-calling-api-sdk/render-media/understanding-call-quality)
|
|
93
|
+
*/
|
|
94
|
+
getAudioStats(): Promise<
|
|
95
|
+
Array<{
|
|
96
|
+
bitrate: number;
|
|
97
|
+
rtt: number;
|
|
98
|
+
network: string;
|
|
99
|
+
codec: string;
|
|
100
|
+
jitter: number;
|
|
101
|
+
totalPackets: number;
|
|
102
|
+
packetsLost: number;
|
|
103
|
+
concealmentEvents: number;
|
|
104
|
+
insertedSamplesForDecelaration: number;
|
|
105
|
+
removedSamplesForAccelaration: number;
|
|
106
|
+
size: any;
|
|
107
|
+
}>
|
|
108
|
+
>;
|
|
109
|
+
/**
|
|
110
|
+
* Add event listener
|
|
111
|
+
* @param eventType Event name to which you want to subscribe.
|
|
112
|
+
* @param listener Callback function which will be triggered when the event happens
|
|
113
|
+
*/
|
|
114
|
+
on(
|
|
115
|
+
eventType:
|
|
116
|
+
| "stream-enabled"
|
|
117
|
+
| "stream-disabled"
|
|
118
|
+
| "media-status-changed"
|
|
119
|
+
| "agent-state-changed"
|
|
120
|
+
| "transcription-received"
|
|
121
|
+
| 'agent-metrics',
|
|
122
|
+
listener: (data: any) => void
|
|
123
|
+
): void;
|
|
124
|
+
/**
|
|
125
|
+
* Remove event
|
|
126
|
+
* @param eventType Event name to which you want to unsubscribe.
|
|
127
|
+
* @param listener Callback function which was passed while subscribing to the event
|
|
128
|
+
*/
|
|
129
|
+
off(
|
|
130
|
+
eventType:
|
|
131
|
+
| "stream-enabled"
|
|
132
|
+
| "stream-disabled"
|
|
133
|
+
| "media-status-changed"
|
|
134
|
+
| "agent-state-changed"
|
|
135
|
+
| "transcription-received"
|
|
136
|
+
| 'agent-metrics',
|
|
137
|
+
listener: (data: any) => void
|
|
138
|
+
): void;
|
|
139
|
+
}
|
|
140
|
+
import { Stream } from './stream';
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Participant } from './participant';
|
|
2
|
+
import { Stream } from './stream';
|
|
3
|
+
|
|
4
|
+
export enum CharacterMode {
|
|
5
|
+
TEXT = 'text',
|
|
6
|
+
CO_PILOT = 'co_pilot',
|
|
7
|
+
AUTO_PILOT = 'auto_pilot',
|
|
8
|
+
VISION_PILOT = 'vision_pilot'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum CharacterState {
|
|
12
|
+
CHARACTER_SPEAKING = 'CHARACTER_SPEAKING',
|
|
13
|
+
CHARACTER_THINKING = 'CHARACTER_THINKING',
|
|
14
|
+
CHARACTER_LISTENING = 'CHARACTER_LISTENING'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class Character extends Participant {
|
|
18
|
+
/**
|
|
19
|
+
* @description This represents interactionId of interaction
|
|
20
|
+
*/
|
|
21
|
+
interactionId: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @description This represents the id character participant
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description This represents state of character participant
|
|
30
|
+
*/
|
|
31
|
+
state: CharacterState;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @description This represents attached knowledge to character participant
|
|
35
|
+
*/
|
|
36
|
+
knowledgeBases: string[];
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @description This represents language of interaction
|
|
40
|
+
*/
|
|
41
|
+
language: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @description This represents communication mode of character participant
|
|
45
|
+
*/
|
|
46
|
+
characterMode: CharacterMode;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @description This represents role of character participant
|
|
50
|
+
*/
|
|
51
|
+
characterRole: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @description This method can be used to join a character participant in the meeting
|
|
55
|
+
*/
|
|
56
|
+
join(): Promise<void>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @description This method can be used to leave a character participant from the meeting
|
|
60
|
+
*/
|
|
61
|
+
leave(): Promise<void>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @description This method can be used to send message to a character participant
|
|
65
|
+
*/
|
|
66
|
+
sendMessage(text: string): Promise<void>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @description This method can be used to interrupt a character participant
|
|
70
|
+
*/
|
|
71
|
+
interrupt(): Promise<void>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Add event listener
|
|
75
|
+
* @param eventType Event name to which you want to subscribe.
|
|
76
|
+
* @param listener Callback function which will be triggered when the event happens
|
|
77
|
+
*/
|
|
78
|
+
on(
|
|
79
|
+
eventType:
|
|
80
|
+
| 'stream-enabled'
|
|
81
|
+
| 'stream-disabled'
|
|
82
|
+
| 'media-status-changed'
|
|
83
|
+
| 'video-quality-changed'
|
|
84
|
+
| 'character-state-changed'
|
|
85
|
+
| 'character-message'
|
|
86
|
+
| 'character-joined'
|
|
87
|
+
| 'character-left'
|
|
88
|
+
| 'user-message'
|
|
89
|
+
| 'data'
|
|
90
|
+
| 'error',
|
|
91
|
+
listener: (data: any) => void
|
|
92
|
+
): void;
|
|
93
|
+
/**
|
|
94
|
+
* Remove event
|
|
95
|
+
* @param eventType Event name to which you want to unsubscribe.
|
|
96
|
+
* @param listener Callback function which was passed while subscribing to the event
|
|
97
|
+
*/
|
|
98
|
+
off(
|
|
99
|
+
eventType:
|
|
100
|
+
| 'stream-enabled'
|
|
101
|
+
| 'stream-disabled'
|
|
102
|
+
| 'media-status-changed'
|
|
103
|
+
| 'video-quality-changed'
|
|
104
|
+
| 'character-state-changed'
|
|
105
|
+
| 'character-message'
|
|
106
|
+
| 'character-joined'
|
|
107
|
+
| 'character-left'
|
|
108
|
+
| 'user-message'
|
|
109
|
+
| 'data'
|
|
110
|
+
| 'error',
|
|
111
|
+
listener: (data: any) => void
|
|
112
|
+
): void;
|
|
113
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class Connection {
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
9
|
+
payload: string;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
meeting: ConnectionMeeting;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
*/
|
|
17
|
+
close(): void;
|
|
18
|
+
}
|
|
19
|
+
import { ConnectionMeeting } from './connectionMeeting';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export class ConnectionMeeting {
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
9
|
+
participants: Map<string, ConnectionParticipant>;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* @param peer
|
|
13
|
+
*/
|
|
14
|
+
participantJoin(peer: any): void;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated
|
|
17
|
+
* @param peer
|
|
18
|
+
*/
|
|
19
|
+
participantLeft(peerId: any): void;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated
|
|
22
|
+
*/
|
|
23
|
+
sendChatMessage(message: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
* @param peer
|
|
27
|
+
*/
|
|
28
|
+
sendChatMessageEvent({ participantId, message }: { participantId: any; message: any }): void;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
* @param peer
|
|
32
|
+
*/
|
|
33
|
+
end(): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
* Add event listener
|
|
37
|
+
* @param eventType
|
|
38
|
+
* @param listener Callback function
|
|
39
|
+
*/
|
|
40
|
+
on(eventType: 'participant-joined' | 'participant-left' | 'data', listener: (data: any) => void): void;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
* Remove event listener
|
|
44
|
+
* @param eventType
|
|
45
|
+
* @param listener Callback function
|
|
46
|
+
*/
|
|
47
|
+
off(eventType: 'participant-joined' | 'participant-left' | 'data', listener: (data: any) => void): void;
|
|
48
|
+
}
|
|
49
|
+
import { ConnectionParticipant } from './connectionParticipant';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class ConnectionParticipant {
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
*/
|
|
9
|
+
displayName: string;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* @param options
|
|
13
|
+
*/
|
|
14
|
+
switchTo({ meetingId, payload, token }: { meetingId: string; payload: string; token: string }): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export class DeviceInfo extends MediaDeviceInfo {
|
|
2
|
+
}
|
|
3
|
+
export class CameraDeviceInfo extends DeviceInfo {
|
|
4
|
+
}
|
|
5
|
+
export class MicrophoneDeviceInfo extends DeviceInfo {
|
|
6
|
+
}
|
|
7
|
+
export class PlaybackDeviceInfo extends DeviceInfo {
|
|
8
|
+
}
|
|
9
|
+
declare class MediaDeviceInfo {
|
|
10
|
+
constructor(deviceId: any, groupId: any, kind: any, label: any);
|
|
11
|
+
/**
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
deviceId: string;
|
|
15
|
+
/**
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
groupId: string;
|
|
19
|
+
/**
|
|
20
|
+
* @type {string}
|
|
21
|
+
*/
|
|
22
|
+
kind: string;
|
|
23
|
+
/**
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
label: string;
|
|
27
|
+
}
|
|
28
|
+
export {};
|