vg-x07df 0.1.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/.azure-pipelines/publish-public.yml +37 -0
- package/.azure-pipelines/publish.yml +39 -0
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/AUTO_JOIN_GUIDE.md +411 -0
- package/README.md +215 -0
- package/Screenshot 2025-09-24 at 14.34.48.png +0 -0
- package/Screenshot 2025-10-04 at 12.58.54.png +0 -0
- package/biome.json +48 -0
- package/examples/demo/.env.example +19 -0
- package/examples/demo/CHANGELOG.md +22 -0
- package/examples/demo/README.md +72 -0
- package/examples/demo/eslint.config.js +23 -0
- package/examples/demo/index.html +13 -0
- package/examples/demo/package.json +34 -0
- package/examples/demo/pnpm-lock.yaml +2098 -0
- package/examples/demo/pnpm-workspace.yaml +1 -0
- package/examples/demo/public/vite.svg +1 -0
- package/examples/demo/src/App.css +52 -0
- package/examples/demo/src/App.tsx +176 -0
- package/examples/demo/src/assets/react.svg +1 -0
- package/examples/demo/src/components/auth/LoginForm.css +144 -0
- package/examples/demo/src/components/auth/LoginForm.tsx +80 -0
- package/examples/demo/src/components/calling/AutoJoinSettings.tsx +213 -0
- package/examples/demo/src/components/calling/AutoJoinStatus.tsx +72 -0
- package/examples/demo/src/components/calling/CallInitiator.css +258 -0
- package/examples/demo/src/components/calling/CallInitiator.tsx +142 -0
- package/examples/demo/src/components/calling/CallNotifications.css +119 -0
- package/examples/demo/src/components/calling/CallNotifications.tsx +108 -0
- package/examples/demo/src/components/calling/IncomingCallModal.css +192 -0
- package/examples/demo/src/components/calling/IncomingCallModal.tsx +78 -0
- package/examples/demo/src/components/calling/MinimizedCall.css +156 -0
- package/examples/demo/src/components/calling/MinimizedCall.tsx +78 -0
- package/examples/demo/src/components/conference/ConferenceHeader.css +265 -0
- package/examples/demo/src/components/conference/ConferenceHeader.tsx +78 -0
- package/examples/demo/src/components/conference/EnhancedControlBar.css +356 -0
- package/examples/demo/src/components/conference/EnhancedControlBar.tsx +262 -0
- package/examples/demo/src/components/conference/PaginationControls.css +67 -0
- package/examples/demo/src/components/conference/PaginationControls.tsx +64 -0
- package/examples/demo/src/components/conference/ParticipantGrid.css +153 -0
- package/examples/demo/src/components/conference/ParticipantGrid.tsx +87 -0
- package/examples/demo/src/components/conference/ParticipantTile.css +210 -0
- package/examples/demo/src/components/conference/ParticipantTile.tsx +114 -0
- package/examples/demo/src/components/conference/VideoConference.css +214 -0
- package/examples/demo/src/components/conference/VideoConference.tsx +93 -0
- package/examples/demo/src/contexts/AuthContext.tsx +105 -0
- package/examples/demo/src/hooks/useAuth.ts +5 -0
- package/examples/demo/src/hooks/useCallTimer.ts +42 -0
- package/examples/demo/src/index.css +68 -0
- package/examples/demo/src/main.tsx +10 -0
- package/examples/demo/src/services/auth.service.ts +153 -0
- package/examples/demo/src/types/auth.types.ts +31 -0
- package/examples/demo/tsconfig.app.json +28 -0
- package/examples/demo/tsconfig.json +7 -0
- package/examples/demo/tsconfig.node.json +26 -0
- package/examples/demo/vite.config.ts +15 -0
- package/images/callpad-without-ai.png +0 -0
- package/package.json +28 -0
- package/packages/sdk/CHANGELOG.md +33 -0
- package/packages/sdk/LICENSE +21 -0
- package/packages/sdk/README.md +97 -0
- package/packages/sdk/documentation.md +1132 -0
- package/packages/sdk/openapi-ts.config.ts +7 -0
- package/packages/sdk/package.json +88 -0
- package/packages/sdk/src/core/auth.manager.ts +52 -0
- package/packages/sdk/src/core/events/event-bus.ts +301 -0
- package/packages/sdk/src/core/events/index.ts +8 -0
- package/packages/sdk/src/core/events/types.ts +165 -0
- package/packages/sdk/src/core/index.ts +3 -0
- package/packages/sdk/src/core/signal/api.config.ts +49 -0
- package/packages/sdk/src/core/signal/index.ts +16 -0
- package/packages/sdk/src/core/signal/signal.client.ts +101 -0
- package/packages/sdk/src/core/signal/types.ts +110 -0
- package/packages/sdk/src/core/socketio/handlers/base.handler.ts +212 -0
- package/packages/sdk/src/core/socketio/handlers/call-accepted.handler.ts +34 -0
- package/packages/sdk/src/core/socketio/handlers/call-canceled.handler.ts +34 -0
- package/packages/sdk/src/core/socketio/handlers/call-declined.handler.ts +29 -0
- package/packages/sdk/src/core/socketio/handlers/call-ended.handler.ts +40 -0
- package/packages/sdk/src/core/socketio/handlers/call-incoming.handler.ts +72 -0
- package/packages/sdk/src/core/socketio/handlers/call-join-info.handler.ts +181 -0
- package/packages/sdk/src/core/socketio/handlers/call-participant-joined.handler.ts +42 -0
- package/packages/sdk/src/core/socketio/handlers/call-participant-joining.handler.ts +42 -0
- package/packages/sdk/src/core/socketio/handlers/call-timeout.handler.ts +31 -0
- package/packages/sdk/src/core/socketio/handlers/handler.registry.ts +62 -0
- package/packages/sdk/src/core/socketio/handlers/index.ts +21 -0
- package/packages/sdk/src/core/socketio/handlers/participant-left.handler.ts +37 -0
- package/packages/sdk/src/core/socketio/handlers/schema.ts +130 -0
- package/packages/sdk/src/core/socketio/index.ts +5 -0
- package/packages/sdk/src/core/socketio/socket.manager.ts +187 -0
- package/packages/sdk/src/core/socketio/types.ts +14 -0
- package/packages/sdk/src/core/types.ts +23 -0
- package/packages/sdk/src/generated/api/core/ApiError.ts +21 -0
- package/packages/sdk/src/generated/api/core/ApiRequestOptions.ts +13 -0
- package/packages/sdk/src/generated/api/core/ApiResult.ts +7 -0
- package/packages/sdk/src/generated/api/core/CancelablePromise.ts +126 -0
- package/packages/sdk/src/generated/api/core/OpenAPI.ts +55 -0
- package/packages/sdk/src/generated/api/core/request.ts +339 -0
- package/packages/sdk/src/generated/api/index.ts +5 -0
- package/packages/sdk/src/generated/api/models.ts +219 -0
- package/packages/sdk/src/generated/api/services.ts +225 -0
- package/packages/sdk/src/hooks/index.ts +21 -0
- package/packages/sdk/src/hooks/useAutoJoin.ts +66 -0
- package/packages/sdk/src/hooks/useCallActions.ts +28 -0
- package/packages/sdk/src/hooks/useCallQuality.ts +416 -0
- package/packages/sdk/src/hooks/useCallState.ts +23 -0
- package/packages/sdk/src/hooks/useConnection.ts +15 -0
- package/packages/sdk/src/hooks/useDevices.ts +296 -0
- package/packages/sdk/src/hooks/useErrorRecovery.ts +299 -0
- package/packages/sdk/src/hooks/useErrors.ts +84 -0
- package/packages/sdk/src/hooks/useEvent.ts +188 -0
- package/packages/sdk/src/hooks/useMediaControls.ts +215 -0
- package/packages/sdk/src/hooks/useParticipantStatus.ts +318 -0
- package/packages/sdk/src/hooks/useParticipants.ts +111 -0
- package/packages/sdk/src/index.ts +66 -0
- package/packages/sdk/src/livekit/constants.ts +76 -0
- package/packages/sdk/src/livekit/device.manager.ts +172 -0
- package/packages/sdk/src/livekit/error-classifier.ts +155 -0
- package/packages/sdk/src/livekit/events/eventBridge.ts +371 -0
- package/packages/sdk/src/livekit/events/trackRegistry.ts +114 -0
- package/packages/sdk/src/livekit/index.ts +49 -0
- package/packages/sdk/src/livekit/livekit.service.ts +110 -0
- package/packages/sdk/src/livekit/media.controls.ts +315 -0
- package/packages/sdk/src/livekit/room.manager.ts +79 -0
- package/packages/sdk/src/livekit/track.utils.ts +230 -0
- package/packages/sdk/src/livekit/types.ts +135 -0
- package/packages/sdk/src/provider/RtcProvider.tsx +78 -0
- package/packages/sdk/src/services/call-actions.ts +260 -0
- package/packages/sdk/src/services/error-recovery.ts +461 -0
- package/packages/sdk/src/services/index.ts +2 -0
- package/packages/sdk/src/services/sdk-builder.ts +104 -0
- package/packages/sdk/src/state/errors.ts +163 -0
- package/packages/sdk/src/state/selectors.ts +28 -0
- package/packages/sdk/src/state/store.ts +36 -0
- package/packages/sdk/src/state/types.ts +151 -0
- package/packages/sdk/src/utils/logger.ts +183 -0
- package/packages/sdk/tsconfig.json +49 -0
- package/packages/sdk/tsup.config.ts +51 -0
- package/pnpm-workspace.yaml +4 -0
- package/tsconfig.base.json +19 -0
- package/turbo.json +34 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import type { CancelablePromise } from './core/CancelablePromise';
|
|
2
|
+
import { OpenAPI } from './core/OpenAPI';
|
|
3
|
+
import { request as __request } from './core/request';
|
|
4
|
+
import type { HealthData, UserPresenceData, CallsData } from './models';
|
|
5
|
+
|
|
6
|
+
export class HealthService {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @returns any Service is healthy
|
|
10
|
+
* @throws ApiError
|
|
11
|
+
*/
|
|
12
|
+
public static getHealth(): CancelablePromise<HealthData['responses']['GetHealth']> {
|
|
13
|
+
|
|
14
|
+
return __request(OpenAPI, {
|
|
15
|
+
method: 'GET',
|
|
16
|
+
url: '/health',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @returns any Service is healthy
|
|
22
|
+
* @throws ApiError
|
|
23
|
+
*/
|
|
24
|
+
public static getSignalHealth(): CancelablePromise<HealthData['responses']['GetSignalHealth']> {
|
|
25
|
+
|
|
26
|
+
return __request(OpenAPI, {
|
|
27
|
+
method: 'GET',
|
|
28
|
+
url: '/signal/health',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class UserPresenceService {
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @returns any User presence retrieved successfully
|
|
38
|
+
* @throws ApiError
|
|
39
|
+
*/
|
|
40
|
+
public static getSignalPresenceByUserId(data: UserPresenceData['payloads']['GetSignalPresenceByUserId']): CancelablePromise<UserPresenceData['responses']['GetSignalPresenceByUserId']> {
|
|
41
|
+
const {
|
|
42
|
+
|
|
43
|
+
userId
|
|
44
|
+
} = data;
|
|
45
|
+
return __request(OpenAPI, {
|
|
46
|
+
method: 'GET',
|
|
47
|
+
url: '/signal/presence/{userId}',
|
|
48
|
+
path: {
|
|
49
|
+
userId
|
|
50
|
+
},
|
|
51
|
+
errors: {
|
|
52
|
+
400: `Invalid request`,
|
|
53
|
+
401: `Authentication required`,
|
|
54
|
+
404: `User not found or presence unavailable`,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @returns any Bulk presence retrieved successfully
|
|
61
|
+
* @throws ApiError
|
|
62
|
+
*/
|
|
63
|
+
public static getSignalPresenceBulk(data: UserPresenceData['payloads']['GetSignalPresenceBulk']): CancelablePromise<UserPresenceData['responses']['GetSignalPresenceBulk']> {
|
|
64
|
+
const {
|
|
65
|
+
|
|
66
|
+
userIds
|
|
67
|
+
} = data;
|
|
68
|
+
return __request(OpenAPI, {
|
|
69
|
+
method: 'GET',
|
|
70
|
+
url: '/signal/presence/bulk',
|
|
71
|
+
query: {
|
|
72
|
+
userIds
|
|
73
|
+
},
|
|
74
|
+
errors: {
|
|
75
|
+
400: `Invalid request`,
|
|
76
|
+
401: `Authentication required`,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export class CallsService {
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @returns any Call started successfully
|
|
87
|
+
* @throws ApiError
|
|
88
|
+
*/
|
|
89
|
+
public static postSignalCalls(data: CallsData['payloads']['PostSignalCalls']): CancelablePromise<CallsData['responses']['PostSignalCalls']> {
|
|
90
|
+
const {
|
|
91
|
+
|
|
92
|
+
appId,
|
|
93
|
+
requestBody
|
|
94
|
+
} = data;
|
|
95
|
+
return __request(OpenAPI, {
|
|
96
|
+
method: 'POST',
|
|
97
|
+
url: '/signal/calls',
|
|
98
|
+
query: {
|
|
99
|
+
appId
|
|
100
|
+
},
|
|
101
|
+
body: requestBody,
|
|
102
|
+
mediaType: 'application/json',
|
|
103
|
+
errors: {
|
|
104
|
+
400: `Invalid request`,
|
|
105
|
+
401: `Authentication required`,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @returns any Call accepted successfully
|
|
112
|
+
* @throws ApiError
|
|
113
|
+
*/
|
|
114
|
+
public static postSignalCallsByCallIdAccept(data: CallsData['payloads']['PostSignalCallsByCallIdAccept']): CancelablePromise<CallsData['responses']['PostSignalCallsByCallIdAccept']> {
|
|
115
|
+
const {
|
|
116
|
+
|
|
117
|
+
callId,
|
|
118
|
+
appId
|
|
119
|
+
} = data;
|
|
120
|
+
return __request(OpenAPI, {
|
|
121
|
+
method: 'POST',
|
|
122
|
+
url: '/signal/calls/{callId}/accept',
|
|
123
|
+
path: {
|
|
124
|
+
callId
|
|
125
|
+
},
|
|
126
|
+
query: {
|
|
127
|
+
appId
|
|
128
|
+
},
|
|
129
|
+
errors: {
|
|
130
|
+
400: `Invalid request`,
|
|
131
|
+
401: `Authentication required`,
|
|
132
|
+
403: `User is not a participant`,
|
|
133
|
+
404: `Call not found`,
|
|
134
|
+
409: `Call cannot be accepted in current state`,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @returns any Call declined successfully
|
|
141
|
+
* @throws ApiError
|
|
142
|
+
*/
|
|
143
|
+
public static postSignalCallsByCallIdDecline(data: CallsData['payloads']['PostSignalCallsByCallIdDecline']): CancelablePromise<CallsData['responses']['PostSignalCallsByCallIdDecline']> {
|
|
144
|
+
const {
|
|
145
|
+
|
|
146
|
+
callId,
|
|
147
|
+
appId
|
|
148
|
+
} = data;
|
|
149
|
+
return __request(OpenAPI, {
|
|
150
|
+
method: 'POST',
|
|
151
|
+
url: '/signal/calls/{callId}/decline',
|
|
152
|
+
path: {
|
|
153
|
+
callId
|
|
154
|
+
},
|
|
155
|
+
query: {
|
|
156
|
+
appId
|
|
157
|
+
},
|
|
158
|
+
errors: {
|
|
159
|
+
400: `Invalid request`,
|
|
160
|
+
401: `Authentication required`,
|
|
161
|
+
403: `User is not a participant`,
|
|
162
|
+
404: `Call not found`,
|
|
163
|
+
409: `Call cannot be declined in current state`,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* @returns any Left call successfully
|
|
170
|
+
* @throws ApiError
|
|
171
|
+
*/
|
|
172
|
+
public static postSignalCallsByCallIdLeave(data: CallsData['payloads']['PostSignalCallsByCallIdLeave']): CancelablePromise<CallsData['responses']['PostSignalCallsByCallIdLeave']> {
|
|
173
|
+
const {
|
|
174
|
+
|
|
175
|
+
callId,
|
|
176
|
+
appId
|
|
177
|
+
} = data;
|
|
178
|
+
return __request(OpenAPI, {
|
|
179
|
+
method: 'POST',
|
|
180
|
+
url: '/signal/calls/{callId}/leave',
|
|
181
|
+
path: {
|
|
182
|
+
callId
|
|
183
|
+
},
|
|
184
|
+
query: {
|
|
185
|
+
appId
|
|
186
|
+
},
|
|
187
|
+
errors: {
|
|
188
|
+
400: `Invalid request`,
|
|
189
|
+
401: `Authentication required`,
|
|
190
|
+
403: `User is not a participant`,
|
|
191
|
+
404: `Call not found`,
|
|
192
|
+
409: `Call cannot be left in current state`,
|
|
193
|
+
},
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @returns any Call retrieved successfully
|
|
199
|
+
* @throws ApiError
|
|
200
|
+
*/
|
|
201
|
+
public static getSignalCallsByCallId(data: CallsData['payloads']['GetSignalCallsByCallId']): CancelablePromise<CallsData['responses']['GetSignalCallsByCallId']> {
|
|
202
|
+
const {
|
|
203
|
+
|
|
204
|
+
callId,
|
|
205
|
+
appId
|
|
206
|
+
} = data;
|
|
207
|
+
return __request(OpenAPI, {
|
|
208
|
+
method: 'GET',
|
|
209
|
+
url: '/signal/calls/{callId}',
|
|
210
|
+
path: {
|
|
211
|
+
callId
|
|
212
|
+
},
|
|
213
|
+
query: {
|
|
214
|
+
appId
|
|
215
|
+
},
|
|
216
|
+
errors: {
|
|
217
|
+
400: `Invalid request`,
|
|
218
|
+
401: `Authentication required`,
|
|
219
|
+
403: `User does not have access to this call`,
|
|
220
|
+
404: `Call not found`,
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Core call management hooks
|
|
2
|
+
export * from "./useCallState";
|
|
3
|
+
export * from "./useCallActions";
|
|
4
|
+
export * from "./useCallQuality";
|
|
5
|
+
export * from "./useConnection";
|
|
6
|
+
export * from "./useAutoJoin";
|
|
7
|
+
|
|
8
|
+
// Participant management hooks
|
|
9
|
+
export * from "./useParticipants";
|
|
10
|
+
export * from "./useParticipantStatus";
|
|
11
|
+
|
|
12
|
+
// Media control hooks
|
|
13
|
+
export * from "./useMediaControls";
|
|
14
|
+
export * from "./useDevices";
|
|
15
|
+
|
|
16
|
+
// Event system hooks
|
|
17
|
+
export * from "./useEvent";
|
|
18
|
+
|
|
19
|
+
// Error handling and recovery hooks
|
|
20
|
+
export * from "./useErrorRecovery";
|
|
21
|
+
export { useErrors, useErrorsByCode, useErrorCount } from "./useErrors";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useSdk } from "../provider/RtcProvider";
|
|
2
|
+
import type { AutoJoinConfig } from "../core/types";
|
|
3
|
+
|
|
4
|
+
export interface UseAutoJoinReturn {
|
|
5
|
+
/**
|
|
6
|
+
* Current auto-join configuration
|
|
7
|
+
*/
|
|
8
|
+
config: AutoJoinConfig;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Whether auto-join is enabled
|
|
12
|
+
*/
|
|
13
|
+
isEnabled: boolean;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Whether retry on failure is enabled
|
|
17
|
+
*/
|
|
18
|
+
retryOnFailure: boolean;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get maximum retry attempts
|
|
22
|
+
*/
|
|
23
|
+
maxRetries: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Hook to access auto-join configuration and utilities
|
|
28
|
+
*/
|
|
29
|
+
export function useAutoJoin(): UseAutoJoinReturn {
|
|
30
|
+
const sdk = useSdk();
|
|
31
|
+
const config = sdk.autoJoinConfig;
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
config,
|
|
35
|
+
isEnabled: config.enabled,
|
|
36
|
+
retryOnFailure: config.retryOnFailure,
|
|
37
|
+
maxRetries: config.maxRetries,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Hook to determine if the current user should auto-join based on their role
|
|
43
|
+
*/
|
|
44
|
+
export function useAutoJoinForCurrentUser() {
|
|
45
|
+
const sdk = useSdk();
|
|
46
|
+
const autoJoin = useAutoJoin();
|
|
47
|
+
|
|
48
|
+
// Get current user info from auth
|
|
49
|
+
const currentUserId = sdk.auth.getCurrentUserId();
|
|
50
|
+
|
|
51
|
+
if (!currentUserId) {
|
|
52
|
+
return {
|
|
53
|
+
shouldAutoJoin: false,
|
|
54
|
+
reason: "No current user",
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
shouldAutoJoin: autoJoin.isEnabled,
|
|
60
|
+
reason: autoJoin.isEnabled
|
|
61
|
+
? "Auto-join enabled"
|
|
62
|
+
: "Auto-join disabled",
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type UseAutoJoinForCurrentUserReturn = ReturnType<typeof useAutoJoinForCurrentUser>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useSdk } from "../provider/RtcProvider";
|
|
2
|
+
|
|
3
|
+
export function useCallActions() {
|
|
4
|
+
const sdk = useSdk();
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
initiate: (participants: string[], type: "AUDIO" | "VIDEO") => {
|
|
8
|
+
return sdk.initiate({ invitees: participants, mode: type });
|
|
9
|
+
},
|
|
10
|
+
accept: (callId: string) => {
|
|
11
|
+
return sdk.accept(callId);
|
|
12
|
+
},
|
|
13
|
+
decline: (callId: string) => {
|
|
14
|
+
return sdk.decline(callId);
|
|
15
|
+
},
|
|
16
|
+
end: (callId: string) => {
|
|
17
|
+
return sdk.leave(callId);
|
|
18
|
+
},
|
|
19
|
+
cancel: (callId: string) => {
|
|
20
|
+
return sdk.leave(callId);
|
|
21
|
+
},
|
|
22
|
+
join: () => {
|
|
23
|
+
return sdk.join();
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type CallActionsHook = ReturnType<typeof useCallActions>;
|