@capgo/capacitor-stream-call 0.0.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/Package.swift +31 -0
- package/README.md +340 -0
- package/StreamCall.podspec +19 -0
- package/android/build.gradle +74 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/CallOverlayView.kt +281 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/CustomNotificationHandler.kt +142 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/IncomingCallView.kt +147 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/RingtonePlayer.kt +164 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/StreamCallPlugin.kt +1014 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/TouchInterceptWrapper.kt +31 -0
- package/android/src/main/java/ee/forgr/capacitor/streamcall/UserRepository.kt +111 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/android/src/main/res/values/strings.xml +7 -0
- package/dist/docs.json +533 -0
- package/dist/esm/definitions.d.ts +169 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +32 -0
- package/dist/esm/web.js +323 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +337 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +339 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/StreamCallPlugin/CallOverlayView.swift +147 -0
- package/ios/Sources/StreamCallPlugin/CustomCallParticipantImageView.swift +60 -0
- package/ios/Sources/StreamCallPlugin/CustomCallView.swift +257 -0
- package/ios/Sources/StreamCallPlugin/CustomVideoParticipantsView.swift +107 -0
- package/ios/Sources/StreamCallPlugin/ParticipantsView.swift +206 -0
- package/ios/Sources/StreamCallPlugin/StreamCallPlugin.swift +722 -0
- package/ios/Sources/StreamCallPlugin/TouchInterceptView.swift +177 -0
- package/ios/Sources/StreamCallPlugin/UserRepository.swift +96 -0
- package/ios/Sources/StreamCallPlugin/WebviewNavigationDelegate.swift +68 -0
- package/ios/Tests/StreamCallPluginTests/StreamCallPluginTests.swift +15 -0
- package/package.json +96 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
var videoClient = require('@stream-io/video-client');
|
|
5
|
+
|
|
6
|
+
const StreamCall = core.registerPlugin('StreamCall', {
|
|
7
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.StreamCallWeb()),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
class StreamCallWeb extends core.WebPlugin {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.videoBindings = new Map();
|
|
14
|
+
this.audioBindings = new Map();
|
|
15
|
+
this.ringCallback = (event) => {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
console.log('Call ringing', event, this.currentCall);
|
|
18
|
+
this.incomingCall = event.call;
|
|
19
|
+
if (!this.currentCall) {
|
|
20
|
+
console.log('Creating new call', event.call.id);
|
|
21
|
+
this.currentCall = (_a = this.client) === null || _a === void 0 ? void 0 : _a.call(event.call.type, event.call.id);
|
|
22
|
+
this.notifyListeners('callEvent', { callId: event.call.id, state: videoClient.CallingState.RINGING });
|
|
23
|
+
}
|
|
24
|
+
if (this.currentCall) {
|
|
25
|
+
console.log('Call found', this.currentCall.id);
|
|
26
|
+
this.callStateSubscription = (_b = this.currentCall) === null || _b === void 0 ? void 0 : _b.state.callingState$.subscribe((s) => {
|
|
27
|
+
var _a;
|
|
28
|
+
console.log('Call state', s);
|
|
29
|
+
if (s === videoClient.CallingState.JOINED) {
|
|
30
|
+
this.setupParticipantListener();
|
|
31
|
+
}
|
|
32
|
+
else if (s === videoClient.CallingState.LEFT || s === videoClient.CallingState.RECONNECTING_FAILED) {
|
|
33
|
+
this.cleanupCall();
|
|
34
|
+
}
|
|
35
|
+
if (this.outgoingCall && s === videoClient.CallingState.RINGING) {
|
|
36
|
+
this.outgoingCall = undefined;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
this.notifyListeners('callEvent', { callId: (_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.id, state: s });
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
setupCallRingListener() {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
(_a = this.client) === null || _a === void 0 ? void 0 : _a.off('call.ring', this.ringCallback);
|
|
48
|
+
(_b = this.client) === null || _b === void 0 ? void 0 : _b.on('call.ring', this.ringCallback);
|
|
49
|
+
}
|
|
50
|
+
setupParticipantListener() {
|
|
51
|
+
// Subscribe to participant changes
|
|
52
|
+
this.incomingCall = undefined;
|
|
53
|
+
if (!this.currentCall)
|
|
54
|
+
return;
|
|
55
|
+
this.participantJoinedListener = (event) => {
|
|
56
|
+
if (this.magicDivId && event.participant) {
|
|
57
|
+
const magicDiv = document.getElementById(this.magicDivId);
|
|
58
|
+
if (magicDiv && this.currentCall) {
|
|
59
|
+
this.setupParticipantVideo(this.currentCall, event.participant, magicDiv);
|
|
60
|
+
this.setupParticipantAudio(this.currentCall, event.participant, magicDiv);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
this.participantLeftListener = (event) => {
|
|
65
|
+
if (this.magicDivId && event.participant) {
|
|
66
|
+
const videoId = `video-${event.participant.sessionId}`;
|
|
67
|
+
const audioId = `audio-${event.participant.sessionId}`;
|
|
68
|
+
// Remove video element
|
|
69
|
+
const videoEl = document.getElementById(videoId);
|
|
70
|
+
if (videoEl) {
|
|
71
|
+
const unbindVideo = this.videoBindings.get(videoId);
|
|
72
|
+
if (unbindVideo) {
|
|
73
|
+
unbindVideo();
|
|
74
|
+
this.videoBindings.delete(videoId);
|
|
75
|
+
}
|
|
76
|
+
const tracks = videoEl.srcObject;
|
|
77
|
+
if (tracks) {
|
|
78
|
+
tracks.getTracks().forEach((track) => {
|
|
79
|
+
track.stop();
|
|
80
|
+
track.enabled = false;
|
|
81
|
+
});
|
|
82
|
+
videoEl.srcObject = null;
|
|
83
|
+
}
|
|
84
|
+
videoEl.remove();
|
|
85
|
+
}
|
|
86
|
+
// Remove audio element
|
|
87
|
+
const audioEl = document.getElementById(audioId);
|
|
88
|
+
if (audioEl) {
|
|
89
|
+
const unbindAudio = this.audioBindings.get(audioId);
|
|
90
|
+
if (unbindAudio) {
|
|
91
|
+
unbindAudio();
|
|
92
|
+
this.audioBindings.delete(audioId);
|
|
93
|
+
}
|
|
94
|
+
const tracks = audioEl.srcObject;
|
|
95
|
+
if (tracks) {
|
|
96
|
+
tracks.getTracks().forEach((track) => {
|
|
97
|
+
track.stop();
|
|
98
|
+
track.enabled = false;
|
|
99
|
+
});
|
|
100
|
+
audioEl.srcObject = null;
|
|
101
|
+
}
|
|
102
|
+
audioEl.remove();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
this.currentCall.on('participantJoined', this.participantJoinedListener);
|
|
107
|
+
this.currentCall.on('participantLeft', this.participantLeftListener);
|
|
108
|
+
// Setup initial participants
|
|
109
|
+
const participants = this.currentCall.state.participants;
|
|
110
|
+
if (this.magicDivId) {
|
|
111
|
+
const magicDiv = document.getElementById(this.magicDivId);
|
|
112
|
+
if (magicDiv) {
|
|
113
|
+
participants.forEach((participant) => {
|
|
114
|
+
if (this.currentCall) {
|
|
115
|
+
this.setupParticipantVideo(this.currentCall, participant, magicDiv);
|
|
116
|
+
this.setupParticipantAudio(this.currentCall, participant, magicDiv);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
setupParticipantVideo(call, participant, container) {
|
|
123
|
+
const id = `video-${participant.sessionId}`;
|
|
124
|
+
if (!document.getElementById(id)) {
|
|
125
|
+
const videoEl = document.createElement('video');
|
|
126
|
+
videoEl.id = id;
|
|
127
|
+
videoEl.style.width = '100%';
|
|
128
|
+
videoEl.style.maxWidth = '300px';
|
|
129
|
+
videoEl.style.aspectRatio = '16/9';
|
|
130
|
+
container.appendChild(videoEl);
|
|
131
|
+
const unbind = call.bindVideoElement(videoEl, participant.sessionId, 'videoTrack');
|
|
132
|
+
if (unbind)
|
|
133
|
+
this.videoBindings.set(id, unbind);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
setupParticipantAudio(call, participant, container) {
|
|
137
|
+
if (participant.isLocalParticipant)
|
|
138
|
+
return;
|
|
139
|
+
const id = `audio-${participant.sessionId}`;
|
|
140
|
+
if (!document.getElementById(id)) {
|
|
141
|
+
const audioEl = document.createElement('audio');
|
|
142
|
+
audioEl.id = id;
|
|
143
|
+
container.appendChild(audioEl);
|
|
144
|
+
const unbind = call.bindAudioElement(audioEl, participant.sessionId);
|
|
145
|
+
if (unbind)
|
|
146
|
+
this.audioBindings.set(id, unbind);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
cleanupCall() {
|
|
150
|
+
var _a;
|
|
151
|
+
// First cleanup the call listeners
|
|
152
|
+
if (this.currentCall) {
|
|
153
|
+
if (this.participantJoinedListener) {
|
|
154
|
+
this.currentCall.off('participantJoined', this.participantJoinedListener);
|
|
155
|
+
this.participantJoinedListener = undefined;
|
|
156
|
+
}
|
|
157
|
+
if (this.participantLeftListener) {
|
|
158
|
+
this.currentCall.off('participantLeft', this.participantLeftListener);
|
|
159
|
+
this.participantLeftListener = undefined;
|
|
160
|
+
}
|
|
161
|
+
(_a = this.callStateSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
162
|
+
}
|
|
163
|
+
if (this.magicDivId) {
|
|
164
|
+
const magicDiv = document.getElementById(this.magicDivId);
|
|
165
|
+
if (magicDiv) {
|
|
166
|
+
// Remove all video elements
|
|
167
|
+
const videoElements = magicDiv.querySelectorAll('video');
|
|
168
|
+
videoElements.forEach((video) => {
|
|
169
|
+
const id = video.id;
|
|
170
|
+
const unbind = this.videoBindings.get(id);
|
|
171
|
+
if (unbind) {
|
|
172
|
+
unbind();
|
|
173
|
+
this.videoBindings.delete(id);
|
|
174
|
+
}
|
|
175
|
+
// Stop all tracks
|
|
176
|
+
const tracks = video.srcObject;
|
|
177
|
+
if (tracks) {
|
|
178
|
+
tracks.getTracks().forEach((track) => {
|
|
179
|
+
track.stop();
|
|
180
|
+
track.enabled = false;
|
|
181
|
+
});
|
|
182
|
+
video.srcObject = null;
|
|
183
|
+
}
|
|
184
|
+
video.remove();
|
|
185
|
+
});
|
|
186
|
+
// Remove all audio elements
|
|
187
|
+
const audioElements = magicDiv.querySelectorAll('audio');
|
|
188
|
+
audioElements.forEach((audio) => {
|
|
189
|
+
const id = audio.id;
|
|
190
|
+
const unbind = this.audioBindings.get(id);
|
|
191
|
+
if (unbind) {
|
|
192
|
+
unbind();
|
|
193
|
+
this.audioBindings.delete(id);
|
|
194
|
+
}
|
|
195
|
+
// Stop all tracks
|
|
196
|
+
const tracks = audio.srcObject;
|
|
197
|
+
if (tracks) {
|
|
198
|
+
tracks.getTracks().forEach((track) => {
|
|
199
|
+
track.stop();
|
|
200
|
+
track.enabled = false;
|
|
201
|
+
});
|
|
202
|
+
audio.srcObject = null;
|
|
203
|
+
}
|
|
204
|
+
audio.remove();
|
|
205
|
+
});
|
|
206
|
+
// Clear the container
|
|
207
|
+
while (magicDiv.firstChild) {
|
|
208
|
+
magicDiv.removeChild(magicDiv.firstChild);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Clear all bindings
|
|
213
|
+
this.videoBindings.clear();
|
|
214
|
+
this.audioBindings.clear();
|
|
215
|
+
// Clear call references
|
|
216
|
+
this.currentCall = undefined;
|
|
217
|
+
this.incomingCall = undefined;
|
|
218
|
+
}
|
|
219
|
+
async login(options) {
|
|
220
|
+
this.client = videoClient.StreamVideoClient.getOrCreateInstance({
|
|
221
|
+
apiKey: options.apiKey,
|
|
222
|
+
user: { id: options.userId, name: options.name, image: options.imageURL },
|
|
223
|
+
token: options.token,
|
|
224
|
+
});
|
|
225
|
+
this.magicDivId = options.magicDivId;
|
|
226
|
+
this.setupCallRingListener();
|
|
227
|
+
return { success: true };
|
|
228
|
+
}
|
|
229
|
+
async logout() {
|
|
230
|
+
var _a;
|
|
231
|
+
if (!this.client) {
|
|
232
|
+
console.log('No client', this.client);
|
|
233
|
+
throw new Error('Client not initialized');
|
|
234
|
+
}
|
|
235
|
+
// Cleanup subscription
|
|
236
|
+
(_a = this.callStateSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
237
|
+
this.callStateSubscription = undefined;
|
|
238
|
+
await this.client.disconnectUser();
|
|
239
|
+
this.client = undefined;
|
|
240
|
+
this.currentCall = undefined;
|
|
241
|
+
return { success: true };
|
|
242
|
+
}
|
|
243
|
+
async call(options) {
|
|
244
|
+
if (!this.client) {
|
|
245
|
+
console.log('No client', this.client);
|
|
246
|
+
throw new Error('Client not initialized - Please login first');
|
|
247
|
+
}
|
|
248
|
+
const call = this.client.call(options.type || 'default', crypto.randomUUID());
|
|
249
|
+
const members = [{ user_id: options.userId }];
|
|
250
|
+
if (this.client.streamClient.userID && options.userId !== this.client.streamClient.userID) {
|
|
251
|
+
members.push({ user_id: this.client.streamClient.userID });
|
|
252
|
+
}
|
|
253
|
+
await call.getOrCreate({ data: { members } });
|
|
254
|
+
this.currentCall = call;
|
|
255
|
+
if (options.ring) {
|
|
256
|
+
this.outgoingCall = call.cid;
|
|
257
|
+
await call.ring();
|
|
258
|
+
}
|
|
259
|
+
await call.join();
|
|
260
|
+
return { success: true };
|
|
261
|
+
}
|
|
262
|
+
async endCall() {
|
|
263
|
+
if (!this.currentCall) {
|
|
264
|
+
console.log('No active call', this.currentCall);
|
|
265
|
+
throw new Error('No active call');
|
|
266
|
+
}
|
|
267
|
+
await this.currentCall.leave();
|
|
268
|
+
this.currentCall = undefined;
|
|
269
|
+
this.cleanupCall();
|
|
270
|
+
return { success: true };
|
|
271
|
+
}
|
|
272
|
+
async setMicrophoneEnabled(options) {
|
|
273
|
+
if (!this.currentCall) {
|
|
274
|
+
console.log('No active call', this.currentCall);
|
|
275
|
+
throw new Error('No active call');
|
|
276
|
+
}
|
|
277
|
+
if (options.enabled) {
|
|
278
|
+
await this.currentCall.microphone.enable();
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
await this.currentCall.microphone.disable();
|
|
282
|
+
}
|
|
283
|
+
return { success: true };
|
|
284
|
+
}
|
|
285
|
+
async setCameraEnabled(options) {
|
|
286
|
+
if (!this.currentCall) {
|
|
287
|
+
console.log('No active call', this.currentCall);
|
|
288
|
+
throw new Error('No active call');
|
|
289
|
+
}
|
|
290
|
+
if (options.enabled) {
|
|
291
|
+
await this.currentCall.camera.enable();
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
await this.currentCall.camera.disable();
|
|
295
|
+
}
|
|
296
|
+
return { success: true };
|
|
297
|
+
}
|
|
298
|
+
async acceptCall() {
|
|
299
|
+
if (!this.incomingCall || !this.client) {
|
|
300
|
+
console.log('No incoming call to accept', this.incomingCall, this.client);
|
|
301
|
+
throw new Error('No incoming call to accept');
|
|
302
|
+
}
|
|
303
|
+
console.log('Accepting call', this.incomingCall);
|
|
304
|
+
const call = this.client.call(this.incomingCall.type, this.incomingCall.id);
|
|
305
|
+
this.currentCall = call;
|
|
306
|
+
console.log('Joining call', call);
|
|
307
|
+
await call.accept();
|
|
308
|
+
await call.join();
|
|
309
|
+
console.log('Joined call', call);
|
|
310
|
+
this.notifyListeners('callEvent', { callId: call.id, state: videoClient.CallingState.JOINED });
|
|
311
|
+
this.setupParticipantListener();
|
|
312
|
+
return { success: true };
|
|
313
|
+
}
|
|
314
|
+
async rejectCall() {
|
|
315
|
+
if (!this.incomingCall || !this.client) {
|
|
316
|
+
console.log('No incoming call to reject', this.incomingCall, this.client);
|
|
317
|
+
throw new Error('No incoming call to reject');
|
|
318
|
+
}
|
|
319
|
+
console.log('Rejecting call', this.incomingCall);
|
|
320
|
+
const call = this.client.call(this.incomingCall.type, this.incomingCall.id);
|
|
321
|
+
console.log('Leaving call', call);
|
|
322
|
+
await call.leave();
|
|
323
|
+
this.incomingCall = undefined;
|
|
324
|
+
console.log('Rejected call', call);
|
|
325
|
+
this.notifyListeners('callEvent', { callId: call.id, state: videoClient.CallingState.LEFT });
|
|
326
|
+
this.cleanupCall();
|
|
327
|
+
return { success: true };
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
332
|
+
__proto__: null,
|
|
333
|
+
StreamCallWeb: StreamCallWeb
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
exports.StreamCall = StreamCall;
|
|
337
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst StreamCall = registerPlugin('StreamCall', {\n web: () => import('./web').then((m) => new m.StreamCallWeb()),\n});\nexport * from './definitions';\nexport { StreamCall };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { CallingState, StreamVideoClient } from '@stream-io/video-client';\nexport class StreamCallWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.videoBindings = new Map();\n this.audioBindings = new Map();\n this.ringCallback = (event) => {\n var _a, _b;\n console.log('Call ringing', event, this.currentCall);\n this.incomingCall = event.call;\n if (!this.currentCall) {\n console.log('Creating new call', event.call.id);\n this.currentCall = (_a = this.client) === null || _a === void 0 ? void 0 : _a.call(event.call.type, event.call.id);\n this.notifyListeners('callEvent', { callId: event.call.id, state: CallingState.RINGING });\n }\n if (this.currentCall) {\n console.log('Call found', this.currentCall.id);\n this.callStateSubscription = (_b = this.currentCall) === null || _b === void 0 ? void 0 : _b.state.callingState$.subscribe((s) => {\n var _a;\n console.log('Call state', s);\n if (s === CallingState.JOINED) {\n this.setupParticipantListener();\n }\n else if (s === CallingState.LEFT || s === CallingState.RECONNECTING_FAILED) {\n this.cleanupCall();\n }\n if (this.outgoingCall && s === CallingState.RINGING) {\n this.outgoingCall = undefined;\n }\n else {\n this.notifyListeners('callEvent', { callId: (_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.id, state: s });\n }\n });\n }\n };\n }\n setupCallRingListener() {\n var _a, _b;\n (_a = this.client) === null || _a === void 0 ? void 0 : _a.off('call.ring', this.ringCallback);\n (_b = this.client) === null || _b === void 0 ? void 0 : _b.on('call.ring', this.ringCallback);\n }\n setupParticipantListener() {\n // Subscribe to participant changes\n this.incomingCall = undefined;\n if (!this.currentCall)\n return;\n this.participantJoinedListener = (event) => {\n if (this.magicDivId && event.participant) {\n const magicDiv = document.getElementById(this.magicDivId);\n if (magicDiv && this.currentCall) {\n this.setupParticipantVideo(this.currentCall, event.participant, magicDiv);\n this.setupParticipantAudio(this.currentCall, event.participant, magicDiv);\n }\n }\n };\n this.participantLeftListener = (event) => {\n if (this.magicDivId && event.participant) {\n const videoId = `video-${event.participant.sessionId}`;\n const audioId = `audio-${event.participant.sessionId}`;\n // Remove video element\n const videoEl = document.getElementById(videoId);\n if (videoEl) {\n const unbindVideo = this.videoBindings.get(videoId);\n if (unbindVideo) {\n unbindVideo();\n this.videoBindings.delete(videoId);\n }\n const tracks = videoEl.srcObject;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n track.enabled = false;\n });\n videoEl.srcObject = null;\n }\n videoEl.remove();\n }\n // Remove audio element\n const audioEl = document.getElementById(audioId);\n if (audioEl) {\n const unbindAudio = this.audioBindings.get(audioId);\n if (unbindAudio) {\n unbindAudio();\n this.audioBindings.delete(audioId);\n }\n const tracks = audioEl.srcObject;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n track.enabled = false;\n });\n audioEl.srcObject = null;\n }\n audioEl.remove();\n }\n }\n };\n this.currentCall.on('participantJoined', this.participantJoinedListener);\n this.currentCall.on('participantLeft', this.participantLeftListener);\n // Setup initial participants\n const participants = this.currentCall.state.participants;\n if (this.magicDivId) {\n const magicDiv = document.getElementById(this.magicDivId);\n if (magicDiv) {\n participants.forEach((participant) => {\n if (this.currentCall) {\n this.setupParticipantVideo(this.currentCall, participant, magicDiv);\n this.setupParticipantAudio(this.currentCall, participant, magicDiv);\n }\n });\n }\n }\n }\n setupParticipantVideo(call, participant, container) {\n const id = `video-${participant.sessionId}`;\n if (!document.getElementById(id)) {\n const videoEl = document.createElement('video');\n videoEl.id = id;\n videoEl.style.width = '100%';\n videoEl.style.maxWidth = '300px';\n videoEl.style.aspectRatio = '16/9';\n container.appendChild(videoEl);\n const unbind = call.bindVideoElement(videoEl, participant.sessionId, 'videoTrack');\n if (unbind)\n this.videoBindings.set(id, unbind);\n }\n }\n setupParticipantAudio(call, participant, container) {\n if (participant.isLocalParticipant)\n return;\n const id = `audio-${participant.sessionId}`;\n if (!document.getElementById(id)) {\n const audioEl = document.createElement('audio');\n audioEl.id = id;\n container.appendChild(audioEl);\n const unbind = call.bindAudioElement(audioEl, participant.sessionId);\n if (unbind)\n this.audioBindings.set(id, unbind);\n }\n }\n cleanupCall() {\n var _a;\n // First cleanup the call listeners\n if (this.currentCall) {\n if (this.participantJoinedListener) {\n this.currentCall.off('participantJoined', this.participantJoinedListener);\n this.participantJoinedListener = undefined;\n }\n if (this.participantLeftListener) {\n this.currentCall.off('participantLeft', this.participantLeftListener);\n this.participantLeftListener = undefined;\n }\n (_a = this.callStateSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n }\n if (this.magicDivId) {\n const magicDiv = document.getElementById(this.magicDivId);\n if (magicDiv) {\n // Remove all video elements\n const videoElements = magicDiv.querySelectorAll('video');\n videoElements.forEach((video) => {\n const id = video.id;\n const unbind = this.videoBindings.get(id);\n if (unbind) {\n unbind();\n this.videoBindings.delete(id);\n }\n // Stop all tracks\n const tracks = video.srcObject;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n track.enabled = false;\n });\n video.srcObject = null;\n }\n video.remove();\n });\n // Remove all audio elements\n const audioElements = magicDiv.querySelectorAll('audio');\n audioElements.forEach((audio) => {\n const id = audio.id;\n const unbind = this.audioBindings.get(id);\n if (unbind) {\n unbind();\n this.audioBindings.delete(id);\n }\n // Stop all tracks\n const tracks = audio.srcObject;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n track.enabled = false;\n });\n audio.srcObject = null;\n }\n audio.remove();\n });\n // Clear the container\n while (magicDiv.firstChild) {\n magicDiv.removeChild(magicDiv.firstChild);\n }\n }\n }\n // Clear all bindings\n this.videoBindings.clear();\n this.audioBindings.clear();\n // Clear call references\n this.currentCall = undefined;\n this.incomingCall = undefined;\n }\n async login(options) {\n this.client = StreamVideoClient.getOrCreateInstance({\n apiKey: options.apiKey,\n user: { id: options.userId, name: options.name, image: options.imageURL },\n token: options.token,\n });\n this.magicDivId = options.magicDivId;\n this.setupCallRingListener();\n return { success: true };\n }\n async logout() {\n var _a;\n if (!this.client) {\n console.log('No client', this.client);\n throw new Error('Client not initialized');\n }\n // Cleanup subscription\n (_a = this.callStateSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();\n this.callStateSubscription = undefined;\n await this.client.disconnectUser();\n this.client = undefined;\n this.currentCall = undefined;\n return { success: true };\n }\n async call(options) {\n if (!this.client) {\n console.log('No client', this.client);\n throw new Error('Client not initialized - Please login first');\n }\n const call = this.client.call(options.type || 'default', crypto.randomUUID());\n const members = [{ user_id: options.userId }];\n if (this.client.streamClient.userID && options.userId !== this.client.streamClient.userID) {\n members.push({ user_id: this.client.streamClient.userID });\n }\n await call.getOrCreate({ data: { members } });\n this.currentCall = call;\n if (options.ring) {\n this.outgoingCall = call.cid;\n await call.ring();\n }\n await call.join();\n return { success: true };\n }\n async endCall() {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n await this.currentCall.leave();\n this.currentCall = undefined;\n this.cleanupCall();\n return { success: true };\n }\n async setMicrophoneEnabled(options) {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n if (options.enabled) {\n await this.currentCall.microphone.enable();\n }\n else {\n await this.currentCall.microphone.disable();\n }\n return { success: true };\n }\n async setCameraEnabled(options) {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n if (options.enabled) {\n await this.currentCall.camera.enable();\n }\n else {\n await this.currentCall.camera.disable();\n }\n return { success: true };\n }\n async acceptCall() {\n if (!this.incomingCall || !this.client) {\n console.log('No incoming call to accept', this.incomingCall, this.client);\n throw new Error('No incoming call to accept');\n }\n console.log('Accepting call', this.incomingCall);\n const call = this.client.call(this.incomingCall.type, this.incomingCall.id);\n this.currentCall = call;\n console.log('Joining call', call);\n await call.accept();\n await call.join();\n console.log('Joined call', call);\n this.notifyListeners('callEvent', { callId: call.id, state: CallingState.JOINED });\n this.setupParticipantListener();\n return { success: true };\n }\n async rejectCall() {\n if (!this.incomingCall || !this.client) {\n console.log('No incoming call to reject', this.incomingCall, this.client);\n throw new Error('No incoming call to reject');\n }\n console.log('Rejecting call', this.incomingCall);\n const call = this.client.call(this.incomingCall.type, this.incomingCall.id);\n console.log('Leaving call', call);\n await call.leave();\n this.incomingCall = undefined;\n console.log('Rejected call', call);\n this.notifyListeners('callEvent', { callId: call.id, state: CallingState.LEFT });\n this.cleanupCall();\n return { success: true };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","CallingState","StreamVideoClient"],"mappings":";;;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE;AAChD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,aAAa,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