@poolse/sdk 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1478,6 +1478,13 @@ interface LiveKitRoomHandle {
1478
1478
  remoteParticipants: Map<string, LiveKitParticipant>;
1479
1479
  connect(url: string, token: string, options?: unknown): Promise<void>;
1480
1480
  disconnect(): Promise<void>;
1481
+ /**
1482
+ * Unblocks audio playback held back by a browser's autoplay policy.
1483
+ *
1484
+ * Optional because only the web needs it — React Native routes through
1485
+ * the native audio session and has nothing to unblock.
1486
+ */
1487
+ startAudio?(): Promise<void>;
1481
1488
  on(event: string, handler: (...args: never[]) => void): unknown;
1482
1489
  off(event: string, handler: (...args: never[]) => void): unknown;
1483
1490
  }
@@ -1485,9 +1492,30 @@ interface LiveKitRoomHandle {
1485
1492
  * The `livekit-client` namespace, as imported by your app:
1486
1493
  *
1487
1494
  * import * as livekit from 'livekit-client';
1495
+ *
1496
+ * Deliberately loose, for the same reason `NativeWebRtcModule` is.
1497
+ * Spelling the real signatures out here does NOT work: `Room`'s
1498
+ * constructor takes `RoomOptions`, and a constructor accepting
1499
+ * `RoomOptions` is not assignable to one accepting `unknown` —
1500
+ * parameters are contravariant. Declaring it precisely means no consumer
1501
+ * can pass `import * as livekit` in at all.
1502
+ *
1503
+ * {@link CheckedLiveKitModule} is the precise shape, narrowed once
1504
+ * inside `CallRoom` rather than at every call site.
1488
1505
  */
1489
1506
  interface LiveKitModule {
1490
- Room: new (options?: unknown) => LiveKitRoomHandle;
1507
+ Room: new (...args: never[]) => unknown;
1508
+ RoomEvent: Record<string, string>;
1509
+ Track: {
1510
+ Source: Record<string, string>;
1511
+ };
1512
+ }
1513
+ /** The precise shape, used internally once the module has been checked. */
1514
+ interface CheckedLiveKitModule {
1515
+ Room: new (options?: {
1516
+ adaptiveStream?: boolean;
1517
+ dynacast?: boolean;
1518
+ }) => LiveKitRoomHandle;
1491
1519
  RoomEvent: Record<string, string>;
1492
1520
  Track: {
1493
1521
  Source: Record<string, string>;
@@ -1816,8 +1844,8 @@ declare class AuthError extends ApiError {
1816
1844
  declare function isWebRtcAvailable(): boolean;
1817
1845
  declare function createBrowserWebRtcAdapter(): WebRtcAdapter;
1818
1846
 
1819
- declare const version = "2.10.0";
1847
+ declare const version = "2.11.0";
1820
1848
 
1821
1849
  declare function safeUuid(): string;
1822
1850
 
1823
- export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallAccepted, type CallBusy, type CallCancelled, type CallConnection, type CallDeclined, type CallEnded, type CallMedia, type CallParticipant, CallRoom, type CallRoomOptions, type CallRoomStatus, CallTokensResource, CallsResource, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IceServerResponse, IceServersResource, type IncomingCall, type IsoDateTime, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, type OutgoingCall, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type TypingEvent, type Unsubscribe$1 as Unsubscribe, UserChannel, UsersResource, type Uuid, type VoiceCandidate, type VoiceDescription, type VoiceIceServer, type VoiceParticipant, type VoicePeerConnection, VoiceRoom, type VoiceRoomOptions, type VoiceStatus, type VoiceStream, type VoiceTrack, type WebRtcAdapter, createBrowserWebRtcAdapter, isWebRtcAvailable, safeUuid, version };
1851
+ export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallAccepted, type CallBusy, type CallCancelled, type CallConnection, type CallDeclined, type CallEnded, type CallMedia, type CallParticipant, CallRoom, type CallRoomOptions, type CallRoomStatus, CallTokensResource, CallsResource, type CheckedLiveKitModule, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IceServerResponse, IceServersResource, type IncomingCall, type IsoDateTime, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, type OutgoingCall, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type TypingEvent, type Unsubscribe$1 as Unsubscribe, UserChannel, UsersResource, type Uuid, type VoiceCandidate, type VoiceDescription, type VoiceIceServer, type VoiceParticipant, type VoicePeerConnection, VoiceRoom, type VoiceRoomOptions, type VoiceStatus, type VoiceStream, type VoiceTrack, type WebRtcAdapter, createBrowserWebRtcAdapter, isWebRtcAvailable, safeUuid, version };
package/dist/index.d.ts CHANGED
@@ -1478,6 +1478,13 @@ interface LiveKitRoomHandle {
1478
1478
  remoteParticipants: Map<string, LiveKitParticipant>;
1479
1479
  connect(url: string, token: string, options?: unknown): Promise<void>;
1480
1480
  disconnect(): Promise<void>;
1481
+ /**
1482
+ * Unblocks audio playback held back by a browser's autoplay policy.
1483
+ *
1484
+ * Optional because only the web needs it — React Native routes through
1485
+ * the native audio session and has nothing to unblock.
1486
+ */
1487
+ startAudio?(): Promise<void>;
1481
1488
  on(event: string, handler: (...args: never[]) => void): unknown;
1482
1489
  off(event: string, handler: (...args: never[]) => void): unknown;
1483
1490
  }
@@ -1485,9 +1492,30 @@ interface LiveKitRoomHandle {
1485
1492
  * The `livekit-client` namespace, as imported by your app:
1486
1493
  *
1487
1494
  * import * as livekit from 'livekit-client';
1495
+ *
1496
+ * Deliberately loose, for the same reason `NativeWebRtcModule` is.
1497
+ * Spelling the real signatures out here does NOT work: `Room`'s
1498
+ * constructor takes `RoomOptions`, and a constructor accepting
1499
+ * `RoomOptions` is not assignable to one accepting `unknown` —
1500
+ * parameters are contravariant. Declaring it precisely means no consumer
1501
+ * can pass `import * as livekit` in at all.
1502
+ *
1503
+ * {@link CheckedLiveKitModule} is the precise shape, narrowed once
1504
+ * inside `CallRoom` rather than at every call site.
1488
1505
  */
1489
1506
  interface LiveKitModule {
1490
- Room: new (options?: unknown) => LiveKitRoomHandle;
1507
+ Room: new (...args: never[]) => unknown;
1508
+ RoomEvent: Record<string, string>;
1509
+ Track: {
1510
+ Source: Record<string, string>;
1511
+ };
1512
+ }
1513
+ /** The precise shape, used internally once the module has been checked. */
1514
+ interface CheckedLiveKitModule {
1515
+ Room: new (options?: {
1516
+ adaptiveStream?: boolean;
1517
+ dynacast?: boolean;
1518
+ }) => LiveKitRoomHandle;
1491
1519
  RoomEvent: Record<string, string>;
1492
1520
  Track: {
1493
1521
  Source: Record<string, string>;
@@ -1816,8 +1844,8 @@ declare class AuthError extends ApiError {
1816
1844
  declare function isWebRtcAvailable(): boolean;
1817
1845
  declare function createBrowserWebRtcAdapter(): WebRtcAdapter;
1818
1846
 
1819
- declare const version = "2.10.0";
1847
+ declare const version = "2.11.0";
1820
1848
 
1821
1849
  declare function safeUuid(): string;
1822
1850
 
1823
- export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallAccepted, type CallBusy, type CallCancelled, type CallConnection, type CallDeclined, type CallEnded, type CallMedia, type CallParticipant, CallRoom, type CallRoomOptions, type CallRoomStatus, CallTokensResource, CallsResource, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IceServerResponse, IceServersResource, type IncomingCall, type IsoDateTime, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, type OutgoingCall, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type TypingEvent, type Unsubscribe$1 as Unsubscribe, UserChannel, UsersResource, type Uuid, type VoiceCandidate, type VoiceDescription, type VoiceIceServer, type VoiceParticipant, type VoicePeerConnection, VoiceRoom, type VoiceRoomOptions, type VoiceStatus, type VoiceStream, type VoiceTrack, type WebRtcAdapter, createBrowserWebRtcAdapter, isWebRtcAvailable, safeUuid, version };
1851
+ export { type AddMemberOptions, ApiError, type Attachment, type AttachmentDownloadResponse, AttachmentHandle, type AttachmentOptions, type AttachmentProgressEvent, type AttachmentStatus, type AttachmentUploadInput, type AttachmentUploadRequest, type AttachmentUploadResponse, AttachmentsResource, AuthError, type CallAccepted, type CallBusy, type CallCancelled, type CallConnection, type CallDeclined, type CallEnded, type CallMedia, type CallParticipant, CallRoom, type CallRoomOptions, type CallRoomStatus, CallTokensResource, CallsResource, type CheckedLiveKitModule, type Conversation, ConversationChannel, type ConversationCreateRequest, type ConversationCreatedEvent, ConversationHandle, type ConversationList, ConversationMessages, type ConversationType, type ConversationUpdateRequest, type ConversationUpdatedEvent, ConversationsResource, type Device, type DeviceEnvironment, type DevicePlatform, DevicesResource, type ErrorEnvelope, type IceServerResponse, IceServersResource, type IncomingCall, type IsoDateTime, type LiveKitModule, type LiveKitParticipant, type LiveKitPublication, type LiveKitRoomHandle, type LiveKitTrack, type LiveKitTrackReference, type Me, MeResource, type MemberReadEvent, type MemberRole, type Membership, type MembershipCreateRequest, type MembershipList, type MentionEvent, type Message, type MessageCreateRequest, type MessageDeletedEvent, MessageHandle, type MessageList, type MessageNewEvent, type MessageType, type MessageUpdateRequest, type MessageUpdatedEvent, MessagesResource, NetworkError, type OutgoingCall, POOLSE_API_URL, Poolse, type PoolseConfig, PoolseError, PoolseRealtime, type PoolseUserProfile, type PresenceSnapshot, type QuotedMessagePreview, RateLimitedError, type ReactionEvent, type ReactionRequest, type ReadRequest, type RealtimeStatus, type RegisterDeviceRequest, type TypingEvent, type Unsubscribe$1 as Unsubscribe, UserChannel, UsersResource, type Uuid, type VoiceCandidate, type VoiceDescription, type VoiceIceServer, type VoiceParticipant, type VoicePeerConnection, VoiceRoom, type VoiceRoomOptions, type VoiceStatus, type VoiceStream, type VoiceTrack, type WebRtcAdapter, createBrowserWebRtcAdapter, isWebRtcAvailable, safeUuid, version };
package/dist/index.js CHANGED
@@ -1749,6 +1749,10 @@ var CallRoom = class {
1749
1749
  this.selfId = room.localParticipant.identity;
1750
1750
  await room.localParticipant.setMicrophoneEnabled(!this.startMuted);
1751
1751
  if (this.startWithVideo) await room.localParticipant.setCameraEnabled(true);
1752
+ try {
1753
+ await room.startAudio?.();
1754
+ } catch {
1755
+ }
1752
1756
  this.setStatus("connected");
1753
1757
  this.emitParticipants();
1754
1758
  return true;
@@ -2201,7 +2205,7 @@ var Poolse = class {
2201
2205
  };
2202
2206
 
2203
2207
  // src/version.ts
2204
- var version = "2.10.0";
2208
+ var version = "2.11.0";
2205
2209
 
2206
2210
  export { ApiError, AttachmentHandle, AttachmentsResource, AuthError, CallRoom, CallTokensResource, CallsResource, ConversationChannel, ConversationHandle, ConversationMessages, ConversationsResource, DevicesResource, IceServersResource, MeResource, MessageHandle, MessagesResource, NetworkError, POOLSE_API_URL, Poolse, PoolseError, PoolseRealtime, RateLimitedError, UserChannel, UsersResource, VoiceRoom, createBrowserWebRtcAdapter, isWebRtcAvailable, safeUuid, version };
2207
2211
  //# sourceMappingURL=index.js.map