vg-x07df 1.9.5 → 1.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel/index.cjs.map +1 -1
- package/dist/channel/index.d.cts +1 -1
- package/dist/channel/index.d.ts +1 -1
- package/dist/channel/index.mjs.map +1 -1
- package/dist/index.cjs +121 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +39 -5
- package/dist/index.d.ts +39 -5
- package/dist/index.mjs +121 -10
- package/dist/index.mjs.map +1 -1
- package/dist/{types-CCWG5LpL.d.cts → types-BbdWZE4Y.d.cts} +1 -1
- package/dist/{types-CCWG5LpL.d.ts → types-BbdWZE4Y.d.ts} +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { Socket } from 'socket.io-client';
|
|
3
3
|
import * as immer from 'immer';
|
|
4
4
|
import * as zustand from 'zustand';
|
|
5
|
-
import { R as RtcState, a as RtcError, I as IncomingInvite, O as OutgoingInvite, P as ParticipantMetadata, L as LiveKitJoinInfo, b as ParticipantPermissions, c as Profile, d as ParticipantListOptions, e as ParticipantListReturn, f as RecordingInfo, G as GuestIdentity } from './types-
|
|
6
|
-
export { M as MeetingInfo, S as Session, g as SessionType } from './types-
|
|
5
|
+
import { R as RtcState, a as RtcError, I as IncomingInvite, O as OutgoingInvite, P as ParticipantMetadata, L as LiveKitJoinInfo, b as ParticipantPermissions, c as Profile, d as ParticipantListOptions, e as ParticipantListReturn, f as RecordingInfo, G as GuestIdentity } from './types-BbdWZE4Y.cjs';
|
|
6
|
+
export { M as MeetingInfo, S as Session, g as SessionType } from './types-BbdWZE4Y.cjs';
|
|
7
7
|
import { L as LogLevel, D as DurationResult, N as Nullable$1 } from './duration-DvuGtU76.cjs';
|
|
8
8
|
import { Room, RemoteParticipant, LocalParticipant, RoomOptions, Participant } from 'livekit-client';
|
|
9
9
|
export { U as UseVirtualBackgroundOptions, u as useVirtualBackground } from './useVirtualBackground-DInTzJ4F.cjs';
|
|
@@ -63,6 +63,7 @@ declare class GuestAuthManager {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
type PresenceStatus = "online" | "offline" | "busy";
|
|
66
|
+
type PresenceResolvedStatus = PresenceStatus | "unknown";
|
|
66
67
|
interface UserPresence {
|
|
67
68
|
userId: string;
|
|
68
69
|
status: PresenceStatus;
|
|
@@ -1316,15 +1317,25 @@ declare const useScreenShare: () => {
|
|
|
1316
1317
|
handleStopScreenShare: () => Promise<void>;
|
|
1317
1318
|
};
|
|
1318
1319
|
|
|
1319
|
-
|
|
1320
|
+
interface UsePresenceOptions {
|
|
1321
|
+
pollIntervalMs?: number;
|
|
1322
|
+
}
|
|
1323
|
+
declare function usePresence(userId: string, options?: UsePresenceOptions): {
|
|
1320
1324
|
presence: UserPresence | undefined;
|
|
1321
1325
|
status: PresenceStatus | undefined;
|
|
1326
|
+
resolvedStatus: PresenceResolvedStatus | undefined;
|
|
1322
1327
|
isLoading: boolean;
|
|
1328
|
+
error: unknown;
|
|
1323
1329
|
refetch: () => Promise<void>;
|
|
1324
1330
|
};
|
|
1325
|
-
|
|
1331
|
+
interface UsePresenceManyOptions {
|
|
1332
|
+
pollIntervalMs?: number;
|
|
1333
|
+
}
|
|
1334
|
+
declare function usePresenceMany(userIds: string[], options?: UsePresenceManyOptions): {
|
|
1326
1335
|
presences: Map<string, UserPresence>;
|
|
1327
1336
|
isLoading: boolean;
|
|
1337
|
+
error: unknown;
|
|
1338
|
+
getStatus: (userId: string) => PresenceResolvedStatus | undefined;
|
|
1328
1339
|
refetch: () => Promise<void>;
|
|
1329
1340
|
};
|
|
1330
1341
|
|
|
@@ -1604,17 +1615,40 @@ type CallParticipantAddedEvent = z.infer<typeof callParticipantAddedSchema>;
|
|
|
1604
1615
|
declare const callParticipantKickedSchema: z.ZodObject<{
|
|
1605
1616
|
callId: z.ZodString;
|
|
1606
1617
|
participantId: z.ZodString;
|
|
1618
|
+
userId: z.ZodString;
|
|
1607
1619
|
reason: z.ZodOptional<z.ZodString>;
|
|
1608
1620
|
}, "strict", z.ZodTypeAny, {
|
|
1609
1621
|
callId: string;
|
|
1622
|
+
userId: string;
|
|
1610
1623
|
participantId: string;
|
|
1611
1624
|
reason?: string | undefined;
|
|
1612
1625
|
}, {
|
|
1613
1626
|
callId: string;
|
|
1627
|
+
userId: string;
|
|
1614
1628
|
participantId: string;
|
|
1615
1629
|
reason?: string | undefined;
|
|
1616
1630
|
}>;
|
|
1617
1631
|
type CallParticipantKickedEvent = z.infer<typeof callParticipantKickedSchema>;
|
|
1632
|
+
declare const callParticipantLeftSchema: z.ZodObject<{
|
|
1633
|
+
callId: z.ZodString;
|
|
1634
|
+
userId: z.ZodString;
|
|
1635
|
+
participantId: z.ZodString;
|
|
1636
|
+
leftAt: z.ZodString;
|
|
1637
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
}, "strict", z.ZodTypeAny, {
|
|
1639
|
+
callId: string;
|
|
1640
|
+
userId: string;
|
|
1641
|
+
participantId: string;
|
|
1642
|
+
leftAt: string;
|
|
1643
|
+
reason?: string | undefined;
|
|
1644
|
+
}, {
|
|
1645
|
+
callId: string;
|
|
1646
|
+
userId: string;
|
|
1647
|
+
participantId: string;
|
|
1648
|
+
leftAt: string;
|
|
1649
|
+
reason?: string | undefined;
|
|
1650
|
+
}>;
|
|
1651
|
+
type CallParticipantLeftEvent = z.infer<typeof callParticipantLeftSchema>;
|
|
1618
1652
|
declare const callReadySchema: z.ZodObject<{
|
|
1619
1653
|
callId: z.ZodString;
|
|
1620
1654
|
participantId: z.ZodOptional<z.ZodString>;
|
|
@@ -1737,4 +1771,4 @@ declare function pushNetworkError(operation: string, error: unknown, logger?: (l
|
|
|
1737
1771
|
declare function pushMediaPermissionError(device: string, error?: unknown, logger?: (level: LogLevel, message: string, meta?: any) => void): void;
|
|
1738
1772
|
declare function pushDeviceError(operation: string, device: string, error: unknown, logger?: (level: LogLevel, message: string, meta?: any) => void): void;
|
|
1739
1773
|
|
|
1740
|
-
export { type ApiConfig, type AuthenticatedSdkOptions, type CallActionResponse, type CallEndedEvent, type CallInfo, type CallInviteAcceptedEvent, type CallInviteCancelledEvent, type CallInviteDeclinedEvent, type CallInviteEvent, type CallInviteMissedEvent, type CallMode, type CallParticipant, type CallParticipantAddedEvent, type CallParticipantKickedEvent, type CallReadyEvent, type CallRecordingStartedEvent, type CallRecordingStoppedEvent, type CallResponse, type CallStartedEvent, type CallState, type CallStateType, type CallsData, CallsService, type ConnectionState, type CreateAdHocMeetingParams, type EndMeetingResponse, type EndReason, type ErrorCode, type EventHandler, type EventSubscription, type GuestErrorCode, GuestIdentity, GuestJoinError, type GuestJoinMeetingParams, type GuestJoinParams, type GuestJoinResponse, type GuestRtcSdk, type GuestSdkOptions, type GuestSessionInfo, type HealthData, HealthService, type IncomingCallEvent, IncomingInvite, type InitiateCallParams$1 as InitiateCallParams, type JoinMeetingParams, LiveKitJoinInfo, type Meeting, type MeetingJoinInfo, type MeetingResponse, type MeetingState, type MeetingStatus, type MeetingsData, MeetingsService, OpenApiConfigService, OutgoingInvite, ParticipantMetadata, ParticipantPermissions, type ParticipantProfilesEvent, type PresenceConfig, type PresencePingEvent, type PresenceStatus, Profile, RecordingInfo, RtcError, type RtcOptions, RtcProvider, type RtcSdk, RtcState, type SdkBuildOptions, type SdkBuildOptionsBase, type SdkEvent, SdkEventType, SignalCallsService, SignalClient, type SignalClientConfig, type SignalClientOptions, SignalHealthService, SignalMeetingsService, SignalPresenceService, type UseGuestJoinReturn, type UseTerminateReturn, type UseTimeoutReturn, type UserPresence, apiConfig, buildGuestSdk, buildSdk, callEndedSchema, callInviteAcceptedSchema, callInviteCancelledSchema, callInviteDeclinedSchema, callInviteMissedSchema, callInviteSchema, callParticipantAddedSchema, callParticipantKickedSchema, callReadySchema, callRecordingStartedSchema, callRecordingStoppedSchema, callStartedSchema, clearErrors, eventBus, participantProfilesSchema, presencePingSchema, profileCache, pushApiError, pushDeviceError, pushError, pushIdentityGuardError, pushLiveKitConnectError, pushMediaPermissionError, pushNetworkError, pushSocketValidationError, pushStaleEventError, recordingStore, useAutoConnectRoom, useCallActions, useCallInitiated, useCallState, useConnectionState, useEvent, useGuestIdentity, useGuestJoin, useGuestPermissions, useGuestSdk, useHasActiveSession, useIncomingInvite, useInviteAccepted, useIsGuestMode, useIsProfilePending, useLivekitInfo, useMeeting, useMeetingActions, useMeetingState, useOutgoingInvites, useParticipantList, useParticipantMetadata, useParticipantPermissions, useParticipantProfile, usePresence, usePresenceMany, useProfileCache, useRecording, useRecordingStore, useRingTimeout, useRoomReady, useScreenShare, useSdk, useSessionDuration, useSessionId, useSignalClient, useTerminate, useTimeout, useTimeoutEffect };
|
|
1774
|
+
export { type ApiConfig, type AuthenticatedSdkOptions, type CallActionResponse, type CallEndedEvent, type CallInfo, type CallInviteAcceptedEvent, type CallInviteCancelledEvent, type CallInviteDeclinedEvent, type CallInviteEvent, type CallInviteMissedEvent, type CallMode, type CallParticipant, type CallParticipantAddedEvent, type CallParticipantKickedEvent, type CallParticipantLeftEvent, type CallReadyEvent, type CallRecordingStartedEvent, type CallRecordingStoppedEvent, type CallResponse, type CallStartedEvent, type CallState, type CallStateType, type CallsData, CallsService, type ConnectionState, type CreateAdHocMeetingParams, type EndMeetingResponse, type EndReason, type ErrorCode, type EventHandler, type EventSubscription, type GuestErrorCode, GuestIdentity, GuestJoinError, type GuestJoinMeetingParams, type GuestJoinParams, type GuestJoinResponse, type GuestRtcSdk, type GuestSdkOptions, type GuestSessionInfo, type HealthData, HealthService, type IncomingCallEvent, IncomingInvite, type InitiateCallParams$1 as InitiateCallParams, type JoinMeetingParams, LiveKitJoinInfo, type Meeting, type MeetingJoinInfo, type MeetingResponse, type MeetingState, type MeetingStatus, type MeetingsData, MeetingsService, OpenApiConfigService, OutgoingInvite, ParticipantMetadata, ParticipantPermissions, type ParticipantProfilesEvent, type PresenceConfig, type PresencePingEvent, type PresenceStatus, Profile, RecordingInfo, RtcError, type RtcOptions, RtcProvider, type RtcSdk, RtcState, type SdkBuildOptions, type SdkBuildOptionsBase, type SdkEvent, SdkEventType, SignalCallsService, SignalClient, type SignalClientConfig, type SignalClientOptions, SignalHealthService, SignalMeetingsService, SignalPresenceService, type UseGuestJoinReturn, type UsePresenceManyOptions, type UsePresenceOptions, type UseTerminateReturn, type UseTimeoutReturn, type UserPresence, apiConfig, buildGuestSdk, buildSdk, callEndedSchema, callInviteAcceptedSchema, callInviteCancelledSchema, callInviteDeclinedSchema, callInviteMissedSchema, callInviteSchema, callParticipantAddedSchema, callParticipantKickedSchema, callParticipantLeftSchema, callReadySchema, callRecordingStartedSchema, callRecordingStoppedSchema, callStartedSchema, clearErrors, eventBus, participantProfilesSchema, presencePingSchema, profileCache, pushApiError, pushDeviceError, pushError, pushIdentityGuardError, pushLiveKitConnectError, pushMediaPermissionError, pushNetworkError, pushSocketValidationError, pushStaleEventError, recordingStore, useAutoConnectRoom, useCallActions, useCallInitiated, useCallState, useConnectionState, useEvent, useGuestIdentity, useGuestJoin, useGuestPermissions, useGuestSdk, useHasActiveSession, useIncomingInvite, useInviteAccepted, useIsGuestMode, useIsProfilePending, useLivekitInfo, useMeeting, useMeetingActions, useMeetingState, useOutgoingInvites, useParticipantList, useParticipantMetadata, useParticipantPermissions, useParticipantProfile, usePresence, usePresenceMany, useProfileCache, useRecording, useRecordingStore, useRingTimeout, useRoomReady, useScreenShare, useSdk, useSessionDuration, useSessionId, useSignalClient, useTerminate, useTimeout, useTimeoutEffect };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { Socket } from 'socket.io-client';
|
|
3
3
|
import * as immer from 'immer';
|
|
4
4
|
import * as zustand from 'zustand';
|
|
5
|
-
import { R as RtcState, a as RtcError, I as IncomingInvite, O as OutgoingInvite, P as ParticipantMetadata, L as LiveKitJoinInfo, b as ParticipantPermissions, c as Profile, d as ParticipantListOptions, e as ParticipantListReturn, f as RecordingInfo, G as GuestIdentity } from './types-
|
|
6
|
-
export { M as MeetingInfo, S as Session, g as SessionType } from './types-
|
|
5
|
+
import { R as RtcState, a as RtcError, I as IncomingInvite, O as OutgoingInvite, P as ParticipantMetadata, L as LiveKitJoinInfo, b as ParticipantPermissions, c as Profile, d as ParticipantListOptions, e as ParticipantListReturn, f as RecordingInfo, G as GuestIdentity } from './types-BbdWZE4Y.js';
|
|
6
|
+
export { M as MeetingInfo, S as Session, g as SessionType } from './types-BbdWZE4Y.js';
|
|
7
7
|
import { L as LogLevel, D as DurationResult, N as Nullable$1 } from './duration-DvuGtU76.js';
|
|
8
8
|
import { Room, RemoteParticipant, LocalParticipant, RoomOptions, Participant } from 'livekit-client';
|
|
9
9
|
export { U as UseVirtualBackgroundOptions, u as useVirtualBackground } from './useVirtualBackground-DInTzJ4F.js';
|
|
@@ -63,6 +63,7 @@ declare class GuestAuthManager {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
type PresenceStatus = "online" | "offline" | "busy";
|
|
66
|
+
type PresenceResolvedStatus = PresenceStatus | "unknown";
|
|
66
67
|
interface UserPresence {
|
|
67
68
|
userId: string;
|
|
68
69
|
status: PresenceStatus;
|
|
@@ -1316,15 +1317,25 @@ declare const useScreenShare: () => {
|
|
|
1316
1317
|
handleStopScreenShare: () => Promise<void>;
|
|
1317
1318
|
};
|
|
1318
1319
|
|
|
1319
|
-
|
|
1320
|
+
interface UsePresenceOptions {
|
|
1321
|
+
pollIntervalMs?: number;
|
|
1322
|
+
}
|
|
1323
|
+
declare function usePresence(userId: string, options?: UsePresenceOptions): {
|
|
1320
1324
|
presence: UserPresence | undefined;
|
|
1321
1325
|
status: PresenceStatus | undefined;
|
|
1326
|
+
resolvedStatus: PresenceResolvedStatus | undefined;
|
|
1322
1327
|
isLoading: boolean;
|
|
1328
|
+
error: unknown;
|
|
1323
1329
|
refetch: () => Promise<void>;
|
|
1324
1330
|
};
|
|
1325
|
-
|
|
1331
|
+
interface UsePresenceManyOptions {
|
|
1332
|
+
pollIntervalMs?: number;
|
|
1333
|
+
}
|
|
1334
|
+
declare function usePresenceMany(userIds: string[], options?: UsePresenceManyOptions): {
|
|
1326
1335
|
presences: Map<string, UserPresence>;
|
|
1327
1336
|
isLoading: boolean;
|
|
1337
|
+
error: unknown;
|
|
1338
|
+
getStatus: (userId: string) => PresenceResolvedStatus | undefined;
|
|
1328
1339
|
refetch: () => Promise<void>;
|
|
1329
1340
|
};
|
|
1330
1341
|
|
|
@@ -1604,17 +1615,40 @@ type CallParticipantAddedEvent = z.infer<typeof callParticipantAddedSchema>;
|
|
|
1604
1615
|
declare const callParticipantKickedSchema: z.ZodObject<{
|
|
1605
1616
|
callId: z.ZodString;
|
|
1606
1617
|
participantId: z.ZodString;
|
|
1618
|
+
userId: z.ZodString;
|
|
1607
1619
|
reason: z.ZodOptional<z.ZodString>;
|
|
1608
1620
|
}, "strict", z.ZodTypeAny, {
|
|
1609
1621
|
callId: string;
|
|
1622
|
+
userId: string;
|
|
1610
1623
|
participantId: string;
|
|
1611
1624
|
reason?: string | undefined;
|
|
1612
1625
|
}, {
|
|
1613
1626
|
callId: string;
|
|
1627
|
+
userId: string;
|
|
1614
1628
|
participantId: string;
|
|
1615
1629
|
reason?: string | undefined;
|
|
1616
1630
|
}>;
|
|
1617
1631
|
type CallParticipantKickedEvent = z.infer<typeof callParticipantKickedSchema>;
|
|
1632
|
+
declare const callParticipantLeftSchema: z.ZodObject<{
|
|
1633
|
+
callId: z.ZodString;
|
|
1634
|
+
userId: z.ZodString;
|
|
1635
|
+
participantId: z.ZodString;
|
|
1636
|
+
leftAt: z.ZodString;
|
|
1637
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
}, "strict", z.ZodTypeAny, {
|
|
1639
|
+
callId: string;
|
|
1640
|
+
userId: string;
|
|
1641
|
+
participantId: string;
|
|
1642
|
+
leftAt: string;
|
|
1643
|
+
reason?: string | undefined;
|
|
1644
|
+
}, {
|
|
1645
|
+
callId: string;
|
|
1646
|
+
userId: string;
|
|
1647
|
+
participantId: string;
|
|
1648
|
+
leftAt: string;
|
|
1649
|
+
reason?: string | undefined;
|
|
1650
|
+
}>;
|
|
1651
|
+
type CallParticipantLeftEvent = z.infer<typeof callParticipantLeftSchema>;
|
|
1618
1652
|
declare const callReadySchema: z.ZodObject<{
|
|
1619
1653
|
callId: z.ZodString;
|
|
1620
1654
|
participantId: z.ZodOptional<z.ZodString>;
|
|
@@ -1737,4 +1771,4 @@ declare function pushNetworkError(operation: string, error: unknown, logger?: (l
|
|
|
1737
1771
|
declare function pushMediaPermissionError(device: string, error?: unknown, logger?: (level: LogLevel, message: string, meta?: any) => void): void;
|
|
1738
1772
|
declare function pushDeviceError(operation: string, device: string, error: unknown, logger?: (level: LogLevel, message: string, meta?: any) => void): void;
|
|
1739
1773
|
|
|
1740
|
-
export { type ApiConfig, type AuthenticatedSdkOptions, type CallActionResponse, type CallEndedEvent, type CallInfo, type CallInviteAcceptedEvent, type CallInviteCancelledEvent, type CallInviteDeclinedEvent, type CallInviteEvent, type CallInviteMissedEvent, type CallMode, type CallParticipant, type CallParticipantAddedEvent, type CallParticipantKickedEvent, type CallReadyEvent, type CallRecordingStartedEvent, type CallRecordingStoppedEvent, type CallResponse, type CallStartedEvent, type CallState, type CallStateType, type CallsData, CallsService, type ConnectionState, type CreateAdHocMeetingParams, type EndMeetingResponse, type EndReason, type ErrorCode, type EventHandler, type EventSubscription, type GuestErrorCode, GuestIdentity, GuestJoinError, type GuestJoinMeetingParams, type GuestJoinParams, type GuestJoinResponse, type GuestRtcSdk, type GuestSdkOptions, type GuestSessionInfo, type HealthData, HealthService, type IncomingCallEvent, IncomingInvite, type InitiateCallParams$1 as InitiateCallParams, type JoinMeetingParams, LiveKitJoinInfo, type Meeting, type MeetingJoinInfo, type MeetingResponse, type MeetingState, type MeetingStatus, type MeetingsData, MeetingsService, OpenApiConfigService, OutgoingInvite, ParticipantMetadata, ParticipantPermissions, type ParticipantProfilesEvent, type PresenceConfig, type PresencePingEvent, type PresenceStatus, Profile, RecordingInfo, RtcError, type RtcOptions, RtcProvider, type RtcSdk, RtcState, type SdkBuildOptions, type SdkBuildOptionsBase, type SdkEvent, SdkEventType, SignalCallsService, SignalClient, type SignalClientConfig, type SignalClientOptions, SignalHealthService, SignalMeetingsService, SignalPresenceService, type UseGuestJoinReturn, type UseTerminateReturn, type UseTimeoutReturn, type UserPresence, apiConfig, buildGuestSdk, buildSdk, callEndedSchema, callInviteAcceptedSchema, callInviteCancelledSchema, callInviteDeclinedSchema, callInviteMissedSchema, callInviteSchema, callParticipantAddedSchema, callParticipantKickedSchema, callReadySchema, callRecordingStartedSchema, callRecordingStoppedSchema, callStartedSchema, clearErrors, eventBus, participantProfilesSchema, presencePingSchema, profileCache, pushApiError, pushDeviceError, pushError, pushIdentityGuardError, pushLiveKitConnectError, pushMediaPermissionError, pushNetworkError, pushSocketValidationError, pushStaleEventError, recordingStore, useAutoConnectRoom, useCallActions, useCallInitiated, useCallState, useConnectionState, useEvent, useGuestIdentity, useGuestJoin, useGuestPermissions, useGuestSdk, useHasActiveSession, useIncomingInvite, useInviteAccepted, useIsGuestMode, useIsProfilePending, useLivekitInfo, useMeeting, useMeetingActions, useMeetingState, useOutgoingInvites, useParticipantList, useParticipantMetadata, useParticipantPermissions, useParticipantProfile, usePresence, usePresenceMany, useProfileCache, useRecording, useRecordingStore, useRingTimeout, useRoomReady, useScreenShare, useSdk, useSessionDuration, useSessionId, useSignalClient, useTerminate, useTimeout, useTimeoutEffect };
|
|
1774
|
+
export { type ApiConfig, type AuthenticatedSdkOptions, type CallActionResponse, type CallEndedEvent, type CallInfo, type CallInviteAcceptedEvent, type CallInviteCancelledEvent, type CallInviteDeclinedEvent, type CallInviteEvent, type CallInviteMissedEvent, type CallMode, type CallParticipant, type CallParticipantAddedEvent, type CallParticipantKickedEvent, type CallParticipantLeftEvent, type CallReadyEvent, type CallRecordingStartedEvent, type CallRecordingStoppedEvent, type CallResponse, type CallStartedEvent, type CallState, type CallStateType, type CallsData, CallsService, type ConnectionState, type CreateAdHocMeetingParams, type EndMeetingResponse, type EndReason, type ErrorCode, type EventHandler, type EventSubscription, type GuestErrorCode, GuestIdentity, GuestJoinError, type GuestJoinMeetingParams, type GuestJoinParams, type GuestJoinResponse, type GuestRtcSdk, type GuestSdkOptions, type GuestSessionInfo, type HealthData, HealthService, type IncomingCallEvent, IncomingInvite, type InitiateCallParams$1 as InitiateCallParams, type JoinMeetingParams, LiveKitJoinInfo, type Meeting, type MeetingJoinInfo, type MeetingResponse, type MeetingState, type MeetingStatus, type MeetingsData, MeetingsService, OpenApiConfigService, OutgoingInvite, ParticipantMetadata, ParticipantPermissions, type ParticipantProfilesEvent, type PresenceConfig, type PresencePingEvent, type PresenceStatus, Profile, RecordingInfo, RtcError, type RtcOptions, RtcProvider, type RtcSdk, RtcState, type SdkBuildOptions, type SdkBuildOptionsBase, type SdkEvent, SdkEventType, SignalCallsService, SignalClient, type SignalClientConfig, type SignalClientOptions, SignalHealthService, SignalMeetingsService, SignalPresenceService, type UseGuestJoinReturn, type UsePresenceManyOptions, type UsePresenceOptions, type UseTerminateReturn, type UseTimeoutReturn, type UserPresence, apiConfig, buildGuestSdk, buildSdk, callEndedSchema, callInviteAcceptedSchema, callInviteCancelledSchema, callInviteDeclinedSchema, callInviteMissedSchema, callInviteSchema, callParticipantAddedSchema, callParticipantKickedSchema, callParticipantLeftSchema, callReadySchema, callRecordingStartedSchema, callRecordingStoppedSchema, callStartedSchema, clearErrors, eventBus, participantProfilesSchema, presencePingSchema, profileCache, pushApiError, pushDeviceError, pushError, pushIdentityGuardError, pushLiveKitConnectError, pushMediaPermissionError, pushNetworkError, pushSocketValidationError, pushStaleEventError, recordingStore, useAutoConnectRoom, useCallActions, useCallInitiated, useCallState, useConnectionState, useEvent, useGuestIdentity, useGuestJoin, useGuestPermissions, useGuestSdk, useHasActiveSession, useIncomingInvite, useInviteAccepted, useIsGuestMode, useIsProfilePending, useLivekitInfo, useMeeting, useMeetingActions, useMeetingState, useOutgoingInvites, useParticipantList, useParticipantMetadata, useParticipantPermissions, useParticipantProfile, usePresence, usePresenceMany, useProfileCache, useRecording, useRecordingStore, useRingTimeout, useRoomReady, useScreenShare, useSdk, useSessionDuration, useSessionId, useSignalClient, useTerminate, useTimeout, useTimeoutEffect };
|
package/dist/index.mjs
CHANGED
|
@@ -1906,6 +1906,14 @@ var callParticipantAddedSchema = z.object({
|
|
|
1906
1906
|
var callParticipantKickedSchema = z.object({
|
|
1907
1907
|
callId: z.string(),
|
|
1908
1908
|
participantId: z.string(),
|
|
1909
|
+
userId: z.string(),
|
|
1910
|
+
reason: z.string().optional()
|
|
1911
|
+
}).strict();
|
|
1912
|
+
var callParticipantLeftSchema = z.object({
|
|
1913
|
+
callId: z.string(),
|
|
1914
|
+
userId: z.string(),
|
|
1915
|
+
participantId: z.string(),
|
|
1916
|
+
leftAt: z.string(),
|
|
1909
1917
|
reason: z.string().optional()
|
|
1910
1918
|
}).strict();
|
|
1911
1919
|
var callReadySchema = z.object({
|
|
@@ -2265,8 +2273,14 @@ var CallParticipantKickedHandler = class extends BaseSocketHandler {
|
|
|
2265
2273
|
participantId: data.participantId,
|
|
2266
2274
|
reason: data.reason
|
|
2267
2275
|
});
|
|
2276
|
+
this.updateStore((state) => {
|
|
2277
|
+
if (data.userId && state.outgoingInvites[data.userId]) {
|
|
2278
|
+
delete state.outgoingInvites[data.userId];
|
|
2279
|
+
}
|
|
2280
|
+
});
|
|
2268
2281
|
this.logger.debug("Participant kicked from call", {
|
|
2269
|
-
participantId: data.participantId
|
|
2282
|
+
participantId: data.participantId,
|
|
2283
|
+
userId: data.userId
|
|
2270
2284
|
});
|
|
2271
2285
|
}
|
|
2272
2286
|
};
|
|
@@ -2473,6 +2487,12 @@ var InviteMissedHandler = class extends BaseSocketHandler {
|
|
|
2473
2487
|
userId: data.userId
|
|
2474
2488
|
});
|
|
2475
2489
|
if (currentState.session?.id !== data.callId) {
|
|
2490
|
+
this.logger.warn("Invite missed ignored due to session mismatch", {
|
|
2491
|
+
eventCallId: data.callId,
|
|
2492
|
+
sessionCallId: currentState.session?.id,
|
|
2493
|
+
hasSession: !!currentState.session,
|
|
2494
|
+
outgoingInviteKeys: Object.keys(currentState.outgoingInvites || {})
|
|
2495
|
+
});
|
|
2476
2496
|
pushStaleEventError("call:inviteMissed", "callId mismatch", {
|
|
2477
2497
|
eventCallId: data.callId,
|
|
2478
2498
|
sessionCallId: currentState.session?.id
|
|
@@ -2608,6 +2628,42 @@ var ParticipantAddedHandler = class extends BaseSocketHandler {
|
|
|
2608
2628
|
}
|
|
2609
2629
|
};
|
|
2610
2630
|
|
|
2631
|
+
// src/core/socketio/handlers/participant-left.handler.ts
|
|
2632
|
+
var ParticipantLeftHandler = class extends BaseSocketHandler {
|
|
2633
|
+
constructor() {
|
|
2634
|
+
super(...arguments);
|
|
2635
|
+
this.eventName = "call:participantLeft";
|
|
2636
|
+
this.schema = callParticipantLeftSchema;
|
|
2637
|
+
}
|
|
2638
|
+
handle(data) {
|
|
2639
|
+
const currentState = rtcStore.getState();
|
|
2640
|
+
this.logger.info("Participant left call", {
|
|
2641
|
+
callId: data.callId,
|
|
2642
|
+
userId: data.userId,
|
|
2643
|
+
participantId: data.participantId
|
|
2644
|
+
});
|
|
2645
|
+
if (currentState.session?.id !== data.callId) {
|
|
2646
|
+
pushStaleEventError("call:participantLeft", "callId mismatch", {
|
|
2647
|
+
eventCallId: data.callId,
|
|
2648
|
+
sessionCallId: currentState.session?.id
|
|
2649
|
+
});
|
|
2650
|
+
this.logger.warn("Ignoring participant left for different call", {
|
|
2651
|
+
callId: data.callId
|
|
2652
|
+
});
|
|
2653
|
+
return;
|
|
2654
|
+
}
|
|
2655
|
+
this.updateStore((state) => {
|
|
2656
|
+
if (state.outgoingInvites[data.userId]) {
|
|
2657
|
+
state.outgoingInvites[data.userId].status = "left";
|
|
2658
|
+
this.logger.info("Outgoing invite marked as left", {
|
|
2659
|
+
userId: data.userId,
|
|
2660
|
+
callId: data.callId
|
|
2661
|
+
});
|
|
2662
|
+
}
|
|
2663
|
+
});
|
|
2664
|
+
}
|
|
2665
|
+
};
|
|
2666
|
+
|
|
2611
2667
|
// src/core/socketio/handlers/participant-profiles.handler.ts
|
|
2612
2668
|
var ParticipantProfilesHandler = class extends BaseSocketHandler {
|
|
2613
2669
|
constructor() {
|
|
@@ -2785,6 +2841,7 @@ var SocketHandlerRegistry = class {
|
|
|
2785
2841
|
new InviteCancelledHandler(this.options),
|
|
2786
2842
|
// Participant management
|
|
2787
2843
|
new ParticipantAddedHandler(this.options),
|
|
2844
|
+
new ParticipantLeftHandler(this.options),
|
|
2788
2845
|
new CallParticipantKickedHandler(this.options),
|
|
2789
2846
|
// Profile hydration
|
|
2790
2847
|
new ParticipantProfilesHandler(this.options),
|
|
@@ -3623,6 +3680,10 @@ var LiveKitRoomManager = class {
|
|
|
3623
3680
|
this.detach();
|
|
3624
3681
|
rtcStore.getState().reset();
|
|
3625
3682
|
profileCache.getState().clear();
|
|
3683
|
+
recordingStore.getState().clear();
|
|
3684
|
+
useChatStore.getState().clearChat();
|
|
3685
|
+
useSpotlightStore.getState().clear();
|
|
3686
|
+
useRaiseHandStore.getState().clear();
|
|
3626
3687
|
}
|
|
3627
3688
|
};
|
|
3628
3689
|
|
|
@@ -3969,7 +4030,8 @@ function createPresenceService(config, deps) {
|
|
|
3969
4030
|
if (userIds.length === 0) {
|
|
3970
4031
|
return [];
|
|
3971
4032
|
}
|
|
3972
|
-
const
|
|
4033
|
+
const uniqueUserIds = Array.from(new Set(userIds));
|
|
4034
|
+
const cacheKey = [...uniqueUserIds].sort().join(",");
|
|
3973
4035
|
const existing = inFlight.get(cacheKey);
|
|
3974
4036
|
if (existing) {
|
|
3975
4037
|
logger7.debug("Reusing in-flight request", { cacheKey });
|
|
@@ -3977,7 +4039,7 @@ function createPresenceService(config, deps) {
|
|
|
3977
4039
|
}
|
|
3978
4040
|
const fetchPromise = (async () => {
|
|
3979
4041
|
try {
|
|
3980
|
-
const response = await signalPresence.queryPresence(
|
|
4042
|
+
const response = await signalPresence.queryPresence(uniqueUserIds);
|
|
3981
4043
|
return response.presence.map((p) => ({
|
|
3982
4044
|
userId: p.userId,
|
|
3983
4045
|
status: p.status,
|
|
@@ -5004,56 +5066,105 @@ var useScreenShare = () => {
|
|
|
5004
5066
|
handleStopScreenShare
|
|
5005
5067
|
};
|
|
5006
5068
|
};
|
|
5007
|
-
function usePresence(userId) {
|
|
5069
|
+
function usePresence(userId, options) {
|
|
5008
5070
|
const sdk = useSdk();
|
|
5009
5071
|
const [presence, setPresence] = useState();
|
|
5010
5072
|
const [isLoading, setIsLoading] = useState(false);
|
|
5073
|
+
const [error, setError] = useState(null);
|
|
5074
|
+
const isMountedRef = useRef(true);
|
|
5011
5075
|
const refetch = useCallback(async () => {
|
|
5012
5076
|
if (!userId) return;
|
|
5013
5077
|
setIsLoading(true);
|
|
5078
|
+
setError(null);
|
|
5014
5079
|
try {
|
|
5015
5080
|
const result = await sdk.presence.getPresence(userId);
|
|
5016
|
-
|
|
5081
|
+
if (isMountedRef.current) {
|
|
5082
|
+
setPresence(result);
|
|
5083
|
+
}
|
|
5084
|
+
} catch (err) {
|
|
5085
|
+
if (isMountedRef.current) {
|
|
5086
|
+
setError(err);
|
|
5087
|
+
}
|
|
5017
5088
|
} finally {
|
|
5018
|
-
|
|
5089
|
+
if (isMountedRef.current) {
|
|
5090
|
+
setIsLoading(false);
|
|
5091
|
+
}
|
|
5019
5092
|
}
|
|
5020
5093
|
}, [sdk, userId]);
|
|
5021
5094
|
useEffect(() => {
|
|
5022
5095
|
refetch();
|
|
5023
5096
|
}, [refetch]);
|
|
5097
|
+
useEffect(() => {
|
|
5098
|
+
if (!options?.pollIntervalMs) return;
|
|
5099
|
+
const id = setInterval(refetch, options.pollIntervalMs);
|
|
5100
|
+
return () => clearInterval(id);
|
|
5101
|
+
}, [options?.pollIntervalMs, refetch]);
|
|
5102
|
+
useEffect(() => {
|
|
5103
|
+
return () => {
|
|
5104
|
+
isMountedRef.current = false;
|
|
5105
|
+
};
|
|
5106
|
+
}, []);
|
|
5024
5107
|
return {
|
|
5025
5108
|
presence,
|
|
5026
5109
|
status: presence?.status,
|
|
5110
|
+
resolvedStatus: error ? "unknown" : presence?.status,
|
|
5027
5111
|
isLoading,
|
|
5112
|
+
error,
|
|
5028
5113
|
refetch
|
|
5029
5114
|
};
|
|
5030
5115
|
}
|
|
5031
|
-
function usePresenceMany(userIds) {
|
|
5116
|
+
function usePresenceMany(userIds, options) {
|
|
5032
5117
|
const sdk = useSdk();
|
|
5033
5118
|
const [presences, setPresences] = useState(
|
|
5034
5119
|
/* @__PURE__ */ new Map()
|
|
5035
5120
|
);
|
|
5036
5121
|
const [isLoading, setIsLoading] = useState(false);
|
|
5122
|
+
const [error, setError] = useState(null);
|
|
5123
|
+
const isMountedRef = useRef(true);
|
|
5037
5124
|
const refetch = useCallback(async () => {
|
|
5038
5125
|
if (userIds.length === 0) return;
|
|
5039
5126
|
setIsLoading(true);
|
|
5127
|
+
setError(null);
|
|
5040
5128
|
try {
|
|
5041
5129
|
const results = await sdk.presence.queryPresence(userIds);
|
|
5042
5130
|
const map = /* @__PURE__ */ new Map();
|
|
5043
5131
|
for (const p of results) {
|
|
5044
5132
|
map.set(p.userId, p);
|
|
5045
5133
|
}
|
|
5046
|
-
|
|
5134
|
+
if (isMountedRef.current) {
|
|
5135
|
+
setPresences(map);
|
|
5136
|
+
}
|
|
5137
|
+
} catch (err) {
|
|
5138
|
+
if (isMountedRef.current) {
|
|
5139
|
+
setError(err);
|
|
5140
|
+
}
|
|
5047
5141
|
} finally {
|
|
5048
|
-
|
|
5142
|
+
if (isMountedRef.current) {
|
|
5143
|
+
setIsLoading(false);
|
|
5144
|
+
}
|
|
5049
5145
|
}
|
|
5050
5146
|
}, [sdk, userIds]);
|
|
5051
5147
|
useEffect(() => {
|
|
5052
5148
|
refetch();
|
|
5053
5149
|
}, [refetch]);
|
|
5150
|
+
useEffect(() => {
|
|
5151
|
+
if (!options?.pollIntervalMs) return;
|
|
5152
|
+
const id = setInterval(refetch, options.pollIntervalMs);
|
|
5153
|
+
return () => clearInterval(id);
|
|
5154
|
+
}, [options?.pollIntervalMs, refetch]);
|
|
5155
|
+
useEffect(() => {
|
|
5156
|
+
return () => {
|
|
5157
|
+
isMountedRef.current = false;
|
|
5158
|
+
};
|
|
5159
|
+
}, []);
|
|
5054
5160
|
return {
|
|
5055
5161
|
presences,
|
|
5056
5162
|
isLoading,
|
|
5163
|
+
error,
|
|
5164
|
+
getStatus: (userId) => {
|
|
5165
|
+
if (error) return "unknown";
|
|
5166
|
+
return presences.get(userId)?.status;
|
|
5167
|
+
},
|
|
5057
5168
|
refetch
|
|
5058
5169
|
};
|
|
5059
5170
|
}
|
|
@@ -5142,6 +5253,6 @@ function useGuestPermissions() {
|
|
|
5142
5253
|
return GUEST_PERMISSIONS;
|
|
5143
5254
|
}
|
|
5144
5255
|
|
|
5145
|
-
export { CallsService, GuestJoinError, HealthService, MeetingsService, OpenApiConfigService, RtcProvider, SdkEventType, SignalCallsService, SignalClient, SignalHealthService, SignalMeetingsService, SignalPresenceService, apiConfig, buildGuestSdk, buildSdk, callEndedSchema, callInviteAcceptedSchema, callInviteCancelledSchema, callInviteDeclinedSchema, callInviteMissedSchema, callInviteSchema, callParticipantAddedSchema, callParticipantKickedSchema, callReadySchema, callRecordingStartedSchema, callRecordingStoppedSchema, callStartedSchema, clearErrors, eventBus, participantProfilesSchema, presencePingSchema, profileCache, pushApiError, pushDeviceError, pushError, pushIdentityGuardError, pushLiveKitConnectError, pushMediaPermissionError, pushNetworkError, pushSocketValidationError, pushStaleEventError, recordingStore, useAutoConnectRoom, useCallActions, useCallInitiated, useCallState, useConnectionState, useEvent, useGuestIdentity, useGuestJoin, useGuestPermissions, useGuestSdk, useHasActiveSession, useIncomingInvite, useInviteAccepted, useIsGuestMode, useIsProfilePending, useLivekitInfo, useMeeting, useMeetingActions, useMeetingState, useOutgoingInvites, useParticipantList, useParticipantMetadata, useParticipantPermissions, useParticipantProfile, usePresence, usePresenceMany, useProfileCache, useRecording, useRecordingStore, useRingTimeout, useRoomReady, useScreenShare, useSdk, useSessionDuration, useSessionId, useSignalClient, useTerminate, useTimeout, useTimeoutEffect, useVirtualBackground };
|
|
5256
|
+
export { CallsService, GuestJoinError, HealthService, MeetingsService, OpenApiConfigService, RtcProvider, SdkEventType, SignalCallsService, SignalClient, SignalHealthService, SignalMeetingsService, SignalPresenceService, apiConfig, buildGuestSdk, buildSdk, callEndedSchema, callInviteAcceptedSchema, callInviteCancelledSchema, callInviteDeclinedSchema, callInviteMissedSchema, callInviteSchema, callParticipantAddedSchema, callParticipantKickedSchema, callParticipantLeftSchema, callReadySchema, callRecordingStartedSchema, callRecordingStoppedSchema, callStartedSchema, clearErrors, eventBus, participantProfilesSchema, presencePingSchema, profileCache, pushApiError, pushDeviceError, pushError, pushIdentityGuardError, pushLiveKitConnectError, pushMediaPermissionError, pushNetworkError, pushSocketValidationError, pushStaleEventError, recordingStore, useAutoConnectRoom, useCallActions, useCallInitiated, useCallState, useConnectionState, useEvent, useGuestIdentity, useGuestJoin, useGuestPermissions, useGuestSdk, useHasActiveSession, useIncomingInvite, useInviteAccepted, useIsGuestMode, useIsProfilePending, useLivekitInfo, useMeeting, useMeetingActions, useMeetingState, useOutgoingInvites, useParticipantList, useParticipantMetadata, useParticipantPermissions, useParticipantProfile, usePresence, usePresenceMany, useProfileCache, useRecording, useRecordingStore, useRingTimeout, useRoomReady, useScreenShare, useSdk, useSessionDuration, useSessionId, useSignalClient, useTerminate, useTimeout, useTimeoutEffect, useVirtualBackground };
|
|
5146
5257
|
//# sourceMappingURL=index.mjs.map
|
|
5147
5258
|
//# sourceMappingURL=index.mjs.map
|