DMCallSignaling Service
File: src/services/DMCallSignaling.ts
Overview
Exports
- CallSignal - interface export
- ActiveCall - interface export
- FederatedCallInfo - interface export
- dmCallSignaling - const export
Classes
DMCallSignalingService
No description available.
Methods:
sendSignalinitiateCallsendSignalToUserhandleCallTimeoutacceptCalldeclineCallendCalljoinCallleaveCallgetActiveCallhasActiveCallgetCallParticipantsinitiateFederatedCallcatchacceptFederatedCalldeclineFederatedCallendFederatedCallhandleFederatedCallTimeoutisFederatedCallcleanup
Properties:
channelsactiveCallslistenersCALL_TIMEOUT_MSconversationonSignalchannelNamelistenerexistchanneleventsignaltypefromcallTypestatuspayloadtimeoutconversationIdcallerIdreceiverIdstimestamptimertimeoutTimercallchannelIdparticipantsstartedAttempChanneluserreasonuserIdansweredundefinedcallerexistscallsMETHODSRealtimecallerFederatedIdcalleeFederatedIdtobackendconfigResponseconfignullroomNameroomdatatokenResponsemethodheadersbodyroomTypeActivityPubinviteResponselivekitUrlcallInfocallerInstanceUrlisFederatedtokenwsUrlinstanceinfootherParticipantFederatedIdringingonIncomingCallcallIdcallerNamecallerAvataracceptedstaterejectedendedfederatedfalsetimers
Interfaces
CallSignal
No description available.
typescript
interface CallSignal {
type: 'initiate' | 'accept' | 'decline' | 'end' | 'join' | 'leave' | 'busy' | 'timeout'
callerId: string
callType: 'voice' | 'video'
timestamp: number
conversationId: string
reason?: 'timeout' | 'busy' | 'blocked' | 'dnd' // Decline/busy reasons
// Federated call fields
isFederated?: boolean
callerFederatedId?: string
livekitUrl?: string
roomName?: string
}ActiveCall
No description available.
typescript
interface ActiveCall {
conversationId: string
channelId: string // dm-{conversationId}
callType: 'voice' | 'video'
callerId: string
participants: string[] // user IDs currently in call
startedAt: Date
timeoutTimer?: number // Timer ID for call timeout
// Federated call fields
isFederated?: boolean
callerFederatedId?: string
calleeFederatedId?: string
livekitUrl?: string
roomName?: string
}FederatedCallInfo
No description available.
typescript
interface FederatedCallInfo {
callerFederatedId: string
calleeFederatedId: string
callerInstanceUrl: string
livekitUrl: string
roomName: string
}Source Code Insights
File Size: 21483 characters Lines of Code: 766 Imports: 3
Usage Example
typescript
import { CallSignal, ActiveCall, FederatedCallInfo, dmCallSignaling } from '@/services/DMCallSignaling'
// Example usage
// Use the exported functionalityThis documentation was automatically generated from the source code.
