@capgo/capacitor-stream-call 7.1.31 → 7.7.7
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/README.md +102 -12
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +0 -6
- package/android/src/main/java/ee/forgr/capacitor/streamcall/AcceptCallReceiver.kt +1 -1
- package/android/src/main/java/ee/forgr/capacitor/streamcall/CustomStreamIntentResolver.kt +2 -2
- package/android/src/main/java/ee/forgr/capacitor/streamcall/StreamCallPlugin.kt +2946 -2462
- package/android/src/main/res/raw/outgoing.mp3 +0 -0
- package/dist/docs.json +204 -1
- package/dist/esm/definitions.d.ts +64 -2
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +3 -0
- package/dist/esm/web.js +3 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +3 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/StreamCallPlugin/StreamCallPlugin.swift +443 -154
- package/ios/Sources/StreamCallPlugin/TouchInterceptView.swift +35 -30
- package/package.json +1 -1
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAe1E,MAAM,OAAO,aAAc,SAAQ,SAAS;IAA5C;;QAOU,kBAAa,GAA4B,IAAI,GAAG,EAAE,CAAC;QACnD,kBAAa,GAA4B,IAAI,GAAG,EAAE,CAAC;QAGnD,yBAAoB,GAAwB,IAAI,GAAG,EAAE,CAAC;QACtD,wBAAmB,GAAwB,IAAI,GAAG,EAAE,CAAC;QAuBrD,iBAAY,GAAG,CAAC,KAAmC,EAA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AAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACpC,OAAO;gBACL,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM;gBAC/B,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;gBAC3B,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,IAAI,EAAE;gBACzC,UAAU,EAAE,IAAI;aACjB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,IAAI,EAAE,EAAE;gBACR,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,KAAK;aAClB,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { AllClientEvents, Call, CallResponse, StreamVideoParticipant } from '@stream-io/video-client';\nimport { CallingState, StreamVideoClient } from '@stream-io/video-client';\n\nimport type {\n CallOptions,\n StreamCallPlugin,\n SuccessResponse,\n LoginOptions,\n CameraEnabledResponse,\n CallEvent,\n CallState,\n CallMember,\n DynamicApiKeyResponse,\n CurrentUserResponse,\n} from './definitions';\n\nexport class StreamCallWeb extends WebPlugin implements StreamCallPlugin {\n private client?: StreamVideoClient;\n private currentCall?: Call;\n private callStateSubscription?: { unsubscribe: () => void };\n private incomingCall?: CallResponse;\n private outgoingCall?: string;\n private magicDivId?: string;\n private videoBindings: Map<string, () => void> = new Map();\n private audioBindings: Map<string, () => void> = new Map();\n private participantJoinedListener?: (event: { participant?: { sessionId: string } }) => void;\n private participantLeftListener?: (event: { participant?: { sessionId: string } }) => void;\n private participantResponses: Map<string, string> = new Map();\n private callMembersExpected: Map<string, number> = new Map();\n private currentUser?: { userId: string; name: string; imageURL?: string };\n // private currentActiveCallId?: string;\n\n private setupCallRingListener() {\n this.client?.off('call.ring', this.ringCallback);\n this.client?.off('call.session_started', this.callSessionStartedCallback);\n\n this.client?.on('call.ring', this.ringCallback);\n this.client?.on('call.session_started', this.callSessionStartedCallback);\n }\n\n private setupCallEventListeners() {\n // Clear previous listeners if any\n this.client?.off('call.rejected', this.callRejectedCallback);\n this.client?.off('call.accepted', this.callAcceptedCallback);\n this.client?.off('call.missed', this.callMissedCallback);\n // Register event listeners\n this.client?.on('call.rejected', this.callRejectedCallback);\n this.client?.on('call.accepted', this.callAcceptedCallback);\n this.client?.on('call.missed', this.callMissedCallback);\n }\n\n private ringCallback = (event: AllClientEvents['call.ring']) => {\n console.log('Call ringing', event, this.currentCall);\n this.incomingCall = event.call;\n\n // Extract caller information\n let caller: CallMember | undefined;\n\n if (event.call?.created_by) {\n caller = {\n userId: event.call.created_by.id,\n name: event.call.created_by.name,\n imageURL: event.call.created_by.image,\n role: event.call.created_by.role,\n };\n }\n\n // if (!this.currentCall) {\n console.log('Creating new call', event.call.id);\n this.currentCall = this.client?.call(event.call.type, event.call.id);\n // this.currentActiveCallId = this.currentCall?.cid;\n setTimeout(() => {\n this.notifyListeners('callEvent', {\n callId: event.call.id,\n state: CallingState.RINGING,\n caller,\n });\n }, 100);\n // Clear previous responses when a new call starts\n this.participantResponses.clear();\n // }\n if (this.currentCall) {\n console.log('Call found', this.currentCall.id);\n this.callStateSubscription = this.currentCall?.state.callingState$.subscribe((s) => {\n console.log('Call state', s);\n if (s === CallingState.JOINED) {\n this.setupParticipantListener();\n this.setupCallEventListeners();\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 } else {\n this.notifyListeners('callEvent', { callId: this.currentCall?.id, state: s });\n }\n });\n }\n };\n\n private setupParticipantListener() {\n // Subscribe to participant changes\n this.incomingCall = undefined;\n if (!this.currentCall) return;\n\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 as StreamVideoParticipant, magicDiv);\n this.setupParticipantAudio(this.currentCall, event.participant as StreamVideoParticipant, magicDiv);\n }\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\n // Remove video element\n const videoEl = document.getElementById(videoId) as HTMLVideoElement;\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 as MediaStream;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n });\n }\n videoEl.srcObject = null;\n videoEl.remove();\n }\n\n // Remove audio element\n const audioEl = document.getElementById(audioId) as HTMLAudioElement;\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 as MediaStream;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n });\n }\n audioEl.srcObject = null;\n audioEl.remove();\n }\n }\n\n // Check if we're the only participant left in the call\n if (this.currentCall?.state.session) {\n // Get the remaining participants count (we need to subtract 1 as we haven't been removed from the list yet)\n const remainingParticipants = this.currentCall.state.session.participants.length - 1;\n\n // If we're the only one left, end the call\n if (remainingParticipants <= 1) {\n console.log(`We are left solo in a call. Ending. cID: ${this.currentCall.cid}`);\n\n // End the call\n this.currentCall.leave();\n\n // Clean up resources\n const callCid = this.currentCall.cid;\n\n // Invalidate and remove timer\n const callState = this.callStates?.get(callCid);\n if (callState?.timer) {\n clearInterval(callState.timer);\n }\n\n // Remove from callStates\n this.callStates?.delete(callCid);\n\n // Reset the current call\n this.currentCall = undefined;\n // this.currentActiveCallId = undefined;\n\n // Clean up\n this.cleanupCall();\n\n console.log(`Cleaned up resources for ended call: ${callCid}`);\n\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'left',\n reason: 'participant_left',\n });\n }\n }\n };\n\n this.currentCall.on('participantJoined', this.participantJoinedListener);\n this.currentCall.on('participantLeft', this.participantLeftListener);\n\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: StreamVideoParticipant) => {\n if (this.currentCall) {\n this.setupParticipantVideo(this.currentCall, participant, magicDiv);\n this.setupParticipantAudio(this.currentCall, participant, magicDiv);\n }\n });\n }\n }\n }\n\n private setupParticipantVideo(call: Call, participant: StreamVideoParticipant, container: HTMLElement) {\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\n const unbind = call.bindVideoElement(videoEl, participant.sessionId, 'videoTrack');\n if (unbind) this.videoBindings.set(id, unbind);\n }\n }\n\n private setupParticipantAudio(call: Call, participant: StreamVideoParticipant, container: HTMLElement) {\n if (participant.isLocalParticipant) return;\n\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\n const unbind = call.bindAudioElement(audioEl, participant.sessionId);\n if (unbind) this.audioBindings.set(id, unbind);\n }\n }\n\n private callSessionStartedCallback = (event: AllClientEvents['call.session_started']) => {\n console.log('Call created (session started)', event);\n if (event.call?.session?.participants) {\n // Store the number of expected participants for this call\n const callCid = event.call.cid;\n const memberCount = event.call.session.participants.length;\n console.log(`Call ${callCid} created with ${memberCount} members`);\n this.callMembersExpected.set(callCid, memberCount);\n\n // Store call members in callStates\n this.callStates.set(callCid, {\n members: event.call.session.participants.map((p) => ({ user_id: p.user?.id || '' })),\n participantResponses: new Map(),\n expectedMemberCount: memberCount,\n createdAt: new Date(),\n });\n\n // Start a timeout task that runs every second\n const timeoutTask = setInterval(() => this.checkCallTimeout(callCid), 1000);\n\n // Update the callState with the timeout task\n const callState = this.callStates.get(callCid);\n if (callState) {\n callState.timer = timeoutTask;\n this.callStates.set(callCid, callState);\n }\n }\n };\n\n private callRejectedCallback = (event: AllClientEvents['call.rejected']) => {\n console.log('Call rejected', event);\n if (event.user?.id) {\n this.participantResponses.set(event.user.id, 'rejected');\n\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'rejected');\n this.callStates.set(event.call_cid, callState);\n }\n\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'rejected',\n userId: event.user.id,\n });\n\n this.checkAllParticipantsResponded();\n }\n };\n\n private callAcceptedCallback = (event: AllClientEvents['call.accepted']) => {\n console.log('Call accepted', event);\n if (event.user?.id) {\n this.participantResponses.set(event.user.id, 'accepted');\n\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'accepted');\n\n // If someone accepted, clear the timer as we don't need to check anymore\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n\n this.callStates.set(event.call_cid, callState);\n }\n\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'accepted',\n userId: event.user.id,\n });\n }\n };\n\n private callMissedCallback = (event: AllClientEvents['call.missed']) => {\n console.log('Call missed', event);\n if (event.user?.id) {\n this.participantResponses.set(event.user.id, 'missed');\n\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'missed');\n this.callStates.set(event.call_cid, callState);\n }\n\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'missed',\n userId: event.user.id,\n });\n\n this.checkAllParticipantsResponded();\n }\n };\n\n // Add a combined map for call states, mirroring the iOS implementation\n private callStates: Map<\n string,\n {\n members: { user_id: string }[];\n participantResponses: Map<string, string>;\n expectedMemberCount: number;\n createdAt: Date;\n timer?: ReturnType<typeof setInterval>;\n }\n > = new Map();\n\n private checkCallTimeout(callCid: string) {\n const callState = this.callStates.get(callCid);\n if (!callState) return;\n\n // Calculate time elapsed since call creation\n const now = new Date();\n const elapsedSeconds = (now.getTime() - callState.createdAt.getTime()) / 1000;\n\n // Check if 30 seconds have passed\n if (elapsedSeconds >= 30) {\n console.log(`Call ${callCid} has timed out after ${elapsedSeconds} seconds`);\n\n // Check if anyone has accepted\n const hasAccepted = Array.from(callState.participantResponses.values()).some(\n (response) => response === 'accepted',\n );\n\n if (!hasAccepted) {\n console.log(`No one accepted call ${callCid}, marking all non-responders as missed`);\n\n // Mark all members who haven't responded as \"missed\"\n callState.members.forEach((member) => {\n if (!callState.participantResponses.has(member.user_id)) {\n callState.participantResponses.set(member.user_id, 'missed');\n this.participantResponses.set(member.user_id, 'missed');\n\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'missed',\n userId: member.user_id,\n });\n }\n });\n\n // End the call\n if (this.currentCall && this.currentCall.cid === callCid) {\n this.currentCall.leave();\n }\n\n // Clear the timeout task\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n\n // Remove from callStates\n this.callStates.delete(callCid);\n\n // Clean up\n this.cleanupCall();\n\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'timeout',\n });\n }\n }\n }\n\n private checkAllParticipantsResponded() {\n if (!this.currentCall) return;\n\n const callCid = this.currentCall.cid;\n const totalParticipants = this.callMembersExpected.get(callCid);\n\n if (!totalParticipants) {\n console.log(`No expected participant count found for call: ${callCid}`);\n return;\n }\n\n console.log(`Total expected participants: ${totalParticipants}`);\n\n // Count rejections and misses\n let rejectedOrMissedCount = 0;\n this.participantResponses.forEach((response) => {\n if (response === 'rejected' || response === 'missed') {\n rejectedOrMissedCount++;\n }\n });\n\n console.log(`Participants responded: ${this.participantResponses.size}/${totalParticipants}`);\n console.log(`Rejected or missed: ${rejectedOrMissedCount}`);\n\n const allResponded = this.participantResponses.size >= totalParticipants;\n const allRejectedOrMissed =\n allResponded &&\n Array.from(this.participantResponses.values()).every(\n (response) => response === 'rejected' || response === 'missed',\n );\n\n // If all participants have rejected or missed the call\n if (allResponded && allRejectedOrMissed) {\n console.log('All participants have rejected or missed the call');\n\n // End the call\n this.currentCall.leave();\n\n // Clean up the timer if exists in callStates\n const callState = this.callStates.get(callCid);\n if (callState?.timer) {\n clearInterval(callState.timer);\n }\n\n // Remove from callStates\n this.callStates.delete(callCid);\n\n // Clear the responses\n this.participantResponses.clear();\n\n // Clean up\n this.cleanupCall();\n\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'all_rejected_or_missed',\n });\n }\n }\n\n private cleanupCall() {\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 this.callStateSubscription?.unsubscribe();\n }\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 as HTMLVideoElement).srcObject as MediaStream;\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\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 as HTMLAudioElement).srcObject as MediaStream;\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\n // Clear the container\n while (magicDiv.firstChild) {\n magicDiv.removeChild(magicDiv.firstChild);\n }\n }\n }\n\n // Clear all bindings\n this.videoBindings.clear();\n this.audioBindings.clear();\n\n // Clear call references\n this.currentCall = undefined;\n this.incomingCall = undefined;\n }\n\n async login(options: LoginOptions): Promise<SuccessResponse> {\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\n // Store current user data\n this.currentUser = {\n userId: options.userId,\n name: options.name,\n imageURL: options.imageURL,\n };\n\n this.magicDivId = options.magicDivId;\n this.setupCallRingListener();\n\n return { success: true };\n }\n\n async logout(): Promise<SuccessResponse> {\n if (!this.client) {\n console.log('No client', this.client);\n throw new Error('Client not initialized');\n }\n\n // Cleanup subscription\n this.callStateSubscription?.unsubscribe();\n this.callStateSubscription = undefined;\n\n await this.client.disconnectUser();\n this.client = undefined;\n this.currentUser = undefined;\n this.currentCall = undefined;\n return { success: true };\n }\n\n async call(options: CallOptions): Promise<SuccessResponse> {\n if (!this.client) {\n console.log('No client', this.client);\n throw new Error('Client not initialized - Please login first');\n }\n\n const call = this.client.call(options.type || 'default', crypto.randomUUID());\n const members = options.userIds.map((userId) => ({ user_id: userId }));\n if (this.client.streamClient.userID && !options.userIds.includes(this.client.streamClient.userID)) {\n members.push({ user_id: this.client.streamClient.userID });\n }\n await call.getOrCreate({ data: { members, team: options.team } });\n\n // Store the expected member count for this call\n // -1, because we don't count the caller themselves\n this.callMembersExpected.set(call.cid, members.length);\n console.log(`Setting expected members for call ${call.cid}: ${members.length}`);\n\n this.currentCall = call;\n if (options.ring) {\n this.outgoingCall = call.cid;\n await call.ring();\n }\n\n await call.join();\n return { success: true };\n }\n\n async endCall(): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n await this.currentCall.leave();\n this.currentCall = undefined;\n this.cleanupCall();\n\n return { success: true };\n }\n\n async setMicrophoneEnabled(options: { enabled: boolean }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n if (options.enabled) {\n await this.currentCall.microphone.enable();\n } else {\n await this.currentCall.microphone.disable();\n }\n\n return { success: true };\n }\n\n async setCameraEnabled(options: { enabled: boolean }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n if (options.enabled) {\n await this.currentCall.camera.enable();\n } else {\n await this.currentCall.camera.disable();\n }\n\n return { success: true };\n }\n\n async setSpeaker(options: { name: string }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n await this.currentCall.speaker.select(options.name);\n\n return { success: true };\n }\n\n async switchCamera(options: { camera: 'front' | 'back' }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n if (options.camera === 'front') {\n await this.currentCall.camera.selectDirection('front');\n } else {\n await this.currentCall.camera.selectDirection('back');\n }\n\n return { success: true };\n }\n\n async acceptCall(): Promise<SuccessResponse> {\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\n async rejectCall(): Promise<SuccessResponse> {\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: Call = this.client.call(this.incomingCall.type, this.incomingCall.id);\n console.log('Leaving call', call);\n await call.reject();\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 async isCameraEnabled(): Promise<CameraEnabledResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n const enabled = await this.currentCall.camera.enabled;\n return { enabled };\n }\n\n async getCallInfo(options: { callId: string }): Promise<CallEvent> {\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n\n if (this.currentCall.id !== options.callId) {\n throw new Error('Call ID does not match active call');\n }\n\n const callingState = this.currentCall.state.callingState;\n let state: CallState;\n\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n\n // Try to get caller information from the call\n let caller: CallMember | undefined;\n let members: CallMember[] = [];\n\n try {\n // Get call details\n const callDetails = await this.currentCall.get();\n\n if (callDetails?.call?.created_by) {\n caller = {\n userId: callDetails.call.created_by.id,\n name: callDetails.call.created_by.name,\n imageURL: callDetails.call.created_by.image,\n role: callDetails.call.created_by.role,\n };\n }\n\n // Get current participants\n if (this.currentCall.state.participants) {\n members = this.currentCall.state.participants.map((participant: StreamVideoParticipant) => ({\n userId: participant.userId,\n name: participant.name,\n imageURL: participant.image,\n role: participant.roles?.[0],\n }));\n }\n } catch (error) {\n console.warn('Failed to get call details:', error);\n }\n\n return {\n callId: this.currentCall.id,\n state,\n caller,\n members,\n };\n }\n\n async getCallStatus(): Promise<CallEvent> {\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n\n const callingState = this.currentCall.state.callingState;\n let state: CallState;\n\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n\n return {\n callId: this.currentCall.id,\n state,\n };\n }\n\n async setDynamicStreamVideoApikey(_options: { apiKey: string }): Promise<SuccessResponse> {\n throw new Error('setDynamicStreamVideoApikey is not implemented on web platform');\n }\n\n async getDynamicStreamVideoApikey(): Promise<DynamicApiKeyResponse> {\n throw new Error('getDynamicStreamVideoApikey is not implemented on web platform');\n }\n\n async getCurrentUser(): Promise<CurrentUserResponse> {\n if (this.currentUser && this.client) {\n return {\n userId: this.currentUser.userId,\n name: this.currentUser.name,\n imageURL: this.currentUser.imageURL || '',\n isLoggedIn: true,\n };\n } else {\n return {\n userId: '',\n name: '',\n imageURL: '',\n isLoggedIn: false,\n };\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAe1E,MAAM,OAAO,aAAc,SAAQ,SAAS;IAA5C;;QAOU,kBAAa,GAA4B,IAAI,GAAG,EAAE,CAAC;QACnD,kBAAa,GAA4B,IAAI,GAAG,EAAE,CAAC;QAGnD,yBAAoB,GAAwB,IAAI,GAAG,EAAE,CAAC;QACtD,wBAAmB,GAAwB,IAAI,GAAG,EAAE,CAAC;QAuBrD,iBAAY,GAAG,CAAC,KAAmC,EAAE,EAAE;;YAC7D,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACrD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC;YAE/B,6BAA6B;YAC7B,IAAI,MAA8B,CAAC;YAEnC,IAAI,MAAA,KAAK,CAA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AU,EAAE,IAAI;aACjB,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO;gBACL,MAAM,EAAE,EAAE;gBACV,IAAI,EAAE,EAAE;gBACR,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,KAAK;aAClB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { AllClientEvents, Call, CallResponse, StreamVideoParticipant } from '@stream-io/video-client';\nimport { CallingState, StreamVideoClient } from '@stream-io/video-client';\n\nimport type {\n CallOptions,\n StreamCallPlugin,\n SuccessResponse,\n LoginOptions,\n CameraEnabledResponse,\n CallEvent,\n CallState,\n CallMember,\n DynamicApiKeyResponse,\n CurrentUserResponse,\n} from './definitions';\n\nexport class StreamCallWeb extends WebPlugin implements StreamCallPlugin {\n private client?: StreamVideoClient;\n private currentCall?: Call;\n private callStateSubscription?: { unsubscribe: () => void };\n private incomingCall?: CallResponse;\n private outgoingCall?: string;\n private magicDivId?: string;\n private videoBindings: Map<string, () => void> = new Map();\n private audioBindings: Map<string, () => void> = new Map();\n private participantJoinedListener?: (event: { participant?: { sessionId: string } }) => void;\n private participantLeftListener?: (event: { participant?: { sessionId: string } }) => void;\n private participantResponses: Map<string, string> = new Map();\n private callMembersExpected: Map<string, number> = new Map();\n private currentUser?: { userId: string; name: string; imageURL?: string };\n // private currentActiveCallId?: string;\n\n private setupCallRingListener() {\n this.client?.off('call.ring', this.ringCallback);\n this.client?.off('call.session_started', this.callSessionStartedCallback);\n\n this.client?.on('call.ring', this.ringCallback);\n this.client?.on('call.session_started', this.callSessionStartedCallback);\n }\n\n private setupCallEventListeners() {\n // Clear previous listeners if any\n this.client?.off('call.rejected', this.callRejectedCallback);\n this.client?.off('call.accepted', this.callAcceptedCallback);\n this.client?.off('call.missed', this.callMissedCallback);\n // Register event listeners\n this.client?.on('call.rejected', this.callRejectedCallback);\n this.client?.on('call.accepted', this.callAcceptedCallback);\n this.client?.on('call.missed', this.callMissedCallback);\n }\n\n private ringCallback = (event: AllClientEvents['call.ring']) => {\n console.log('Call ringing', event, this.currentCall);\n this.incomingCall = event.call;\n\n // Extract caller information\n let caller: CallMember | undefined;\n\n if (event.call?.created_by) {\n caller = {\n userId: event.call.created_by.id,\n name: event.call.created_by.name,\n imageURL: event.call.created_by.image,\n role: event.call.created_by.role,\n };\n }\n\n // if (!this.currentCall) {\n console.log('Creating new call', event.call.id);\n this.currentCall = this.client?.call(event.call.type, event.call.id);\n // this.currentActiveCallId = this.currentCall?.cid;\n setTimeout(() => {\n this.notifyListeners('callEvent', {\n callId: event.call.id,\n state: CallingState.RINGING,\n caller,\n });\n }, 100);\n // Clear previous responses when a new call starts\n this.participantResponses.clear();\n // }\n if (this.currentCall) {\n console.log('Call found', this.currentCall.id);\n this.callStateSubscription = this.currentCall?.state.callingState$.subscribe((s) => {\n console.log('Call state', s);\n if (s === CallingState.JOINED) {\n this.setupParticipantListener();\n this.setupCallEventListeners();\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 } else {\n this.notifyListeners('callEvent', { callId: this.currentCall?.id, state: s });\n }\n });\n }\n };\n\n private setupParticipantListener() {\n // Subscribe to participant changes\n this.incomingCall = undefined;\n if (!this.currentCall) return;\n\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 as StreamVideoParticipant, magicDiv);\n this.setupParticipantAudio(this.currentCall, event.participant as StreamVideoParticipant, magicDiv);\n }\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\n // Remove video element\n const videoEl = document.getElementById(videoId) as HTMLVideoElement;\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 as MediaStream;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n });\n }\n videoEl.srcObject = null;\n videoEl.remove();\n }\n\n // Remove audio element\n const audioEl = document.getElementById(audioId) as HTMLAudioElement;\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 as MediaStream;\n if (tracks) {\n tracks.getTracks().forEach((track) => {\n track.stop();\n });\n }\n audioEl.srcObject = null;\n audioEl.remove();\n }\n }\n\n // Check if we're the only participant left in the call\n if (this.currentCall?.state.session) {\n // Get the remaining participants count (we need to subtract 1 as we haven't been removed from the list yet)\n const remainingParticipants = this.currentCall.state.session.participants.length - 1;\n\n // If we're the only one left, end the call\n if (remainingParticipants <= 1) {\n console.log(`We are left solo in a call. Ending. cID: ${this.currentCall.cid}`);\n\n // End the call\n this.currentCall.leave();\n\n // Clean up resources\n const callCid = this.currentCall.cid;\n\n // Invalidate and remove timer\n const callState = this.callStates?.get(callCid);\n if (callState?.timer) {\n clearInterval(callState.timer);\n }\n\n // Remove from callStates\n this.callStates?.delete(callCid);\n\n // Reset the current call\n this.currentCall = undefined;\n // this.currentActiveCallId = undefined;\n\n // Clean up\n this.cleanupCall();\n\n console.log(`Cleaned up resources for ended call: ${callCid}`);\n\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'left',\n reason: 'participant_left',\n });\n }\n }\n };\n\n this.currentCall.on('participantJoined', this.participantJoinedListener);\n this.currentCall.on('participantLeft', this.participantLeftListener);\n\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: StreamVideoParticipant) => {\n if (this.currentCall) {\n this.setupParticipantVideo(this.currentCall, participant, magicDiv);\n this.setupParticipantAudio(this.currentCall, participant, magicDiv);\n }\n });\n }\n }\n }\n\n private setupParticipantVideo(call: Call, participant: StreamVideoParticipant, container: HTMLElement) {\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\n const unbind = call.bindVideoElement(videoEl, participant.sessionId, 'videoTrack');\n if (unbind) this.videoBindings.set(id, unbind);\n }\n }\n\n private setupParticipantAudio(call: Call, participant: StreamVideoParticipant, container: HTMLElement) {\n if (participant.isLocalParticipant) return;\n\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\n const unbind = call.bindAudioElement(audioEl, participant.sessionId);\n if (unbind) this.audioBindings.set(id, unbind);\n }\n }\n\n private callSessionStartedCallback = (event: AllClientEvents['call.session_started']) => {\n console.log('Call created (session started)', event);\n if (event.call?.session?.participants) {\n // Store the number of expected participants for this call\n const callCid = event.call.cid;\n const memberCount = event.call.session.participants.length;\n console.log(`Call ${callCid} created with ${memberCount} members`);\n this.callMembersExpected.set(callCid, memberCount);\n\n // Store call members in callStates\n this.callStates.set(callCid, {\n members: event.call.session.participants.map((p) => ({ user_id: p.user?.id || '' })),\n participantResponses: new Map(),\n expectedMemberCount: memberCount,\n createdAt: new Date(),\n });\n\n // Start a timeout task that runs every second\n const timeoutTask = setInterval(() => this.checkCallTimeout(callCid), 1000);\n\n // Update the callState with the timeout task\n const callState = this.callStates.get(callCid);\n if (callState) {\n callState.timer = timeoutTask;\n this.callStates.set(callCid, callState);\n }\n }\n };\n\n private callRejectedCallback = (event: AllClientEvents['call.rejected']) => {\n console.log('Call rejected', event);\n if (event.user?.id) {\n this.participantResponses.set(event.user.id, 'rejected');\n\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'rejected');\n this.callStates.set(event.call_cid, callState);\n }\n\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'rejected',\n userId: event.user.id,\n });\n\n this.checkAllParticipantsResponded();\n }\n };\n\n private callAcceptedCallback = (event: AllClientEvents['call.accepted']) => {\n console.log('Call accepted', event);\n if (event.user?.id) {\n this.participantResponses.set(event.user.id, 'accepted');\n\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'accepted');\n\n // If someone accepted, clear the timer as we don't need to check anymore\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n\n this.callStates.set(event.call_cid, callState);\n }\n\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'accepted',\n userId: event.user.id,\n });\n }\n };\n\n private callMissedCallback = (event: AllClientEvents['call.missed']) => {\n console.log('Call missed', event);\n if (event.user?.id) {\n this.participantResponses.set(event.user.id, 'missed');\n\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'missed');\n this.callStates.set(event.call_cid, callState);\n }\n\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'missed',\n userId: event.user.id,\n });\n\n this.checkAllParticipantsResponded();\n }\n };\n\n // Add a combined map for call states, mirroring the iOS implementation\n private callStates: Map<\n string,\n {\n members: { user_id: string }[];\n participantResponses: Map<string, string>;\n expectedMemberCount: number;\n createdAt: Date;\n timer?: ReturnType<typeof setInterval>;\n }\n > = new Map();\n\n private checkCallTimeout(callCid: string) {\n const callState = this.callStates.get(callCid);\n if (!callState) return;\n\n // Calculate time elapsed since call creation\n const now = new Date();\n const elapsedSeconds = (now.getTime() - callState.createdAt.getTime()) / 1000;\n\n // Check if 30 seconds have passed\n if (elapsedSeconds >= 30) {\n console.log(`Call ${callCid} has timed out after ${elapsedSeconds} seconds`);\n\n // Check if anyone has accepted\n const hasAccepted = Array.from(callState.participantResponses.values()).some(\n (response) => response === 'accepted',\n );\n\n if (!hasAccepted) {\n console.log(`No one accepted call ${callCid}, marking all non-responders as missed`);\n\n // Mark all members who haven't responded as \"missed\"\n callState.members.forEach((member) => {\n if (!callState.participantResponses.has(member.user_id)) {\n callState.participantResponses.set(member.user_id, 'missed');\n this.participantResponses.set(member.user_id, 'missed');\n\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'missed',\n userId: member.user_id,\n });\n }\n });\n\n // End the call\n if (this.currentCall && this.currentCall.cid === callCid) {\n this.currentCall.leave();\n }\n\n // Clear the timeout task\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n\n // Remove from callStates\n this.callStates.delete(callCid);\n\n // Clean up\n this.cleanupCall();\n\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'timeout',\n });\n }\n }\n }\n\n private checkAllParticipantsResponded() {\n if (!this.currentCall) return;\n\n const callCid = this.currentCall.cid;\n const totalParticipants = this.callMembersExpected.get(callCid);\n\n if (!totalParticipants) {\n console.log(`No expected participant count found for call: ${callCid}`);\n return;\n }\n\n console.log(`Total expected participants: ${totalParticipants}`);\n\n // Count rejections and misses\n let rejectedOrMissedCount = 0;\n this.participantResponses.forEach((response) => {\n if (response === 'rejected' || response === 'missed') {\n rejectedOrMissedCount++;\n }\n });\n\n console.log(`Participants responded: ${this.participantResponses.size}/${totalParticipants}`);\n console.log(`Rejected or missed: ${rejectedOrMissedCount}`);\n\n const allResponded = this.participantResponses.size >= totalParticipants;\n const allRejectedOrMissed =\n allResponded &&\n Array.from(this.participantResponses.values()).every(\n (response) => response === 'rejected' || response === 'missed',\n );\n\n // If all participants have rejected or missed the call\n if (allResponded && allRejectedOrMissed) {\n console.log('All participants have rejected or missed the call');\n\n // End the call\n this.currentCall.leave();\n\n // Clean up the timer if exists in callStates\n const callState = this.callStates.get(callCid);\n if (callState?.timer) {\n clearInterval(callState.timer);\n }\n\n // Remove from callStates\n this.callStates.delete(callCid);\n\n // Clear the responses\n this.participantResponses.clear();\n\n // Clean up\n this.cleanupCall();\n\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'all_rejected_or_missed',\n });\n }\n }\n\n private cleanupCall() {\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 this.callStateSubscription?.unsubscribe();\n }\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 as HTMLVideoElement).srcObject as MediaStream;\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\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 as HTMLAudioElement).srcObject as MediaStream;\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\n // Clear the container\n while (magicDiv.firstChild) {\n magicDiv.removeChild(magicDiv.firstChild);\n }\n }\n }\n\n // Clear all bindings\n this.videoBindings.clear();\n this.audioBindings.clear();\n\n // Clear call references\n this.currentCall = undefined;\n this.incomingCall = undefined;\n }\n\n async login(options: LoginOptions): Promise<SuccessResponse> {\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\n // Store current user data\n this.currentUser = {\n userId: options.userId,\n name: options.name,\n imageURL: options.imageURL,\n };\n\n this.magicDivId = options.magicDivId;\n this.setupCallRingListener();\n\n return { success: true };\n }\n\n async logout(): Promise<SuccessResponse> {\n if (!this.client) {\n console.log('No client', this.client);\n throw new Error('Client not initialized');\n }\n\n // Cleanup subscription\n this.callStateSubscription?.unsubscribe();\n this.callStateSubscription = undefined;\n\n await this.client.disconnectUser();\n this.client = undefined;\n this.currentUser = undefined;\n this.currentCall = undefined;\n return { success: true };\n }\n\n async call(options: CallOptions): Promise<SuccessResponse> {\n if (!this.client) {\n console.log('No client', this.client);\n throw new Error('Client not initialized - Please login first');\n }\n\n const call = this.client.call(options.type || 'default', crypto.randomUUID());\n const members = options.userIds.map((userId) => ({ user_id: userId }));\n if (this.client.streamClient.userID && !options.userIds.includes(this.client.streamClient.userID)) {\n members.push({ user_id: this.client.streamClient.userID });\n }\n await call.getOrCreate({ data: { members, team: options.team } });\n\n // Store the expected member count for this call\n // -1, because we don't count the caller themselves\n this.callMembersExpected.set(call.cid, members.length);\n console.log(`Setting expected members for call ${call.cid}: ${members.length}`);\n\n this.currentCall = call;\n if (options.ring) {\n this.outgoingCall = call.cid;\n await call.ring();\n }\n\n await call.join();\n return { success: true };\n }\n\n async endCall(): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n await this.currentCall.leave();\n this.currentCall = undefined;\n this.cleanupCall();\n\n return { success: true };\n }\n\n async setMicrophoneEnabled(options: { enabled: boolean }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n if (options.enabled) {\n await this.currentCall.microphone.enable();\n } else {\n await this.currentCall.microphone.disable();\n }\n\n return { success: true };\n }\n\n async setCameraEnabled(options: { enabled: boolean }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n if (options.enabled) {\n await this.currentCall.camera.enable();\n } else {\n await this.currentCall.camera.disable();\n }\n\n return { success: true };\n }\n\n async setSpeaker(options: { name: string }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n await this.currentCall.speaker.select(options.name);\n\n return { success: true };\n }\n\n async switchCamera(options: { camera: 'front' | 'back' }): Promise<SuccessResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n\n if (options.camera === 'front') {\n await this.currentCall.camera.selectDirection('front');\n } else {\n await this.currentCall.camera.selectDirection('back');\n }\n\n return { success: true };\n }\n\n async acceptCall(): Promise<SuccessResponse> {\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\n async rejectCall(): Promise<SuccessResponse> {\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: Call = this.client.call(this.incomingCall.type, this.incomingCall.id);\n console.log('Leaving call', call);\n await call.reject();\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 async isCameraEnabled(): Promise<CameraEnabledResponse> {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n const enabled = await this.currentCall.camera.enabled;\n return { enabled };\n }\n\n async getCallInfo(options: { callId: string }): Promise<CallEvent> {\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n\n if (this.currentCall.id !== options.callId) {\n throw new Error('Call ID does not match active call');\n }\n\n const callingState = this.currentCall.state.callingState;\n let state: CallState;\n\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n\n // Try to get caller information from the call\n let caller: CallMember | undefined;\n let members: CallMember[] = [];\n\n try {\n // Get call details\n const callDetails = await this.currentCall.get();\n\n if (callDetails?.call?.created_by) {\n caller = {\n userId: callDetails.call.created_by.id,\n name: callDetails.call.created_by.name,\n imageURL: callDetails.call.created_by.image,\n role: callDetails.call.created_by.role,\n };\n }\n\n // Get current participants\n if (this.currentCall.state.participants) {\n members = this.currentCall.state.participants.map((participant: StreamVideoParticipant) => ({\n userId: participant.userId,\n name: participant.name,\n imageURL: participant.image,\n role: participant.roles?.[0],\n }));\n }\n } catch (error) {\n console.warn('Failed to get call details:', error);\n }\n\n return {\n callId: this.currentCall.id,\n state,\n caller,\n members,\n };\n }\n\n async getCallStatus(): Promise<CallEvent> {\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n\n const callingState = this.currentCall.state.callingState;\n let state: CallState;\n\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n\n return {\n callId: this.currentCall.id,\n state,\n };\n }\n\n async setDynamicStreamVideoApikey(_options: { apiKey: string }): Promise<SuccessResponse> {\n throw new Error('setDynamicStreamVideoApikey is not implemented on web platform');\n }\n\n async getDynamicStreamVideoApikey(): Promise<DynamicApiKeyResponse> {\n throw new Error('getDynamicStreamVideoApikey is not implemented on web platform');\n }\n\n async getCurrentUser(): Promise<CurrentUserResponse> {\n if (this.currentUser && this.client) {\n return {\n userId: this.currentUser.userId,\n name: this.currentUser.name,\n imageURL: this.currentUser.imageURL || '',\n isLoggedIn: true,\n };\n } else {\n return {\n userId: '',\n name: '',\n imageURL: '',\n isLoggedIn: false,\n };\n }\n }\n\n async getPluginVersion(): Promise<{ version: string }> {\n return { version: 'web' };\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +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.participantResponses = new Map();\n this.callMembersExpected = new Map();\n this.ringCallback = (event) => {\n var _a, _b, _c;\n console.log('Call ringing', event, this.currentCall);\n this.incomingCall = event.call;\n // Extract caller information\n let caller;\n if ((_a = event.call) === null || _a === void 0 ? void 0 : _a.created_by) {\n caller = {\n userId: event.call.created_by.id,\n name: event.call.created_by.name,\n imageURL: event.call.created_by.image,\n role: event.call.created_by.role,\n };\n }\n // if (!this.currentCall) {\n console.log('Creating new call', event.call.id);\n this.currentCall = (_b = this.client) === null || _b === void 0 ? void 0 : _b.call(event.call.type, event.call.id);\n // this.currentActiveCallId = this.currentCall?.cid;\n setTimeout(() => {\n this.notifyListeners('callEvent', {\n callId: event.call.id,\n state: CallingState.RINGING,\n caller,\n });\n }, 100);\n // Clear previous responses when a new call starts\n this.participantResponses.clear();\n // }\n if (this.currentCall) {\n console.log('Call found', this.currentCall.id);\n this.callStateSubscription = (_c = this.currentCall) === null || _c === void 0 ? void 0 : _c.state.callingState$.subscribe((s) => {\n var _a;\n console.log('Call state', s);\n if (s === CallingState.JOINED) {\n this.setupParticipantListener();\n this.setupCallEventListeners();\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 this.callSessionStartedCallback = (event) => {\n var _a, _b;\n console.log('Call created (session started)', event);\n if ((_b = (_a = event.call) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.participants) {\n // Store the number of expected participants for this call\n const callCid = event.call.cid;\n const memberCount = event.call.session.participants.length;\n console.log(`Call ${callCid} created with ${memberCount} members`);\n this.callMembersExpected.set(callCid, memberCount);\n // Store call members in callStates\n this.callStates.set(callCid, {\n members: event.call.session.participants.map((p) => { var _a; return ({ user_id: ((_a = p.user) === null || _a === void 0 ? void 0 : _a.id) || '' }); }),\n participantResponses: new Map(),\n expectedMemberCount: memberCount,\n createdAt: new Date(),\n });\n // Start a timeout task that runs every second\n const timeoutTask = setInterval(() => this.checkCallTimeout(callCid), 1000);\n // Update the callState with the timeout task\n const callState = this.callStates.get(callCid);\n if (callState) {\n callState.timer = timeoutTask;\n this.callStates.set(callCid, callState);\n }\n }\n };\n this.callRejectedCallback = (event) => {\n var _a;\n console.log('Call rejected', event);\n if ((_a = event.user) === null || _a === void 0 ? void 0 : _a.id) {\n this.participantResponses.set(event.user.id, 'rejected');\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'rejected');\n this.callStates.set(event.call_cid, callState);\n }\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'rejected',\n userId: event.user.id,\n });\n this.checkAllParticipantsResponded();\n }\n };\n this.callAcceptedCallback = (event) => {\n var _a;\n console.log('Call accepted', event);\n if ((_a = event.user) === null || _a === void 0 ? void 0 : _a.id) {\n this.participantResponses.set(event.user.id, 'accepted');\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'accepted');\n // If someone accepted, clear the timer as we don't need to check anymore\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n this.callStates.set(event.call_cid, callState);\n }\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'accepted',\n userId: event.user.id,\n });\n }\n };\n this.callMissedCallback = (event) => {\n var _a;\n console.log('Call missed', event);\n if ((_a = event.user) === null || _a === void 0 ? void 0 : _a.id) {\n this.participantResponses.set(event.user.id, 'missed');\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'missed');\n this.callStates.set(event.call_cid, callState);\n }\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'missed',\n userId: event.user.id,\n });\n this.checkAllParticipantsResponded();\n }\n };\n // Add a combined map for call states, mirroring the iOS implementation\n this.callStates = new Map();\n }\n // private currentActiveCallId?: string;\n setupCallRingListener() {\n var _a, _b, _c, _d;\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.off('call.session_started', this.callSessionStartedCallback);\n (_c = this.client) === null || _c === void 0 ? void 0 : _c.on('call.ring', this.ringCallback);\n (_d = this.client) === null || _d === void 0 ? void 0 : _d.on('call.session_started', this.callSessionStartedCallback);\n }\n setupCallEventListeners() {\n var _a, _b, _c, _d, _e, _f;\n // Clear previous listeners if any\n (_a = this.client) === null || _a === void 0 ? void 0 : _a.off('call.rejected', this.callRejectedCallback);\n (_b = this.client) === null || _b === void 0 ? void 0 : _b.off('call.accepted', this.callAcceptedCallback);\n (_c = this.client) === null || _c === void 0 ? void 0 : _c.off('call.missed', this.callMissedCallback);\n // Register event listeners\n (_d = this.client) === null || _d === void 0 ? void 0 : _d.on('call.rejected', this.callRejectedCallback);\n (_e = this.client) === null || _e === void 0 ? void 0 : _e.on('call.accepted', this.callAcceptedCallback);\n (_f = this.client) === null || _f === void 0 ? void 0 : _f.on('call.missed', this.callMissedCallback);\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 var _a, _b, _c;\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 });\n }\n videoEl.srcObject = null;\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 });\n }\n audioEl.srcObject = null;\n audioEl.remove();\n }\n }\n // Check if we're the only participant left in the call\n if ((_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.state.session) {\n // Get the remaining participants count (we need to subtract 1 as we haven't been removed from the list yet)\n const remainingParticipants = this.currentCall.state.session.participants.length - 1;\n // If we're the only one left, end the call\n if (remainingParticipants <= 1) {\n console.log(`We are left solo in a call. Ending. cID: ${this.currentCall.cid}`);\n // End the call\n this.currentCall.leave();\n // Clean up resources\n const callCid = this.currentCall.cid;\n // Invalidate and remove timer\n const callState = (_b = this.callStates) === null || _b === void 0 ? void 0 : _b.get(callCid);\n if (callState === null || callState === void 0 ? void 0 : callState.timer) {\n clearInterval(callState.timer);\n }\n // Remove from callStates\n (_c = this.callStates) === null || _c === void 0 ? void 0 : _c.delete(callCid);\n // Reset the current call\n this.currentCall = undefined;\n // this.currentActiveCallId = undefined;\n // Clean up\n this.cleanupCall();\n console.log(`Cleaned up resources for ended call: ${callCid}`);\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'left',\n reason: 'participant_left',\n });\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 checkCallTimeout(callCid) {\n const callState = this.callStates.get(callCid);\n if (!callState)\n return;\n // Calculate time elapsed since call creation\n const now = new Date();\n const elapsedSeconds = (now.getTime() - callState.createdAt.getTime()) / 1000;\n // Check if 30 seconds have passed\n if (elapsedSeconds >= 30) {\n console.log(`Call ${callCid} has timed out after ${elapsedSeconds} seconds`);\n // Check if anyone has accepted\n const hasAccepted = Array.from(callState.participantResponses.values()).some((response) => response === 'accepted');\n if (!hasAccepted) {\n console.log(`No one accepted call ${callCid}, marking all non-responders as missed`);\n // Mark all members who haven't responded as \"missed\"\n callState.members.forEach((member) => {\n if (!callState.participantResponses.has(member.user_id)) {\n callState.participantResponses.set(member.user_id, 'missed');\n this.participantResponses.set(member.user_id, 'missed');\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'missed',\n userId: member.user_id,\n });\n }\n });\n // End the call\n if (this.currentCall && this.currentCall.cid === callCid) {\n this.currentCall.leave();\n }\n // Clear the timeout task\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n // Remove from callStates\n this.callStates.delete(callCid);\n // Clean up\n this.cleanupCall();\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'timeout',\n });\n }\n }\n }\n checkAllParticipantsResponded() {\n if (!this.currentCall)\n return;\n const callCid = this.currentCall.cid;\n const totalParticipants = this.callMembersExpected.get(callCid);\n if (!totalParticipants) {\n console.log(`No expected participant count found for call: ${callCid}`);\n return;\n }\n console.log(`Total expected participants: ${totalParticipants}`);\n // Count rejections and misses\n let rejectedOrMissedCount = 0;\n this.participantResponses.forEach((response) => {\n if (response === 'rejected' || response === 'missed') {\n rejectedOrMissedCount++;\n }\n });\n console.log(`Participants responded: ${this.participantResponses.size}/${totalParticipants}`);\n console.log(`Rejected or missed: ${rejectedOrMissedCount}`);\n const allResponded = this.participantResponses.size >= totalParticipants;\n const allRejectedOrMissed = allResponded &&\n Array.from(this.participantResponses.values()).every((response) => response === 'rejected' || response === 'missed');\n // If all participants have rejected or missed the call\n if (allResponded && allRejectedOrMissed) {\n console.log('All participants have rejected or missed the call');\n // End the call\n this.currentCall.leave();\n // Clean up the timer if exists in callStates\n const callState = this.callStates.get(callCid);\n if (callState === null || callState === void 0 ? void 0 : callState.timer) {\n clearInterval(callState.timer);\n }\n // Remove from callStates\n this.callStates.delete(callCid);\n // Clear the responses\n this.participantResponses.clear();\n // Clean up\n this.cleanupCall();\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'all_rejected_or_missed',\n });\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 // Store current user data\n this.currentUser = {\n userId: options.userId,\n name: options.name,\n imageURL: options.imageURL,\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.currentUser = 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 = options.userIds.map((userId) => ({ user_id: userId }));\n if (this.client.streamClient.userID && !options.userIds.includes(this.client.streamClient.userID)) {\n members.push({ user_id: this.client.streamClient.userID });\n }\n await call.getOrCreate({ data: { members, team: options.team } });\n // Store the expected member count for this call\n // -1, because we don't count the caller themselves\n this.callMembersExpected.set(call.cid, members.length);\n console.log(`Setting expected members for call ${call.cid}: ${members.length}`);\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 setSpeaker(options) {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n await this.currentCall.speaker.select(options.name);\n return { success: true };\n }\n async switchCamera(options) {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n if (options.camera === 'front') {\n await this.currentCall.camera.selectDirection('front');\n }\n else {\n await this.currentCall.camera.selectDirection('back');\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.reject();\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 async isCameraEnabled() {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n const enabled = await this.currentCall.camera.enabled;\n return { enabled };\n }\n async getCallInfo(options) {\n var _a;\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n if (this.currentCall.id !== options.callId) {\n throw new Error('Call ID does not match active call');\n }\n const callingState = this.currentCall.state.callingState;\n let state;\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n // Try to get caller information from the call\n let caller;\n let members = [];\n try {\n // Get call details\n const callDetails = await this.currentCall.get();\n if ((_a = callDetails === null || callDetails === void 0 ? void 0 : callDetails.call) === null || _a === void 0 ? void 0 : _a.created_by) {\n caller = {\n userId: callDetails.call.created_by.id,\n name: callDetails.call.created_by.name,\n imageURL: callDetails.call.created_by.image,\n role: callDetails.call.created_by.role,\n };\n }\n // Get current participants\n if (this.currentCall.state.participants) {\n members = this.currentCall.state.participants.map((participant) => {\n var _a;\n return ({\n userId: participant.userId,\n name: participant.name,\n imageURL: participant.image,\n role: (_a = participant.roles) === null || _a === void 0 ? void 0 : _a[0],\n });\n });\n }\n }\n catch (error) {\n console.warn('Failed to get call details:', error);\n }\n return {\n callId: this.currentCall.id,\n state,\n caller,\n members,\n };\n }\n async getCallStatus() {\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n const callingState = this.currentCall.state.callingState;\n let state;\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n return {\n callId: this.currentCall.id,\n state,\n };\n }\n async setDynamicStreamVideoApikey(_options) {\n throw new Error('setDynamicStreamVideoApikey is not implemented on web platform');\n }\n async getDynamicStreamVideoApikey() {\n throw new Error('getDynamicStreamVideoApikey is not implemented on web platform');\n }\n async getCurrentUser() {\n if (this.currentUser && this.client) {\n return {\n userId: this.currentUser.userId,\n name: this.currentUser.name,\n imageURL: this.currentUser.imageURL || '',\n isLoggedIn: true,\n };\n }\n else {\n return {\n userId: '',\n name: '',\n imageURL: '',\n isLoggedIn: false,\n };\n }\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,EAAE,CAAC;AACjE,CAAC;;ACDM,MAAM,aAAa,SAASC,cAAS,CAAC;AAC7C,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,CAAC,GAAG,SAAS,CAAC;AAC3B,QAAQ,IAAI,CAAC,aAAa,GAAG,IAAI,GAAG,EAAE;AACtC,QAAQ,IAAI,CAAC,aAAa,GAAG,IAAI,GAAG,EAAE;AACtC,QAAQ,IAAI,CAAC,oBAAoB,GAAG,IAAI,GAAG,EAAE;AAC7C,QAAQ,IAAI,CAAC,mBAAmB,GAAG,IAAI,GAAG,EAAE;AAC5C,QAAQ,IAAI,CAAC,YAAY,GAAG,CAAC,KAAK,KAAK;AACvC,YAAY,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE;AAC1B,YAAY,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC;AAChE,YAAY,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,IAAI;AAC1C;AACA,YAAY,IAAI,MAAM;AACtB,YAAY,IAAI,CAAC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ACnB,gBAAgB,MAAM,EAAE,EAAE;AAC1B,gBAAgB,IAAI,EAAE,EAAE;AACxB,gBAAgB,QAAQ,EAAE,EAAE;AAC5B,gBAAgB,UAAU,EAAE,KAAK;AACjC,aAAa;AACb,QAAQ;AACR,IAAI;AACJ;;;;;;;;;"}
|
|
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.participantResponses = new Map();\n this.callMembersExpected = new Map();\n this.ringCallback = (event) => {\n var _a, _b, _c;\n console.log('Call ringing', event, this.currentCall);\n this.incomingCall = event.call;\n // Extract caller information\n let caller;\n if ((_a = event.call) === null || _a === void 0 ? void 0 : _a.created_by) {\n caller = {\n userId: event.call.created_by.id,\n name: event.call.created_by.name,\n imageURL: event.call.created_by.image,\n role: event.call.created_by.role,\n };\n }\n // if (!this.currentCall) {\n console.log('Creating new call', event.call.id);\n this.currentCall = (_b = this.client) === null || _b === void 0 ? void 0 : _b.call(event.call.type, event.call.id);\n // this.currentActiveCallId = this.currentCall?.cid;\n setTimeout(() => {\n this.notifyListeners('callEvent', {\n callId: event.call.id,\n state: CallingState.RINGING,\n caller,\n });\n }, 100);\n // Clear previous responses when a new call starts\n this.participantResponses.clear();\n // }\n if (this.currentCall) {\n console.log('Call found', this.currentCall.id);\n this.callStateSubscription = (_c = this.currentCall) === null || _c === void 0 ? void 0 : _c.state.callingState$.subscribe((s) => {\n var _a;\n console.log('Call state', s);\n if (s === CallingState.JOINED) {\n this.setupParticipantListener();\n this.setupCallEventListeners();\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 this.callSessionStartedCallback = (event) => {\n var _a, _b;\n console.log('Call created (session started)', event);\n if ((_b = (_a = event.call) === null || _a === void 0 ? void 0 : _a.session) === null || _b === void 0 ? void 0 : _b.participants) {\n // Store the number of expected participants for this call\n const callCid = event.call.cid;\n const memberCount = event.call.session.participants.length;\n console.log(`Call ${callCid} created with ${memberCount} members`);\n this.callMembersExpected.set(callCid, memberCount);\n // Store call members in callStates\n this.callStates.set(callCid, {\n members: event.call.session.participants.map((p) => { var _a; return ({ user_id: ((_a = p.user) === null || _a === void 0 ? void 0 : _a.id) || '' }); }),\n participantResponses: new Map(),\n expectedMemberCount: memberCount,\n createdAt: new Date(),\n });\n // Start a timeout task that runs every second\n const timeoutTask = setInterval(() => this.checkCallTimeout(callCid), 1000);\n // Update the callState with the timeout task\n const callState = this.callStates.get(callCid);\n if (callState) {\n callState.timer = timeoutTask;\n this.callStates.set(callCid, callState);\n }\n }\n };\n this.callRejectedCallback = (event) => {\n var _a;\n console.log('Call rejected', event);\n if ((_a = event.user) === null || _a === void 0 ? void 0 : _a.id) {\n this.participantResponses.set(event.user.id, 'rejected');\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'rejected');\n this.callStates.set(event.call_cid, callState);\n }\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'rejected',\n userId: event.user.id,\n });\n this.checkAllParticipantsResponded();\n }\n };\n this.callAcceptedCallback = (event) => {\n var _a;\n console.log('Call accepted', event);\n if ((_a = event.user) === null || _a === void 0 ? void 0 : _a.id) {\n this.participantResponses.set(event.user.id, 'accepted');\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'accepted');\n // If someone accepted, clear the timer as we don't need to check anymore\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n this.callStates.set(event.call_cid, callState);\n }\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'accepted',\n userId: event.user.id,\n });\n }\n };\n this.callMissedCallback = (event) => {\n var _a;\n console.log('Call missed', event);\n if ((_a = event.user) === null || _a === void 0 ? void 0 : _a.id) {\n this.participantResponses.set(event.user.id, 'missed');\n // Update the combined callStates map\n const callState = this.callStates.get(event.call_cid);\n if (callState) {\n callState.participantResponses.set(event.user.id, 'missed');\n this.callStates.set(event.call_cid, callState);\n }\n this.notifyListeners('callEvent', {\n callId: event.call_cid,\n state: 'missed',\n userId: event.user.id,\n });\n this.checkAllParticipantsResponded();\n }\n };\n // Add a combined map for call states, mirroring the iOS implementation\n this.callStates = new Map();\n }\n // private currentActiveCallId?: string;\n setupCallRingListener() {\n var _a, _b, _c, _d;\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.off('call.session_started', this.callSessionStartedCallback);\n (_c = this.client) === null || _c === void 0 ? void 0 : _c.on('call.ring', this.ringCallback);\n (_d = this.client) === null || _d === void 0 ? void 0 : _d.on('call.session_started', this.callSessionStartedCallback);\n }\n setupCallEventListeners() {\n var _a, _b, _c, _d, _e, _f;\n // Clear previous listeners if any\n (_a = this.client) === null || _a === void 0 ? void 0 : _a.off('call.rejected', this.callRejectedCallback);\n (_b = this.client) === null || _b === void 0 ? void 0 : _b.off('call.accepted', this.callAcceptedCallback);\n (_c = this.client) === null || _c === void 0 ? void 0 : _c.off('call.missed', this.callMissedCallback);\n // Register event listeners\n (_d = this.client) === null || _d === void 0 ? void 0 : _d.on('call.rejected', this.callRejectedCallback);\n (_e = this.client) === null || _e === void 0 ? void 0 : _e.on('call.accepted', this.callAcceptedCallback);\n (_f = this.client) === null || _f === void 0 ? void 0 : _f.on('call.missed', this.callMissedCallback);\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 var _a, _b, _c;\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 });\n }\n videoEl.srcObject = null;\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 });\n }\n audioEl.srcObject = null;\n audioEl.remove();\n }\n }\n // Check if we're the only participant left in the call\n if ((_a = this.currentCall) === null || _a === void 0 ? void 0 : _a.state.session) {\n // Get the remaining participants count (we need to subtract 1 as we haven't been removed from the list yet)\n const remainingParticipants = this.currentCall.state.session.participants.length - 1;\n // If we're the only one left, end the call\n if (remainingParticipants <= 1) {\n console.log(`We are left solo in a call. Ending. cID: ${this.currentCall.cid}`);\n // End the call\n this.currentCall.leave();\n // Clean up resources\n const callCid = this.currentCall.cid;\n // Invalidate and remove timer\n const callState = (_b = this.callStates) === null || _b === void 0 ? void 0 : _b.get(callCid);\n if (callState === null || callState === void 0 ? void 0 : callState.timer) {\n clearInterval(callState.timer);\n }\n // Remove from callStates\n (_c = this.callStates) === null || _c === void 0 ? void 0 : _c.delete(callCid);\n // Reset the current call\n this.currentCall = undefined;\n // this.currentActiveCallId = undefined;\n // Clean up\n this.cleanupCall();\n console.log(`Cleaned up resources for ended call: ${callCid}`);\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'left',\n reason: 'participant_left',\n });\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 checkCallTimeout(callCid) {\n const callState = this.callStates.get(callCid);\n if (!callState)\n return;\n // Calculate time elapsed since call creation\n const now = new Date();\n const elapsedSeconds = (now.getTime() - callState.createdAt.getTime()) / 1000;\n // Check if 30 seconds have passed\n if (elapsedSeconds >= 30) {\n console.log(`Call ${callCid} has timed out after ${elapsedSeconds} seconds`);\n // Check if anyone has accepted\n const hasAccepted = Array.from(callState.participantResponses.values()).some((response) => response === 'accepted');\n if (!hasAccepted) {\n console.log(`No one accepted call ${callCid}, marking all non-responders as missed`);\n // Mark all members who haven't responded as \"missed\"\n callState.members.forEach((member) => {\n if (!callState.participantResponses.has(member.user_id)) {\n callState.participantResponses.set(member.user_id, 'missed');\n this.participantResponses.set(member.user_id, 'missed');\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'missed',\n userId: member.user_id,\n });\n }\n });\n // End the call\n if (this.currentCall && this.currentCall.cid === callCid) {\n this.currentCall.leave();\n }\n // Clear the timeout task\n if (callState.timer) {\n clearInterval(callState.timer);\n callState.timer = undefined;\n }\n // Remove from callStates\n this.callStates.delete(callCid);\n // Clean up\n this.cleanupCall();\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'timeout',\n });\n }\n }\n }\n checkAllParticipantsResponded() {\n if (!this.currentCall)\n return;\n const callCid = this.currentCall.cid;\n const totalParticipants = this.callMembersExpected.get(callCid);\n if (!totalParticipants) {\n console.log(`No expected participant count found for call: ${callCid}`);\n return;\n }\n console.log(`Total expected participants: ${totalParticipants}`);\n // Count rejections and misses\n let rejectedOrMissedCount = 0;\n this.participantResponses.forEach((response) => {\n if (response === 'rejected' || response === 'missed') {\n rejectedOrMissedCount++;\n }\n });\n console.log(`Participants responded: ${this.participantResponses.size}/${totalParticipants}`);\n console.log(`Rejected or missed: ${rejectedOrMissedCount}`);\n const allResponded = this.participantResponses.size >= totalParticipants;\n const allRejectedOrMissed = allResponded &&\n Array.from(this.participantResponses.values()).every((response) => response === 'rejected' || response === 'missed');\n // If all participants have rejected or missed the call\n if (allResponded && allRejectedOrMissed) {\n console.log('All participants have rejected or missed the call');\n // End the call\n this.currentCall.leave();\n // Clean up the timer if exists in callStates\n const callState = this.callStates.get(callCid);\n if (callState === null || callState === void 0 ? void 0 : callState.timer) {\n clearInterval(callState.timer);\n }\n // Remove from callStates\n this.callStates.delete(callCid);\n // Clear the responses\n this.participantResponses.clear();\n // Clean up\n this.cleanupCall();\n // Notify that the call has ended\n this.notifyListeners('callEvent', {\n callId: callCid,\n state: 'ended',\n reason: 'all_rejected_or_missed',\n });\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 // Store current user data\n this.currentUser = {\n userId: options.userId,\n name: options.name,\n imageURL: options.imageURL,\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.currentUser = 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 = options.userIds.map((userId) => ({ user_id: userId }));\n if (this.client.streamClient.userID && !options.userIds.includes(this.client.streamClient.userID)) {\n members.push({ user_id: this.client.streamClient.userID });\n }\n await call.getOrCreate({ data: { members, team: options.team } });\n // Store the expected member count for this call\n // -1, because we don't count the caller themselves\n this.callMembersExpected.set(call.cid, members.length);\n console.log(`Setting expected members for call ${call.cid}: ${members.length}`);\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 setSpeaker(options) {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n await this.currentCall.speaker.select(options.name);\n return { success: true };\n }\n async switchCamera(options) {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n if (options.camera === 'front') {\n await this.currentCall.camera.selectDirection('front');\n }\n else {\n await this.currentCall.camera.selectDirection('back');\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.reject();\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 async isCameraEnabled() {\n if (!this.currentCall) {\n console.log('No active call', this.currentCall);\n throw new Error('No active call');\n }\n const enabled = await this.currentCall.camera.enabled;\n return { enabled };\n }\n async getCallInfo(options) {\n var _a;\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n if (this.currentCall.id !== options.callId) {\n throw new Error('Call ID does not match active call');\n }\n const callingState = this.currentCall.state.callingState;\n let state;\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n // Try to get caller information from the call\n let caller;\n let members = [];\n try {\n // Get call details\n const callDetails = await this.currentCall.get();\n if ((_a = callDetails === null || callDetails === void 0 ? void 0 : callDetails.call) === null || _a === void 0 ? void 0 : _a.created_by) {\n caller = {\n userId: callDetails.call.created_by.id,\n name: callDetails.call.created_by.name,\n imageURL: callDetails.call.created_by.image,\n role: callDetails.call.created_by.role,\n };\n }\n // Get current participants\n if (this.currentCall.state.participants) {\n members = this.currentCall.state.participants.map((participant) => {\n var _a;\n return ({\n userId: participant.userId,\n name: participant.name,\n imageURL: participant.image,\n role: (_a = participant.roles) === null || _a === void 0 ? void 0 : _a[0],\n });\n });\n }\n }\n catch (error) {\n console.warn('Failed to get call details:', error);\n }\n return {\n callId: this.currentCall.id,\n state,\n caller,\n members,\n };\n }\n async getCallStatus() {\n if (!this.currentCall) {\n throw new Error('No active call');\n }\n const callingState = this.currentCall.state.callingState;\n let state;\n switch (callingState) {\n case CallingState.IDLE:\n state = 'idle';\n break;\n case CallingState.RINGING:\n state = 'ringing';\n break;\n case CallingState.JOINING:\n state = 'joining';\n break;\n case CallingState.RECONNECTING:\n state = 'reconnecting';\n break;\n case CallingState.JOINED:\n state = 'joined';\n break;\n case CallingState.LEFT:\n state = 'left';\n break;\n default:\n state = 'unknown';\n }\n return {\n callId: this.currentCall.id,\n state,\n };\n }\n async setDynamicStreamVideoApikey(_options) {\n throw new Error('setDynamicStreamVideoApikey is not implemented on web platform');\n }\n async getDynamicStreamVideoApikey() {\n throw new Error('getDynamicStreamVideoApikey is not implemented on web platform');\n }\n async getCurrentUser() {\n if (this.currentUser && this.client) {\n return {\n userId: this.currentUser.userId,\n name: this.currentUser.name,\n imageURL: this.currentUser.imageURL || '',\n isLoggedIn: true,\n };\n }\n else {\n return {\n userId: '',\n name: '',\n imageURL: '',\n isLoggedIn: false,\n };\n }\n }\n async getPluginVers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