@cloudflare/realtimekit 0.5.0-staging.49 → 0.5.0-staging.50

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.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { EventEmitter } from 'events';
2
2
  import { MessageType as MessageType$1 } from '@protobuf-ts/runtime';
3
+ import * as _dyteinternals_utils from '@dyteinternals/utils';
4
+ import { ViewType, PresetTypeV2, MediaVideoQualityType, MediaProductionPermissionType, WaitingRoomTypes, MediaScreenShareQualityType, LivestreamViewerMediaQualityType, PluginAccessControls, RecorderType as RecorderType$1, BorderRadius, BorderWidth, Theme } from '@dyteinternals/utils';
3
5
  import * as WorkerTimers from 'worker-timers';
4
6
 
5
7
  // TypeScript Version: 3.0
@@ -278,6 +280,54 @@ declare enum ProducerKind {
278
280
  */
279
281
  VIDEO = 1
280
282
  }
283
+ declare class Codec$Type extends MessageType$1<Codec> {
284
+ constructor();
285
+ }
286
+ /**
287
+ * @generated from protobuf message media.Codec
288
+ */
289
+ interface Codec {
290
+ /**
291
+ * @generated from protobuf field: optional int32 channels = 1;
292
+ */
293
+ channels?: number;
294
+ /**
295
+ * @generated from protobuf field: int32 clock_rate = 2;
296
+ */
297
+ clockRate: number;
298
+ /**
299
+ * @generated from protobuf field: string mime_type = 3;
300
+ */
301
+ mimeType: string;
302
+ /**
303
+ * @generated from protobuf field: optional string sdp_fmtp_line = 4;
304
+ */
305
+ sdpFmtpLine?: string;
306
+ }
307
+ /**
308
+ * @generated MessageType for protobuf message media.Codec
309
+ */
310
+ declare const Codec: Codec$Type;
311
+ declare class HeaderExtension$Type extends MessageType$1<HeaderExtension> {
312
+ constructor();
313
+ }
314
+ /**
315
+ * @generated from protobuf message media.HeaderExtension
316
+ */
317
+ interface HeaderExtension {
318
+ /**
319
+ * @generated from protobuf field: optional string direction = 1;
320
+ */
321
+ direction?: string;
322
+ /**
323
+ * @generated from protobuf field: string uri = 2;
324
+ */
325
+ uri: string;
326
+ }
327
+ /**
328
+ * @generated MessageType for protobuf message media.HeaderExtension
329
+ */
330
+ declare const HeaderExtension: HeaderExtension$Type;
281
331
  declare class SessionDescription$Type extends MessageType$1<SessionDescription> {
282
332
  constructor();
283
333
  }
@@ -361,6 +411,10 @@ interface ProducerState$1 {
361
411
  * @generated from protobuf field: optional string producing_transport_id = 6;
362
412
  */
363
413
  producingTransportId?: string;
414
+ /**
415
+ * @generated from protobuf field: optional string mime_type = 7;
416
+ */
417
+ mimeType?: string;
364
418
  }
365
419
  /**
366
420
  * @generated MessageType for protobuf message media.ProducerState
@@ -390,6 +444,66 @@ interface ConsumerState {
390
444
  * @generated MessageType for protobuf message media.ConsumerState
391
445
  */
392
446
  declare const ConsumerState: ConsumerState$Type;
447
+ declare class PeerRtpCapabilitites$Type extends MessageType$1<PeerRtpCapabilitites> {
448
+ constructor();
449
+ }
450
+ /**
451
+ * @generated from protobuf message media.PeerRtpCapabilitites
452
+ */
453
+ interface PeerRtpCapabilitites {
454
+ /**
455
+ * @generated from protobuf field: media.RtpCapabilitites sender = 1;
456
+ */
457
+ sender?: RtpCapabilitites;
458
+ /**
459
+ * @generated from protobuf field: media.RtpCapabilitites receiver = 2;
460
+ */
461
+ receiver?: RtpCapabilitites;
462
+ }
463
+ /**
464
+ * @generated MessageType for protobuf message media.PeerRtpCapabilitites
465
+ */
466
+ declare const PeerRtpCapabilitites: PeerRtpCapabilitites$Type;
467
+ declare class RtpCapability$Type extends MessageType$1<RtpCapability> {
468
+ constructor();
469
+ }
470
+ /**
471
+ * @generated from protobuf message media.RtpCapability
472
+ */
473
+ interface RtpCapability {
474
+ /**
475
+ * @generated from protobuf field: repeated media.Codec codecs = 1;
476
+ */
477
+ codecs: Codec[];
478
+ /**
479
+ * @generated from protobuf field: repeated media.HeaderExtension header_extensions = 2;
480
+ */
481
+ headerExtensions: HeaderExtension[];
482
+ }
483
+ /**
484
+ * @generated MessageType for protobuf message media.RtpCapability
485
+ */
486
+ declare const RtpCapability: RtpCapability$Type;
487
+ declare class RtpCapabilitites$Type extends MessageType$1<RtpCapabilitites> {
488
+ constructor();
489
+ }
490
+ /**
491
+ * @generated from protobuf message media.RtpCapabilitites
492
+ */
493
+ interface RtpCapabilitites {
494
+ /**
495
+ * @generated from protobuf field: media.RtpCapability audio = 1;
496
+ */
497
+ audio?: RtpCapability;
498
+ /**
499
+ * @generated from protobuf field: media.RtpCapability video = 2;
500
+ */
501
+ video?: RtpCapability;
502
+ }
503
+ /**
504
+ * @generated MessageType for protobuf message media.RtpCapabilitites
505
+ */
506
+ declare const RtpCapabilitites: RtpCapabilitites$Type;
393
507
 
394
508
  declare class GeoLocation$Type extends MessageType$1<GeoLocation> {
395
509
  constructor();
@@ -484,6 +598,10 @@ interface RoomParticipants {
484
598
  * @generated from protobuf field: optional string user_id = 4;
485
599
  */
486
600
  userId?: string;
601
+ /**
602
+ * @generated from protobuf field: optional media.PeerRtpCapabilitites capabilities = 5;
603
+ */
604
+ capabilities?: PeerRtpCapabilitites;
487
605
  }
488
606
  /**
489
607
  * @generated MessageType for protobuf message media.edge.RoomParticipants
@@ -627,7 +745,7 @@ declare const GlobalPeerPinningBroadcastResponse: GlobalPeerPinningBroadcastResp
627
745
  *
628
746
  * @generated from protobuf enum common.RecordingType
629
747
  */
630
- declare enum RecordingType {
748
+ declare enum RecordingType$1 {
631
749
  /**
632
750
  * @generated from protobuf enum value: BROWSER = 0;
633
751
  */
@@ -670,7 +788,7 @@ declare enum StageType {
670
788
  /**
671
789
  * @generated from protobuf enum socket.room.RecorderType
672
790
  */
673
- declare enum RecorderType$1 {
791
+ declare enum RecorderType {
674
792
  /**
675
793
  * @generated from protobuf enum value: RECORDER_TYPE_NONE = 0;
676
794
  */
@@ -875,7 +993,7 @@ interface ActiveRecording {
875
993
  /**
876
994
  * @generated from protobuf field: common.RecordingType recording_type = 2;
877
995
  */
878
- recordingType: RecordingType;
996
+ recordingType: RecordingType$1;
879
997
  /**
880
998
  * @generated from protobuf field: string recording_status = 3;
881
999
  */
@@ -920,6 +1038,18 @@ interface WaitingRoomRequest {
920
1038
  * @generated from protobuf field: string display_name = 3;
921
1039
  */
922
1040
  displayName: string;
1041
+ /**
1042
+ * @generated from protobuf field: optional string picture = 4;
1043
+ */
1044
+ picture?: string;
1045
+ /**
1046
+ * @generated from protobuf field: optional string custom_participant_id = 5;
1047
+ */
1048
+ customParticipantId?: string;
1049
+ /**
1050
+ * @generated from protobuf field: optional string preset_name = 6;
1051
+ */
1052
+ presetName?: string;
923
1053
  }
924
1054
  /**
925
1055
  * @generated MessageType for protobuf message socket.room.WaitingRoomRequest
@@ -1272,7 +1402,7 @@ interface PresetUpdates {
1272
1402
  /**
1273
1403
  * @generated from protobuf field: optional socket.room.RecorderType recorder_type = 18;
1274
1404
  */
1275
- recorderType?: RecorderType$1;
1405
+ recorderType?: RecorderType;
1276
1406
  /**
1277
1407
  * @generated from protobuf field: optional bool hidden_participant = 19;
1278
1408
  */
@@ -1929,207 +2059,121 @@ interface RecordingEvent {
1929
2059
  /**
1930
2060
  * @generated from protobuf field: common.RecordingType recording_type = 3;
1931
2061
  */
1932
- recordingType: RecordingType;
2062
+ recordingType: RecordingType$1;
1933
2063
  }
1934
2064
  /**
1935
2065
  * @generated MessageType for protobuf message socket.recording.RecordingEvent
1936
2066
  */
1937
2067
  declare const RecordingEvent: RecordingEvent$Type;
1938
2068
 
1939
- declare type BorderWidth = 'none' | 'thin' | 'fat';
1940
- declare type BorderRadius = 'sharp' | 'rounded' | 'extra-rounded' | 'circular';
1941
- declare type Theme = 'darkest' | 'dark' | 'light';
1942
- /**
1943
- * UI Colors
1944
- *
1945
- * Accepts hex color codes.
1946
- */
1947
- interface UIColors {
1948
- brand: {
1949
- 300: string;
1950
- 400: string;
1951
- 500: string;
1952
- 600: string;
1953
- 700: string;
1954
- };
1955
- background: {
1956
- 600: string;
1957
- 700: string;
1958
- 800: string;
1959
- 900: string;
1960
- 1000: string;
1961
- };
1962
- danger: string;
1963
- success: string;
1964
- text_on_brand: string;
1965
- text: string;
1966
- video_bg: string;
1967
- warning: string;
1968
- }
1969
- interface DesignTokens {
1970
- border_radius: BorderRadius;
1971
- border_width: BorderWidth;
1972
- colors: UIColors;
1973
- font_family?: string;
1974
- google_font?: string;
1975
- logo?: string;
1976
- spacing_base: number;
1977
- theme: Theme;
1978
- }
1979
-
1980
- declare enum ViewType {
1981
- GroupCall = "GROUP_CALL",
1982
- Webinar = "WEBINAR",
1983
- AudioRoom = "AUDIO_ROOM",
1984
- Livestream = "LIVESTREAM",
1985
- Chat = "CHAT"
1986
- }
1987
- declare enum WaitingRoomTypes {
1988
- Skip = "SKIP",
1989
- OnPrivilegedUserEntry = "ON_PRIVILEGED_USER_ENTRY",
1990
- SkipOnAccept = "SKIP_ON_ACCEPT"
1991
- }
1992
- declare enum MediaProductionPermissionType {
1993
- Allowed = "ALLOWED",
1994
- NotAllowed = "NOT_ALLOWED",
1995
- CanRequest = "CAN_REQUEST"
1996
- }
1997
- declare type MediaVideoQualityType = 'qvga' | 'vga' | 'hd' | 'hd_cropped' | 'fhd';
1998
- declare type MediaScreenShareQualityType = 'vga' | 'hd' | 'full_hd';
1999
- declare type Config = {
2000
- view_type: ViewType;
2001
- media: {
2002
- audio: {
2003
- enable_stereo: boolean;
2004
- enable_high_bitrate: boolean;
2005
- };
2006
- video: {
2007
- quality: MediaVideoQualityType;
2008
- frame_rate: number;
2009
- };
2010
- screenshare: {
2011
- quality: MediaScreenShareQualityType;
2012
- frame_rate: number;
2013
- };
2014
- };
2015
- max_video_streams: {
2016
- mobile: number;
2017
- desktop: number;
2018
- };
2019
- max_screenshare_count: number;
2020
- };
2021
- declare enum PluginAccessControls {
2022
- FULL_ACCESS = "FULL_ACCESS",
2023
- VIEW_ONLY = "VIEW_ONLY"
2024
- }
2025
- declare type PluginConfig$1 = {
2026
- access_control: PluginAccessControls.FULL_ACCESS | PluginAccessControls.VIEW_ONLY;
2027
- disabled: boolean;
2028
- handles_view_only: boolean;
2029
- };
2030
- declare type PluginPermissionsType = {
2031
- can_close: boolean;
2032
- can_start: boolean;
2033
- can_edit_config?: boolean;
2034
- config: {
2035
- [pluginId: string]: Partial<PluginConfig$1>;
2036
- };
2037
- };
2069
+ type ClientEnvTypeAll = 'devel' | 'preprod' | 'prod';
2038
2070
 
2039
- declare type Permissions = {
2040
- accept_waiting_requests: boolean;
2041
- can_accept_production_requests: boolean;
2042
- can_edit_display_name: boolean;
2043
- can_record: boolean;
2044
- can_livestream: boolean;
2045
- can_spotlight?: boolean;
2046
- disable_participant_audio: boolean;
2047
- disable_participant_screensharing: boolean;
2048
- disable_participant_video: boolean;
2049
- kick_participant: boolean;
2050
- pin_participant: boolean;
2051
- plugins: PluginPermissionsType;
2052
- waiting_room_type: WaitingRoomTypes;
2053
- polls: {
2054
- can_create: boolean;
2055
- can_vote: boolean;
2056
- can_view: boolean;
2057
- };
2058
- media: {
2059
- video: {
2060
- can_produce: MediaProductionPermissionType;
2061
- };
2062
- audio: {
2063
- can_produce: MediaProductionPermissionType;
2064
- };
2065
- screenshare: {
2066
- can_produce: MediaProductionPermissionType;
2067
- };
2068
- };
2069
- chat: ChatPermissionTypes;
2070
- is_recorder?: boolean;
2071
- recorder_type: RecorderType;
2072
- hidden_participant: boolean;
2073
- show_participant_list: boolean;
2074
- can_change_participant_permissions: boolean;
2075
- connected_meetings: {
2076
- can_alter_connected_meetings: boolean;
2077
- can_switch_connected_meetings: boolean;
2078
- can_switch_to_parent_meeting: boolean;
2079
- };
2080
- stage_enabled?: boolean;
2081
- stage_access?: MediaProductionPermissionType;
2082
- accept_stage_requests?: boolean;
2083
- transcription_enabled?: boolean;
2084
- };
2085
- declare type PresetTypeV2 = {
2086
- ui: {
2087
- design_tokens: DesignTokens;
2088
- config_diff: ConfigDiff;
2089
- };
2090
- permissions: Permissions;
2091
- config: Config;
2092
- version?: string;
2093
- name?: string;
2094
- };
2071
+ declare class RTKSelectedPeers {
2072
+ private readonly _activeSpeakerPeers;
2073
+ private readonly _compulsoryPeers;
2074
+ constructor();
2075
+ add(peerId: string, priority: number): number;
2076
+ delete(peerId: string): void;
2077
+ index(peerId: string): number;
2078
+ get peers(): string[];
2079
+ get compulsoryPeers(): string[];
2080
+ get activeSpeakerPeers(): string[];
2081
+ private _removeFromCompulsoryPeer;
2082
+ }
2095
2083
 
2096
- declare type ChatPermissionTypes = {
2097
- public: PublicChatPermissionTypes;
2098
- private?: PrivateChatPermissionTypes;
2099
- channel?: ChannelPermissionTypes;
2100
- message?: MessagePermissionTypes;
2101
- };
2102
- declare type PublicChatPermissionTypes = {
2103
- can_send: boolean;
2104
- text: boolean;
2105
- files: boolean;
2106
- };
2107
- declare type PrivateChatPermissionTypes = {
2108
- can_send: boolean;
2109
- can_receive: boolean;
2110
- text: boolean;
2111
- files: boolean;
2112
- };
2113
- declare type ChannelPermissionTypes = {
2114
- can_create: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
2115
- can_delete: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
2116
- can_update: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
2117
- can_read_all: boolean;
2118
- };
2119
- declare type MessagePermissionTypes = {
2120
- can_delete: 'NONE' | 'SELF' | 'ALL';
2121
- can_edit: 'NONE' | 'SELF' | 'ALL';
2122
- delete_cutoff_time_seconds: number;
2123
- edit_cutoff_time_seconds: number;
2084
+ type PipEvents = {
2085
+ ['cameraToggled']: () => void;
2086
+ ['micToggled']: () => void;
2087
+ ['hangup']: () => void;
2088
+ ['pipStarted']: () => void;
2089
+ ['pipEnded']: () => void;
2090
+ ['*']: (eventName: string, ...args: any[]) => void;
2124
2091
  };
2125
- declare enum RecorderType {
2126
- none = "NONE",
2127
- recorder = "RECORDER",
2128
- livestreamer = "LIVESTREAMER"
2092
+ declare class RTKPip extends RTKTypedEventEmitter<PipEvents> {
2093
+ #private;
2094
+ private constructor();
2095
+ static _init(context: Context<RTKContextState>, self: RTKSelf$1): Promise<RTKPip>;
2096
+ private setupIcon;
2097
+ overrideIcon(icon: 'handRaise' | 'pin', value: string): Promise<void>;
2098
+ private constructImage;
2099
+ private createVideoContainer;
2100
+ private setupEventListeners;
2101
+ private cleanupEventListeners;
2102
+ private enablePipMediaControls;
2103
+ private onSelfVideoUpdateListener;
2104
+ private onSelfAudioUpdateListener;
2105
+ private handlePipMediaControls;
2106
+ private createCanvas;
2107
+ private eventCallback;
2108
+ private setupMediaSessionEvents;
2109
+ private mountAudioEvents;
2110
+ private mountVideoEvents;
2111
+ private unmountEvents;
2112
+ private getSources;
2113
+ private drawEmptyTile;
2114
+ private drawIcons;
2115
+ private drawTile;
2116
+ private calcGridElemSize;
2117
+ private paintCanvas;
2118
+ private animate;
2119
+ isSupported(): boolean;
2120
+ get isActive(): boolean;
2121
+ private cleanup;
2122
+ init({ height, width }?: {
2123
+ height?: number;
2124
+ width?: number;
2125
+ }): void;
2126
+ private updateMediaSession;
2127
+ enableSource(source: string): void;
2128
+ disableSource(source: string): void;
2129
+ private generateAvatar;
2130
+ addSource(id: string, element: HTMLVideoElement, enabled: boolean, pinned?: boolean, displayText?: string, imageUrl?: string, handRaised?: boolean): void;
2131
+ updateSource(id: string, source: any): void;
2132
+ removeSource(id: string): void;
2133
+ removePinnedSource(): void;
2134
+ removeAllSources(): void;
2135
+ enable(): void;
2136
+ disable: (partial?: boolean) => void;
2129
2137
  }
2130
- declare type ConfigDiff = Record<string, any>;
2131
2138
 
2132
- declare type ClientEnvTypeAll = 'devel' | 'preprod' | 'prod';
2139
+ interface AudioProducerScoreStats {
2140
+ score: number;
2141
+ packetsLostPercentage: number;
2142
+ jitter: number;
2143
+ isScreenShare: boolean;
2144
+ bitrate: number;
2145
+ }
2146
+ interface VideoProducerScoreStats {
2147
+ score: number;
2148
+ frameWidth: number;
2149
+ frameHeight: number;
2150
+ framesPerSecond: number;
2151
+ packetsLostPercentage: number;
2152
+ jitter: number;
2153
+ isScreenShare: boolean;
2154
+ bitrate: number;
2155
+ cpuLimitations: boolean;
2156
+ bandwidthLimitations: boolean;
2157
+ }
2158
+ interface AudioConsumerScoreStats {
2159
+ score: number;
2160
+ packetsLostPercentage: number;
2161
+ jitter: number;
2162
+ isScreenShare: boolean;
2163
+ bitrate: number;
2164
+ }
2165
+ interface VideoConsumerScoreStats {
2166
+ score: number;
2167
+ frameWidth: number;
2168
+ frameHeight: number;
2169
+ framesPerSecond: number;
2170
+ packetsLostPercentage: number;
2171
+ jitter: number;
2172
+ isScreenShare: boolean;
2173
+ bitrate: number;
2174
+ }
2175
+ type ProducerScoreStats = AudioProducerScoreStats | VideoProducerScoreStats;
2176
+ type ConsumerScoreStats = AudioConsumerScoreStats | VideoConsumerScoreStats;
2133
2177
 
2134
2178
  type TranscriptionData = {
2135
2179
  id: string;
@@ -2169,11 +2213,11 @@ declare enum MediaNodeType {
2169
2213
  CF = 3
2170
2214
  }
2171
2215
  type MediaConnectionState = {
2172
- consuming: {
2216
+ recv: {
2173
2217
  state: `${TransportState}`;
2174
2218
  reconnected: boolean;
2175
2219
  };
2176
- producing: {
2220
+ send: {
2177
2221
  state: `${TransportState}`;
2178
2222
  reconnected: boolean;
2179
2223
  };
@@ -2282,6 +2326,8 @@ declare class RTKMap<T extends (EventMap & WildCardEvent<T>), U extends {
2282
2326
  toArray(): U[];
2283
2327
  }
2284
2328
 
2329
+ type MediaKind$1 = 'audio' | 'video';
2330
+
2285
2331
  type DCMessage = {
2286
2332
  type: string;
2287
2333
  payload: Record<string, unknown>;
@@ -2319,11 +2365,15 @@ type ParticipantEvents = {
2319
2365
  isScreenshare: boolean;
2320
2366
  score: number;
2321
2367
  participantId: string;
2368
+ scoreStats: ConsumerScoreStats;
2322
2369
  }) => void;
2323
2370
  ['kicked']: () => void;
2324
2371
  ['*']: (event: string, ...args: any[]) => void;
2325
2372
  };
2326
2373
  type SelfEvents = {
2374
+ ['toggleTile']: (payload: {
2375
+ hidden: boolean;
2376
+ }) => void;
2327
2377
  ['videoUpdate']: (payload: {
2328
2378
  videoEnabled: boolean;
2329
2379
  videoTrack: MediaStreamTrack;
@@ -2363,6 +2413,7 @@ type SelfEvents = {
2363
2413
  isScreenshare: boolean;
2364
2414
  score: number;
2365
2415
  participantId: string;
2416
+ scoreStats: ProducerScoreStats;
2366
2417
  }) => void;
2367
2418
  ['waitlisted']: () => void;
2368
2419
  ['roomLeft']: (payload: {
@@ -2405,183 +2456,451 @@ declare class RTKBasicParticipantsMap extends RTKEventEmitter<'participantsUpdat
2405
2456
  toArray(): RTKBasicParticipant[];
2406
2457
  }
2407
2458
 
2408
- type PipEvents = {
2409
- ['cameraToggled']: () => void;
2410
- ['micToggled']: () => void;
2411
- ['hangup']: () => void;
2412
- ['pipStarted']: () => void;
2413
- ['pipEnded']: () => void;
2414
- ['*']: (eventName: string, ...args: any[]) => void;
2415
- };
2416
- declare class RTKPip extends RTKTypedEventEmitter<PipEvents> {
2417
- #private;
2418
- constructor(context: Context<RTKContextState>, self: RTKSelf$1);
2419
- private createVideoContainer;
2420
- private setupEventListeners;
2421
- private cleanupEventListeners;
2422
- private enablePipMediaControls;
2423
- private onSelfVideoUpdateListener;
2424
- private onSelfAudioUpdateListener;
2425
- private handlePipMediaControls;
2426
- private createCanvas;
2427
- private eventCallback;
2428
- private setupMediaSessionEvents;
2429
- private mountAudioEvents;
2430
- private mountVideoEvents;
2431
- private unmountEvents;
2432
- private getSources;
2433
- private drawEmptyTile;
2434
- private drawGrid;
2435
- private calcGridElemSize;
2436
- private paintCanvas;
2437
- private animate;
2438
- isSupported(): boolean;
2439
- get isActive(): boolean;
2440
- private cleanup;
2441
- init({ height, width }?: {
2442
- height?: number;
2443
- width?: number;
2444
- }): void;
2445
- private updateMediaSession;
2446
- enableSource(source: string): void;
2447
- disableSource(source: string): void;
2448
- addSource(id: string, element: HTMLVideoElement, enabled: boolean, pinned?: boolean, displayText?: string): void;
2449
- removeSource(id: string): void;
2450
- removePinnedSource(): void;
2451
- removeAllSources(): void;
2452
- enable(): void;
2453
- disable: () => void;
2454
- }
2455
-
2456
- type ChatChannelSocketMessage = GetChatChannelResponse;
2457
- interface ChatChannel {
2458
- id: string;
2459
- displayName: string;
2460
- memberIds: string[];
2461
- displayPictureUrl?: string;
2462
- visibility?: string;
2463
- isDirectMessage?: boolean;
2464
- latestMessage?: Message;
2465
- unreadCount: number;
2466
- }
2467
- interface UpdateChannelRequestPayload {
2468
- memberIds?: string[];
2469
- displayName?: string;
2470
- displayPictureUrl?: string;
2471
- visibility?: string;
2472
- }
2473
- declare class ChatChannelSocketHandler {
2474
- #private;
2475
- constructor(socketService: SocketService);
2476
- createChannel(displayName: string, memberIds: string[], displayPictureUrl?: string, visibility?: string, isDirectMessage?: boolean): Promise<ChatChannel>;
2477
- updateChannel(channelId: string, payload: UpdateChannelRequestPayload): Promise<ChatChannel>;
2478
- static formatChannel(socketChannel: ChatChannel$1): ChatChannel;
2479
- getChannelMembers(channelId: string): Promise<RTKBasicParticipant[]>;
2480
- on(event: number, handler: (socketMessage: ChatChannelSocketMessage) => void): void;
2481
- }
2482
-
2483
- declare enum ChatMessageType {
2484
- TEXT = 0,
2485
- IMAGE = 1,
2486
- FILE = 2,
2487
- CUSTOM = 3
2459
+ declare const modes: readonly ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
2460
+ type ViewMode = (typeof modes)[number];
2461
+ interface BroadcastMessagePayload {
2462
+ [key: string]: boolean | number | string | Date | ActiveTab;
2488
2463
  }
2489
- type ChatSocketMessage = SendChatMessageToRoomResponse | SendChatMessageToPeersResponse | EditChatMessageResponse | DeleteChatMessageResponse;
2490
- interface SearchFilters {
2491
- channelId?: string;
2492
- timestamp?: number;
2493
- size?: number;
2494
- reversed?: boolean;
2464
+ interface PeerProducerConfig {
2465
+ audio: boolean;
2466
+ video: boolean;
2467
+ screenshareAudio: boolean;
2468
+ screenshareVideo: boolean;
2495
2469
  }
2496
- declare class ChatSocketHandler {
2470
+ type BroadcastMessageTarget = {
2471
+ participantIds: string[];
2472
+ } | {
2473
+ presetNames: string[];
2474
+ } | {
2475
+ meetingIds: string[];
2476
+ };
2477
+ type ParticipantsEvents = {
2478
+ ['viewModeChanged']: (payload: {
2479
+ viewMode: string;
2480
+ currentPage: number;
2481
+ pageCount: number;
2482
+ }) => void;
2483
+ ['activeSpeaker']: (payload: {
2484
+ peerId: string;
2485
+ volume: number;
2486
+ }) => void;
2487
+ ['broadcastedMessage']: (payload: {
2488
+ type: string;
2489
+ payload: BroadcastMessagePayload;
2490
+ timestamp: number;
2491
+ }) => void;
2492
+ ['poorConnection']: (payload: {
2493
+ participantId: string;
2494
+ score: number;
2495
+ kind: string;
2496
+ }) => void;
2497
+ ['pageChanged']: (payload: {
2498
+ viewMode: string;
2499
+ currentPage: number;
2500
+ pageCount: number;
2501
+ }) => void;
2502
+ ['mediaScoreUpdate']: (payload: {
2503
+ kind: string;
2504
+ isScreenshare: boolean;
2505
+ score: number;
2506
+ participantId: string;
2507
+ scoreStats: ConsumerScoreStats;
2508
+ }) => void;
2509
+ ['media_decode_error']: (payload: {
2510
+ reason: string;
2511
+ code: '1702' | '1703';
2512
+ }) => void;
2513
+ ['*']: (event: string, ...args: any[]) => void;
2514
+ };
2515
+ declare class RTKParticipants$1 extends RTKTypedEventEmitter<ParticipantsEvents> {
2497
2516
  #private;
2498
- constructor(socketService: SocketService);
2499
- getChatMessages(): Promise<{
2517
+ readonly waitlisted: Readonly<RTKParticipantMap$1<Omit<RTKParticipant$1, 'audioTrack' | 'videoTrack' | 'screenShareTracks'>>>;
2518
+ readonly joined: Readonly<RTKParticipantMap$1>;
2519
+ readonly active: Readonly<RTKParticipantMap$1>;
2520
+ readonly videoSubscribed: Readonly<RTKParticipantMap$1>;
2521
+ readonly audioSubscribed: Readonly<RTKParticipantMap$1>;
2522
+ readonly pinned: Readonly<RTKParticipantMap$1>;
2523
+ readonly all: Readonly<RTKBasicParticipantsMap>;
2524
+ get pip(): RTKPip;
2525
+ private get socketJoined();
2526
+ private get mediaJoined();
2527
+ rateLimitConfig: {
2528
+ maxInvocations: number;
2529
+ period: number;
2530
+ };
2531
+ get rateLimits(): {
2532
+ maxInvocations: number;
2533
+ period: number;
2534
+ };
2535
+ updateRateLimits(num: number, period: number): void;
2536
+ viewMode: ViewMode;
2537
+ currentPage: number;
2538
+ lastActiveSpeaker: string;
2539
+ selectedPeers: RTKSelectedPeers;
2540
+ constructor(context: Context<RTKContextState>, self: RTKSelf$1, roomSocketHandler: RoomSocketHandler);
2541
+ setupEvents(): void;
2542
+ get count(): number;
2543
+ get maxActiveParticipantsCount(): number;
2544
+ setMaxActiveParticipantsCount(limit: number): void;
2545
+ get pageCount(): number;
2546
+ acceptWaitingRoomRequest(id: string): void;
2547
+ acceptAllWaitingRoomRequest(userIds: string[]): Promise<void>;
2548
+ rejectWaitingRoomRequest(id: string): Promise<void>;
2549
+ setViewMode(viewMode: ViewMode): Promise<void>;
2550
+ subscribe(peerIds: string[], kinds?: ('audio' | 'video' | 'screenshareAudio' | 'screenshareVideo')[]): Promise<void>;
2551
+ unsubscribe(peerIds: string[], kinds?: ('audio' | 'video' | 'screenshareAudio' | 'screenshareVideo')[]): Promise<void>;
2552
+ getPeerIdsForCurrentPage(): string[];
2553
+ setPage(page: number): Promise<void>;
2554
+ disableAllAudio(allowUnmute: boolean): Promise<void>;
2555
+ disableAllVideo(): Promise<void>;
2556
+ disableAudio(participantId: string): Promise<void>;
2557
+ disableVideo(participantId: string): Promise<void>;
2558
+ kick(participantId: string): Promise<void>;
2559
+ kickAll(): Promise<void>;
2560
+ broadcastMessage(type: Exclude<string, 'spotlight'>, payload: BroadcastMessagePayload, target?: BroadcastMessageTarget): Promise<void>;
2561
+ getAllJoinedPeers(searchQuery: string, limit: number, offset: number): Promise<{
2562
+ id: string;
2563
+ userId: string;
2564
+ name: string;
2565
+ displayName: string;
2566
+ stageType: StageStatus;
2567
+ customParticipantId: string;
2568
+ presetId: string;
2569
+ picture: string;
2570
+ waitlisted: boolean;
2571
+ stageStatus: StageStatus;
2572
+ metadata: {
2573
+ preset_name: string;
2574
+ };
2575
+ recorderType: string;
2576
+ flags: {
2577
+ hiddenParticipant: boolean;
2578
+ hidden_participant: boolean;
2579
+ recorder: boolean;
2580
+ };
2581
+ }[]>;
2582
+ updatePermissions(participantIds: string[], permissions: PresetUpdates): Promise<void>;
2583
+ getParticipantsInMeetingPreJoin(): Promise<RoomPeersInfoResponse>;
2584
+ }
2585
+
2586
+ type EventHandlerTypes = PeerInfoResponse | GetWaitingRoomRequests | RecordingEvent | UpdatePeersPresetResponse | PeerJoinBroadcastResponse | PeerJoinCompleteResponse | GlobalPeerPinningBroadcastResponse | PeerLeaveResponse | SelectedPeersResponse | SelectedPeersDiffResponse;
2587
+ declare class RoomSocketHandler {
2588
+ #private;
2589
+ socket: SocketService;
2590
+ static create(socket: SocketService, context: Context<RTKContextState>): RoomSocketHandler;
2591
+ static cleanup(): void;
2592
+ constructor(socketService: SocketService, context: Context<RTKContextState>);
2593
+ joinRoom(opts: {
2594
+ name: string;
2595
+ id: string;
2596
+ userId: string;
2597
+ customParticipantId: string;
2598
+ picture?: string;
2599
+ }, viewType: ViewType): Promise<{
2600
+ peer: Peer;
2601
+ }>;
2602
+ getAllAddedParticipants(): Promise<RTKBasicParticipant[]>;
2603
+ getRoomPeers(searchQuery: string, limit: number, offset: number): Promise<RoomPeersInfoResponse>;
2604
+ getRoomPeersNonPaginated(): Promise<RoomPeersInfoResponse>;
2605
+ getStagePeers(): Promise<RoomPeersInfoResponse>;
2606
+ getPeerInfo(peerId: string): Promise<PeerInfoResponse>;
2607
+ getRoomState(): Promise<RoomInfoResponse>;
2608
+ getRoomStageState(): Promise<GetRoomStageStateResponse>;
2609
+ broadcastMessage(type: string, payload: BroadcastMessagePayload): Promise<{
2500
2610
  id: string;
2501
2611
  payload: Uint8Array;
2502
2612
  }>;
2503
- getChatMessagesPaginated(timeStamp: number, size: number, reversed: boolean, offset?: number, channelId?: string): Promise<GetPaginatedChatMessageRoomResponse>;
2504
- sendMessageToRoom(message: string, messageType: ChatMessageType): void;
2505
- sendMessageToPeers(message: string, messageType: ChatMessageType, peerIds: string[]): void;
2506
- sendMessageToChannel(message: string, messageType: ChatMessageType, channelId: string): void;
2507
- sendMessage(message: string, messageType: ChatMessageType, peerIds?: string[], channelId?: string): void;
2508
- editMessage(chatId: string, message: string, payloadType: ChatMessageType, channelId?: string, pinned?: boolean): Promise<ChatMessage>;
2509
- deleteMessage(chatId: string, channelId?: string): Promise<{
2510
- channelId?: string;
2613
+ broadcastToMeetings(type: string, meetingIds: string[], payload: BroadcastMessagePayload): Promise<{
2511
2614
  id: string;
2615
+ payload: Uint8Array;
2512
2616
  }>;
2513
- searchMessages(query: string, filters: SearchFilters): Promise<ChatMessage[]>;
2514
- getAllChannels(): Promise<ChatChannel[]>;
2515
- markLastReadMessage(channelId: string, message: Message): Promise<string>;
2516
- setPinState(message: Message, pin: boolean): Promise<PinChatMessageResponse>;
2517
- on(event: number, handler: (socketMessage: ChatSocketMessage) => void): void;
2617
+ broadcastToPeers(type: string, peerIds: string[], payload: BroadcastMessagePayload): Promise<boolean>;
2618
+ leaveRoom(): Promise<void>;
2619
+ kick(peerId: string): Promise<void>;
2620
+ kickAll(propagateKickAll?: boolean): Promise<void>;
2621
+ getWaitingRoomRequests(): void;
2622
+ acceptWaitingRoomRequest(userIds: string[]): void;
2623
+ rejectWaitingRoomRequest(userIds: string[]): void;
2624
+ updatePermissions(userIds: string[], patch: PresetUpdates): Promise<{
2625
+ id: string;
2626
+ payload: Uint8Array;
2627
+ }>;
2628
+ private handleSocketEvents;
2629
+ on(event: number, handler: (message: EventHandlerTypes) => void): void;
2630
+ getUserPermissions(userId: string): Promise<Pick<PresetTypeV2['permissions'], 'chat' | 'polls' | 'plugins'>>;
2518
2631
  }
2519
2632
 
2520
- interface ResponseStatus {
2521
- success: boolean;
2522
- message: string;
2633
+ interface DeviceConfig {
2634
+ browserName: string;
2635
+ browserVersion: string;
2636
+ isMobile: boolean;
2637
+ engineName: string;
2638
+ osName: string;
2523
2639
  }
2524
-
2525
- type MediaPermission$1 = 'NOT_REQUESTED' | 'ACCEPTED' | 'DENIED' | 'SYSTEM_DENIED' | 'COULD_NOT_START' | 'NO_DEVICES_AVAILABLE' | 'CANCELED';
2526
-
2527
- declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
2528
- #private;
2529
- audioUpdateInProgress: boolean;
2530
- videoUpdateInProgress: boolean;
2531
- constructor(context: Context<RTKContextState>, mediaConstraints: MediaConstraints, isNonPreferredDevice?: (media: MediaDeviceInfo) => boolean, autoSwitchDevice?: boolean);
2532
- private onVisibilityChange;
2533
- repopulateAvailableDevices(): Promise<boolean>;
2534
- setupStreams({ audio, video, }: {
2535
- audio: boolean;
2536
- video: boolean;
2537
- }): Promise<void>;
2538
- getCurrentDevices(): {
2539
- audio: MediaDeviceInfo;
2540
- video: MediaDeviceInfo;
2541
- speaker: MediaDeviceInfo;
2640
+ interface ProducerState {
2641
+ producerId: string;
2642
+ kind: 'audio' | 'video';
2643
+ pause: boolean;
2644
+ screenShare: boolean;
2645
+ producingTransportId: string;
2646
+ producingPeerId: string;
2647
+ }
2648
+ interface Participant {
2649
+ id: string;
2650
+ userId: string;
2651
+ displayName: string;
2652
+ device?: DeviceConfig;
2653
+ picture?: string;
2654
+ isHost: boolean;
2655
+ flags: {
2656
+ [key: string]: string | boolean;
2542
2657
  };
2543
- get permissions(): {
2544
- audio?: MediaPermission$1;
2545
- video?: MediaPermission$1;
2546
- screenshare?: MediaPermission$1;
2658
+ clientSpecificId?: string;
2659
+ customParticipantId?: string;
2660
+ stageStatus?: StageStatus;
2661
+ audioMuted: boolean;
2662
+ audioTrack: MediaStreamTrack;
2663
+ videoTrack: MediaStreamTrack;
2664
+ videoEnabled: boolean;
2665
+ producers?: ProducerState[];
2666
+ metadata?: {
2667
+ preset_name?: string;
2547
2668
  };
2548
- getAllDevices(): Promise<InputDeviceInfo[]>;
2549
- getDeviceById(deviceId: string, kind?: 'audioinput' | 'audiooutput' | 'videoinput'): Promise<MediaDeviceInfo>;
2550
- private onAudioTrackMuted;
2551
- private onAudioTrackChanged;
2552
- get rawAudioTrack(): MediaStreamTrack;
2553
- get audioTrack(): MediaStreamTrack;
2554
- get audioEnabled(): boolean;
2555
- enableAudio(): Promise<void>;
2556
- disableAudio(): void;
2557
- getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2558
- setAudioDevice(device: MediaDeviceInfo): Promise<void>;
2559
- setupSpeaker(): Promise<void>;
2560
- setSpeakerDevice(device: MediaDeviceInfo): Promise<void>;
2561
- private onVideoTrackChanged;
2562
- private onVideoTrackEnded;
2563
- get rawVideoTrack(): MediaStreamTrack;
2564
- get videoTrack(): MediaStreamTrack;
2565
- get videoEnabled(): boolean;
2566
- enableVideo(): Promise<void>;
2567
- disableVideo(): void;
2568
- getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2569
- setVideoDevice(device: MediaDeviceInfo): Promise<void>;
2570
- updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
2571
- private onScreenShareEnded;
2572
- get screenShareTracks(): {
2669
+ recorderType?: string;
2670
+ }
2671
+ declare class RTKParticipant$1 extends RTKTypedEventEmitter<ParticipantEvents> {
2672
+ #private;
2673
+ id: string;
2674
+ userId: string;
2675
+ name: string;
2676
+ picture: string;
2677
+ isHost: boolean;
2678
+ customParticipantId?: string;
2679
+ get clientSpecificId(): string;
2680
+ flags: {
2681
+ [key: string]: string | boolean;
2682
+ };
2683
+ device: DeviceConfig;
2684
+ videoTrack: MediaStreamTrack;
2685
+ audioTrack: MediaStreamTrack;
2686
+ screenShareTracks: {
2573
2687
  audio: MediaStreamTrack;
2574
2688
  video: MediaStreamTrack;
2575
2689
  };
2576
- get screenShareEnabled(): boolean;
2577
- enableScreenShare(): Promise<void>;
2578
- disableScreenShare(): Promise<void>;
2579
- updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
2690
+ videoEnabled: boolean;
2691
+ audioEnabled: boolean;
2692
+ screenShareEnabled: boolean;
2693
+ producers: ProducerState[];
2694
+ manualProducerConfig: PeerProducerConfig;
2695
+ supportsRemoteControl: boolean;
2696
+ presetName?: string;
2697
+ get stageStatus(): StageStatus;
2698
+ private get mediaJoined();
2699
+ private get socketJoined();
2700
+ constructor(context: Context<RTKContextState>, participant: Participant, self: RTKSelf, roomSocket: RoomSocketHandler);
2701
+ setVideoEnabled(videoEnabled: boolean, emitEvent?: boolean): void;
2702
+ setAudioEnabled(audioEnabled: boolean, emitEvent?: boolean): void;
2703
+ setScreenShareEnabled(screenShareEnabled: boolean, emitEvent?: boolean): void;
2704
+ private setupEvents;
2705
+ pin(): Promise<unknown>;
2706
+ unpin(): Promise<unknown>;
2707
+ setIsPinned(isPinned: boolean, emitEvent?: boolean): void;
2708
+ disableAudio(): Promise<void>;
2709
+ kick(): Promise<void>;
2710
+ disableVideo(): Promise<void>;
2711
+ getPermissions(): Promise<Pick<_dyteinternals_utils.Permissions, "plugins" | "polls" | "chat">>;
2712
+ setStageStatus(stageStatus: StageStatus): void;
2713
+ get isPinned(): boolean;
2714
+ registerVideoElement(videoElem: HTMLVideoElement): void;
2715
+ deregisterVideoElement(videoElem?: HTMLVideoElement): void;
2716
+ private updateVideo;
2717
+ }
2718
+
2719
+ declare abstract class RoomNodeClient {
2720
+ #private;
2721
+ meetingTitle: string;
2722
+ roomName: string;
2723
+ roomUUID: string;
2724
+ context: Context<RTKContextState>;
2725
+ get peerId(): string;
2726
+ authToken: string;
2727
+ maxPreferredStreams: number;
2728
+ get mediaJoined(): boolean;
2729
+ set mediaJoined(_joined: boolean);
2730
+ get sfuHandler(): any;
2731
+ get mediaState(): MediaConnectionState;
2732
+ reconnect(): void;
2733
+ partialJoinRoom(displayName: string, roomUuid: string, rejoining?: boolean, loc?: GeoLocation): Promise<void>;
2734
+ joinRoom(displayName: string, roomUUID: string, currentUserSharedMediaStates?: {
2735
+ audio?: boolean;
2736
+ video?: boolean;
2737
+ screen?: boolean;
2738
+ }, forceFullReset?: boolean, rejoining?: boolean): Promise<{
2739
+ roomJoined: boolean;
2740
+ }>;
2741
+ leaveRoom(): Promise<void>;
2742
+ reset(full?: boolean): void;
2743
+ handleSocketCallbacks(message: any): Promise<void>;
2744
+ handleSockets(message: any, callBack: (arg?: string) => void): Promise<void>;
2745
+ shareMic(audioTrack: MediaStreamTrack): Promise<void>;
2746
+ shareWebcam(videoTrack: MediaStreamTrack): Promise<MediaStreamTrack | null>;
2747
+ shareScreen(screenShareTracks: {
2748
+ audio?: MediaStreamTrack;
2749
+ video?: MediaStreamTrack;
2750
+ }): Promise<void>;
2751
+ unmuteSelf(): Promise<void>;
2752
+ muteSelf(): Promise<void>;
2753
+ pauseWebcam(): Promise<void>;
2754
+ disableScreenShare(): Promise<void>;
2755
+ acceptWaitingRequest(id: string): Promise<void>;
2756
+ rejectWaitingRequest(id: string): Promise<void>;
2757
+ muteAll(allowUnMute: boolean): Promise<void>;
2758
+ muteAllVideo(): Promise<void>;
2759
+ disableAudio(peerId: string): Promise<void>;
2760
+ disableVideo(peerId: string): Promise<void>;
2761
+ kickAll(): Promise<void>;
2762
+ kick(peerId: string): Promise<void>;
2763
+ pinPeer(id: string): Promise<unknown>;
2764
+ getConsumers(): any;
2765
+ stopAllProducers(): void;
2766
+ activatePeers(producers: ProducerState[]): Promise<void>;
2767
+ deactivatePeers(producers: ProducerState[], mode?: 'manual' | 'default'): Promise<void>;
2768
+ createConsumers(producers: ProducerState[]): Promise<void>;
2769
+ closeConsumers(producers: ProducerState[]): Promise<void>;
2770
+ switchConsumersToLayer(consumerIds: string[], layer: number): Promise<void>;
2771
+ }
2772
+
2773
+ type ChatChannelSocketMessage = GetChatChannelResponse;
2774
+ interface ChatChannel {
2775
+ id: string;
2776
+ displayName: string;
2777
+ memberIds: string[];
2778
+ displayPictureUrl?: string;
2779
+ visibility?: string;
2780
+ isDirectMessage?: boolean;
2781
+ latestMessage?: Message;
2782
+ unreadCount: number;
2783
+ }
2784
+ interface UpdateChannelRequestPayload {
2785
+ memberIds?: string[];
2786
+ displayName?: string;
2787
+ displayPictureUrl?: string;
2788
+ visibility?: string;
2789
+ }
2790
+ declare class ChatChannelSocketHandler {
2791
+ #private;
2792
+ constructor(socketService: SocketService);
2793
+ createChannel(displayName: string, memberIds: string[], displayPictureUrl?: string, visibility?: string, isDirectMessage?: boolean): Promise<ChatChannel>;
2794
+ updateChannel(channelId: string, payload: UpdateChannelRequestPayload): Promise<ChatChannel>;
2795
+ static formatChannel(socketChannel: ChatChannel$1): ChatChannel;
2796
+ getChannelMembers(channelId: string): Promise<RTKBasicParticipant[]>;
2797
+ on(event: number, handler: (socketMessage: ChatChannelSocketMessage) => void): void;
2798
+ }
2799
+
2800
+ declare enum ChatMessageType {
2801
+ TEXT = 0,
2802
+ IMAGE = 1,
2803
+ FILE = 2,
2804
+ CUSTOM = 3
2805
+ }
2806
+ type ChatSocketMessage = SendChatMessageToRoomResponse | SendChatMessageToPeersResponse | EditChatMessageResponse | DeleteChatMessageResponse;
2807
+ interface SearchFilters {
2808
+ channelId?: string;
2809
+ timestamp?: number;
2810
+ size?: number;
2811
+ reversed?: boolean;
2812
+ }
2813
+ declare class ChatSocketHandler {
2814
+ #private;
2815
+ constructor(socketService: SocketService);
2816
+ getChatMessages(): Promise<{
2817
+ id: string;
2818
+ payload: Uint8Array;
2819
+ }>;
2820
+ getChatMessagesPaginated(timeStamp: number, size: number, reversed: boolean, offset?: number, channelId?: string): Promise<GetPaginatedChatMessageRoomResponse>;
2821
+ sendMessageToRoom(message: string, messageType: ChatMessageType): void;
2822
+ sendMessageToPeers(message: string, messageType: ChatMessageType, peerIds: string[]): void;
2823
+ sendMessageToChannel(message: string, messageType: ChatMessageType, channelId: string): void;
2824
+ sendMessage(message: string, messageType: ChatMessageType, peerIds?: string[], channelId?: string): void;
2825
+ editMessage(chatId: string, message: string, payloadType: ChatMessageType, channelId?: string, pinned?: boolean): Promise<ChatMessage>;
2826
+ deleteMessage(chatId: string, channelId?: string): Promise<{
2827
+ channelId?: string;
2828
+ id: string;
2829
+ }>;
2830
+ searchMessages(query: string, filters: SearchFilters): Promise<ChatMessage[]>;
2831
+ getAllChannels(): Promise<ChatChannel[]>;
2832
+ markLastReadMessage(channelId: string, message: Message): Promise<string>;
2833
+ setPinState(message: Message, pin: boolean): Promise<PinChatMessageResponse>;
2834
+ on(event: number, handler: (socketMessage: ChatSocketMessage) => void): void;
2835
+ }
2836
+
2837
+ interface ResponseStatus {
2838
+ success: boolean;
2839
+ message: string;
2840
+ }
2841
+
2842
+ type MediaPermission$1 = 'NOT_REQUESTED' | 'ACCEPTED' | 'DENIED' | 'SYSTEM_DENIED' | 'COULD_NOT_START' | 'NO_DEVICES_AVAILABLE' | 'CANCELED';
2843
+
2844
+ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
2845
+ #private;
2846
+ audioUpdateInProgress: boolean;
2847
+ videoUpdateInProgress: boolean;
2848
+ constructor(context: Context<RTKContextState>, mediaConstraints: MediaConstraints, isNonPreferredDevice?: (media: MediaDeviceInfo) => boolean, autoSwitchDevice?: boolean);
2849
+ private onVisibilityChange;
2850
+ repopulateAvailableDevices(): Promise<boolean>;
2851
+ setupStreams({ audio, video, }: {
2852
+ audio: boolean;
2853
+ video: boolean;
2854
+ }): Promise<void>;
2855
+ getCurrentDevices(): {
2856
+ audio: MediaDeviceInfo;
2857
+ video: MediaDeviceInfo;
2858
+ speaker: MediaDeviceInfo;
2859
+ };
2860
+ get permissions(): {
2861
+ audio?: MediaPermission$1;
2862
+ video?: MediaPermission$1;
2863
+ screenshare?: MediaPermission$1;
2864
+ };
2865
+ getAllDevices(): Promise<InputDeviceInfo[]>;
2866
+ getDeviceById(deviceId: string, kind?: 'audioinput' | 'audiooutput' | 'videoinput'): Promise<MediaDeviceInfo>;
2867
+ private onAudioTrackMuted;
2868
+ private onAudioTrackChanged;
2869
+ get rawAudioTrack(): MediaStreamTrack;
2870
+ get audioTrack(): MediaStreamTrack;
2871
+ get audioEnabled(): boolean;
2872
+ enableAudio(): Promise<void>;
2873
+ disableAudio(): void;
2874
+ getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2875
+ setAudioDevice(device: MediaDeviceInfo): Promise<void>;
2876
+ setupSpeaker(): Promise<void>;
2877
+ setSpeakerDevice(device: MediaDeviceInfo): Promise<void>;
2878
+ private onVideoTrackChanged;
2879
+ private onVideoTrackEnded;
2880
+ get rawVideoTrack(): MediaStreamTrack;
2881
+ get videoTrack(): MediaStreamTrack;
2882
+ get videoEnabled(): boolean;
2883
+ enableVideo(): Promise<void>;
2884
+ disableVideo(): void;
2885
+ getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2886
+ setVideoDevice(device: MediaDeviceInfo): Promise<void>;
2887
+ updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
2888
+ private onScreenShareEnded;
2889
+ get screenShareTracks(): {
2890
+ audio: MediaStreamTrack;
2891
+ video: MediaStreamTrack;
2892
+ };
2893
+ get screenShareEnabled(): boolean;
2894
+ enableScreenShare(): Promise<void>;
2895
+ disableScreenShare(): Promise<void>;
2896
+ updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
2580
2897
  getSpeakerDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2581
2898
  addAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<ResponseStatus>;
2582
2899
  removeAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<ResponseStatus>;
2900
+ removeAllAudioMiddlewares(): Promise<ResponseStatus>;
2583
2901
  addVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<ResponseStatus>;
2584
2902
  removeVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<ResponseStatus>;
2903
+ removeAllVideoMiddlewares(): Promise<ResponseStatus>;
2585
2904
  setVideoMiddlewareGlobalConfig(config: VideoMiddlewareGlobalConfig): Promise<void>;
2586
2905
  destruct(): void;
2587
2906
  onDeviceChange(changedDevices: {
@@ -2590,6 +2909,8 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
2590
2909
  devices: MediaDeviceInfo[];
2591
2910
  }, skipDeviceChange: boolean): Promise<void>;
2592
2911
  removeAllTracks(): void;
2912
+ removeAudioTrack(): void;
2913
+ removeVideoTrack(): void;
2593
2914
  removeDocumentEventListeners(): Promise<void>;
2594
2915
  }
2595
2916
 
@@ -2675,6 +2996,7 @@ type PresetV2CamelCased = {
2675
2996
  frameRate: number;
2676
2997
  };
2677
2998
  };
2999
+ livestreamViewerQualities: LivestreamViewerMediaQualityType[];
2678
3000
  maxVideoStreams: {
2679
3001
  mobile: number;
2680
3002
  desktop: number;
@@ -2748,7 +3070,7 @@ type PresetV2CamelCased = {
2748
3070
  };
2749
3071
  };
2750
3072
  isRecorder?: boolean;
2751
- recorderType: RecorderType;
3073
+ recorderType: RecorderType$1;
2752
3074
  hiddenParticipant: boolean;
2753
3075
  showParticipantList: boolean;
2754
3076
  canChangeParticipantPermissions: boolean;
@@ -2839,6 +3161,7 @@ declare class RTKThemePreset$1 {
2839
3161
  }>;
2840
3162
  get pipMode(): Readonly<boolean>;
2841
3163
  get viewType(): Readonly<ViewType>;
3164
+ get livestreamViewerQualities(): Readonly<LivestreamViewerMediaQualityType[]>;
2842
3165
  get maxVideoStreams(): Readonly<MaxVideoStreams>;
2843
3166
  get maxScreenShareCount(): Readonly<number>;
2844
3167
  get plugins(): Readonly<string[]>;
@@ -2855,7 +3178,7 @@ type PermissionEvents = {
2855
3178
  ['chatUpdate']: () => void;
2856
3179
  ['pollsUpdate']: () => void;
2857
3180
  ['pluginsUpdate']: () => void;
2858
- ['permissionsUpdate']: () => void;
3181
+ ['permissionsUpdate']: (patch: PresetUpdates) => void;
2859
3182
  ['*']: () => void;
2860
3183
  };
2861
3184
  declare class RTKPermissionsPreset$1 extends RTKTypedEventEmitter<PermissionEvents> {
@@ -2918,6 +3241,38 @@ interface UserDetailsResponseV2 {
2918
3241
  }
2919
3242
  type leaveRoomState = 'kicked' | 'ended' | 'left' | 'rejected' | 'connected-meeting' | 'disconnected' | 'failed';
2920
3243
 
3244
+ type LivestreamState = 'IDLE' | 'STARTING' | 'WAITING_ON_MANUAL_INGESTION' | 'LIVESTREAMING' | 'STOPPING';
3245
+ type LivestreamEvents = {
3246
+ ['livestreamUpdate']: (state: LivestreamState) => void;
3247
+ ['viewerCountUpdate']: (count: number) => void;
3248
+ ['*']: (eventName: string, ...args: any[]) => void;
3249
+ };
3250
+ type StartLivestreamConfig = {
3251
+ manualIngestion: boolean;
3252
+ };
3253
+ interface LivestreamIngestionCredentials {
3254
+ ingestionServer: string;
3255
+ streamKey: string;
3256
+ }
3257
+ type LivestreamResponse = {
3258
+ status: string;
3259
+ playbackUrl: string;
3260
+ manualIngest: boolean;
3261
+ ingestionCredentials?: LivestreamIngestionCredentials;
3262
+ };
3263
+ declare class RTKLivestream$1 extends RTKTypedEventEmitter<LivestreamEvents> {
3264
+ #private;
3265
+ state: LivestreamState;
3266
+ playbackUrl: string | undefined;
3267
+ ingestionCredentials: LivestreamIngestionCredentials;
3268
+ viewerCount: number;
3269
+ constructor(self: RTKSelf);
3270
+ setLivestreamState(livestreamState: LivestreamState): void;
3271
+ private emitCurrentLivestreamState;
3272
+ start(livestreamConfig?: StartLivestreamConfig): Promise<void>;
3273
+ stop(): Promise<void>;
3274
+ }
3275
+
2921
3276
  interface RecordingConfig {
2922
3277
  fileNamePrefix?: string;
2923
3278
  videoConfig?: {
@@ -2949,15 +3304,12 @@ declare abstract class BaseAPIClient extends API {
2949
3304
  abstract getActiveTranscript(): Promise<{
2950
3305
  transcript: string;
2951
3306
  }>;
2952
- abstract startLivestreaming(): Promise<string>;
3307
+ abstract startLivestreaming(startLivestreamConfig: StartLivestreamConfig): Promise<LivestreamResponse>;
2953
3308
  abstract stopLivestreaming(): Promise<void>;
2954
- abstract getActiveLivestream(): Promise<{
2955
- status: string;
2956
- playbackUrl: string;
2957
- }>;
3309
+ abstract getActiveLivestream(): Promise<LivestreamResponse>;
2958
3310
  getIPDetails(): Promise<any>;
2959
3311
  getICEServers(): Promise<any>;
2960
- getPlugins(): Promise<RTKPluginResponse[]>;
3312
+ getPlugins(): Promise<any[]>;
2961
3313
  getPluginDetails(pluginId: string): Promise<RTKPluginResponse>;
2962
3314
  getPluginConfig(pluginBaseUrl: string): Promise<PluginConfig>;
2963
3315
  authorizePlugin(pluginId: string): Promise<string>;
@@ -3070,7 +3422,7 @@ declare class RTKChat$1 extends RTKTypedEventEmitter<ChatEvents> {
3070
3422
  channels: ChatChannel[];
3071
3423
  maxTextLimit: number;
3072
3424
  setMaxTextLimit(limit: number): void;
3073
- private get roomJoined();
3425
+ private get socketJoined();
3074
3426
  constructor(context: Context<RTKContextState>, chatSocketHandler: ChatSocketHandler, chatChannelSocketHandler: ChatChannelSocketHandler, self: RTKSelf$1, participants: RTKParticipants$1);
3075
3427
  private sendMessageInternal;
3076
3428
  private sendTextMessageInternal;
@@ -3124,6 +3476,7 @@ declare class PollSocketHandler {
3124
3476
  createPoll(question: string, options: string[], anonymous?: boolean, hideVotes?: boolean): boolean;
3125
3477
  votePoll(id: string, index: number): boolean;
3126
3478
  on(event: number, handler: (message: UpdatePollResponse) => void): void;
3479
+ removeListeners(event: number): void;
3127
3480
  }
3128
3481
 
3129
3482
  interface PollOption {
@@ -3154,7 +3507,7 @@ type PollsEvents = {
3154
3507
  declare class RTKPolls$1 extends RTKTypedEventEmitter<PollsEvents> {
3155
3508
  #private;
3156
3509
  items: Poll[];
3157
- private get roomJoined();
3510
+ private get socketJoined();
3158
3511
  constructor(context: Context<RTKContextState>, self: RTKSelf$1, pollSocketHandler: PollSocketHandler);
3159
3512
  create(question: string, options: string[], anonymous?: boolean, hideVotes?: boolean): Promise<void>;
3160
3513
  vote(id: string, index: number): Promise<void>;
@@ -3246,6 +3599,10 @@ declare class RTKSelfMedia extends RTKTypedEventEmitter<SelfEvents> {
3246
3599
  success: boolean;
3247
3600
  message: string;
3248
3601
  }>;
3602
+ removeAllAudioMiddlewares(): Promise<{
3603
+ success: boolean;
3604
+ message: string;
3605
+ }>;
3249
3606
  get videoTrack(): MediaStreamTrack;
3250
3607
  get rawVideoTrack(): MediaStreamTrack;
3251
3608
  addVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<{
@@ -3257,6 +3614,10 @@ declare class RTKSelfMedia extends RTKTypedEventEmitter<SelfEvents> {
3257
3614
  success: boolean;
3258
3615
  message: string;
3259
3616
  }>;
3617
+ removeAllVideoMiddlewares(): Promise<{
3618
+ success: boolean;
3619
+ message: string;
3620
+ }>;
3260
3621
  get screenShareTracks(): {
3261
3622
  audio: MediaStreamTrack;
3262
3623
  video: MediaStreamTrack;
@@ -3283,9 +3644,11 @@ declare class RTKSelfMedia extends RTKTypedEventEmitter<SelfEvents> {
3283
3644
  }
3284
3645
 
3285
3646
  type RecordingState = 'IDLE' | 'STARTING' | 'RECORDING' | 'PAUSED' | 'STOPPING';
3647
+ type RecordingType = 'BROWSER' | 'TRACK' | 'COMPOSITE';
3286
3648
  type RecordingInfo = {
3287
3649
  state: RecordingState;
3288
3650
  id: string;
3651
+ type: RecordingType;
3289
3652
  };
3290
3653
  type RecordingEvents = {
3291
3654
  ['recordingUpdate']: (state: RecordingState) => void;
@@ -3391,6 +3754,7 @@ declare const enum PRODUCERS_TYPE {
3391
3754
  type SupportedEventSeverities = 'info' | 'error' | 'debug' | 'log' | 'warn';
3392
3755
  type LogData$2 = {
3393
3756
  error?: ReturnType<typeof createSafeToLogError>;
3757
+ peers?: string;
3394
3758
  flags?: string | {
3395
3759
  [key: string]: {
3396
3760
  enabled: boolean;
@@ -3402,6 +3766,7 @@ type LogData$2 = {
3402
3766
  constraints?: string | RTKMediaStreamConstraints;
3403
3767
  timeout?: number;
3404
3768
  execTime?: number;
3769
+ country?: string;
3405
3770
  media?: {
3406
3771
  audio?: {
3407
3772
  enabled: boolean;
@@ -3452,6 +3817,11 @@ type LogData$2 = {
3452
3817
  message: string;
3453
3818
  deviceId?: string;
3454
3819
  };
3820
+ pip?: {
3821
+ id: string;
3822
+ handRaised?: boolean;
3823
+ source?: any;
3824
+ };
3455
3825
  memoize?: {
3456
3826
  doubleInvoked?: {
3457
3827
  property: string;
@@ -3622,476 +3992,281 @@ type LogData$2 = {
3622
3992
  };
3623
3993
  source?: string;
3624
3994
  eventListener?: {
3625
- eventName: string;
3626
- listenerCount: number;
3627
- };
3628
- dataChannelMessageChunk?: {
3629
- id: string;
3630
- count: number;
3631
- chunkIndex: number;
3632
- chunk: string;
3633
- transprtId: string;
3634
- };
3635
- };
3636
-
3637
- type EventSeverities = SupportedEventSeverities;
3638
- type LogData$1 = LogData$2;
3639
- declare class RTKTelemetry {
3640
- static logsCache: {
3641
- [key: string]: any;
3642
- }[];
3643
- static logsProcessorTimer: NodeJS.Timer;
3644
- static get logsEndpoint(): string;
3645
- static tracingEnabled: boolean;
3646
- static initialized: boolean;
3647
- static readonly logsProcessingInterval = 7000;
3648
- static logExclusionList: string[];
3649
- static meetingMetadata: {
3650
- peerId?: string;
3651
- roomName?: string;
3652
- organizationId?: string;
3653
- sdkVersion?: string;
3654
- deviceInfo?: object;
3655
- visitedUrl?: string;
3656
- userId?: string;
3657
- };
3658
- static resetPeerId(peerId: string): void;
3659
- static init(context: Context<RTKContextState>, enableTracing: boolean): void;
3660
- static trace(spanName: string): (_target: Object, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
3661
- static injectContext(injectionReceiver: any): void;
3662
- static addLogInCurrentSpan(eventSeverity: EventSeverities, eventName: string, metadata?: LogData$1, noCache?: boolean): void;
3663
- static sendOtelLogsToNewRelic(logs: object[]): void;
3664
- static processCachedLogs(): void;
3665
- static destruct(): void;
3666
- }
3667
-
3668
- type LogData = LogData$1;
3669
- declare class RTKLogger {
3670
- static info(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
3671
- static error(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
3672
- static debug(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
3673
- static log(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
3674
- static warn(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
3675
- }
3676
-
3677
- declare class RTKInternals {
3678
- logger: typeof RTKLogger;
3679
- features: typeof RTKFeatures;
3680
- browserSpecs: BrowserCapabilities;
3681
- callStats: any;
3682
- constructor(logger: typeof RTKLogger, features: typeof RTKFeatures, callStats: any);
3683
- static init(callstats: any): RTKInternals;
3684
- }
3685
-
3686
- type LivestreamState = 'IDLE' | 'STARTING' | 'LIVESTREAMING' | 'STOPPING';
3687
- type LivestreamEvents = {
3688
- ['livestreamUpdate']: (state: LivestreamState) => void;
3689
- ['viewerCountUpdate']: (count: number) => void;
3690
- ['*']: (eventName: string, ...args: any[]) => void;
3691
- };
3692
- declare class RTKLivestream$1 extends RTKTypedEventEmitter<LivestreamEvents> {
3693
- #private;
3694
- state: LivestreamState;
3695
- playbackUrl: string | undefined;
3696
- viewerCount: number;
3697
- constructor(self: RTKSelf);
3698
- setLivestreamState(livestreamState: LivestreamState): void;
3699
- private emitCurrentLivestreamState;
3700
- start(): Promise<void>;
3701
- stop(): Promise<void>;
3702
- }
3703
-
3704
- type StoreData = {
3705
- [type: string]: any;
3706
- };
3707
- declare class RTKStore {
3708
- #private;
3709
- name: string;
3710
- volatile: boolean;
3711
- private listeners;
3712
- constructor({ name, socketHandler, meetingId }: {
3713
- name: string;
3714
- socketHandler: PluginSocketHandler;
3715
- meetingId: string;
3716
- });
3717
- set(key: string, value: any, sync?: boolean, emit?: boolean): Promise<void>;
3718
- bulkSet(data: {
3719
- key: string;
3720
- payload: any;
3721
- }[]): Promise<void>;
3722
- update(key: string, value: any, sync?: boolean): Promise<void>;
3723
- delete(key: string, sync?: boolean, emit?: boolean): Promise<void>;
3724
- bulkDelete(data: {
3725
- key: string;
3726
- }[]): Promise<void>;
3727
- get(key: string): any;
3728
- getAll(): StoreData;
3729
- subscribe(key: string | '*', cb: (value: any) => any): void;
3730
- unsubscribe(key: string | '*'): void;
3731
- populate(data: StoreData): void;
3732
- }
3733
-
3734
- declare class RTKStoreManager {
3735
- #private;
3736
- stores: Map<String, RTKStore>;
3737
- constructor(context: Context<RTKContextState>, handler: PluginSocketHandler);
3738
- create(name: string): Promise<RTKStore>;
3739
- }
3740
-
3741
- declare class RTKSelectedPeers {
3742
- private readonly _activeSpeakerPeers;
3743
- private readonly _compulsoryPeers;
3744
- constructor();
3745
- add(peerId: string, priority: number): number;
3746
- delete(peerId: string): void;
3747
- index(peerId: string): number;
3748
- get peers(): string[];
3749
- get compulsoryPeers(): string[];
3750
- get peerPriorities(): number[];
3751
- get activeSpeakerPeers(): string[];
3752
- private _removeFromCompulsoryPeer;
3753
- }
3754
-
3755
- interface Modules {
3756
- pip?: boolean;
3757
- chat?: boolean;
3758
- poll?: boolean;
3759
- theme?: boolean;
3760
- stage?: boolean;
3761
- plugin?: boolean;
3762
- tracing?: boolean;
3763
- internals?: boolean;
3764
- recording?: boolean;
3765
- livestream?: boolean;
3766
- participant?: boolean;
3767
- connectedMeetings?: boolean;
3768
- e2ee?: {
3769
- manager: any;
3770
- enabled: boolean;
3771
- };
3772
- devTools?: {
3773
- logs: boolean;
3774
- plugins?: {
3775
- id: string;
3776
- name: string;
3777
- port: number;
3778
- picture?: string;
3779
- description?: string;
3780
- staggered?: boolean;
3781
- }[];
3782
- };
3783
- }
3784
- interface DefaultOptions {
3785
- video?: boolean;
3786
- audio?: boolean;
3787
- recording?: RecordingConfig;
3788
- mediaHandler?: RTKSelfMedia;
3789
- autoSwitchAudioDevice?: boolean;
3790
- mediaConfiguration?: {
3791
- video?: VideoQualityConstraints;
3792
- audio?: AudioQualityConstraints;
3793
- screenshare?: ScreenshareQualityConstraints;
3794
- };
3795
- isNonPreferredDevice?: (device: MediaDeviceInfo) => boolean;
3796
- }
3797
- interface RoomDetails {
3798
- sfu: MediaNodeType;
3799
- roomNodeUrl: string;
3800
- meetingTitle: string;
3801
- useHiveMedia: boolean;
3802
- }
3803
-
3804
- declare const modes: readonly ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
3805
- type ViewMode = (typeof modes)[number];
3806
- interface BroadcastMessagePayload {
3807
- [key: string]: boolean | number | string | Date | ActiveTab;
3808
- }
3809
- interface PeerProducerConfig {
3810
- audio: boolean;
3811
- video: boolean;
3812
- screenshareAudio: boolean;
3813
- screenshareVideo: boolean;
3814
- }
3815
- interface SubscriptionProducerConfig {
3816
- id: string;
3817
- producers: PeerProducerConfig;
3818
- }
3819
- type BroadcastMessageTarget = {
3820
- participantIds: string[];
3821
- } | {
3822
- presetNames: string[];
3823
- };
3824
- type ParticipantsEvents = {
3825
- ['viewModeChanged']: (payload: {
3826
- viewMode: string;
3827
- currentPage: number;
3828
- pageCount: number;
3829
- }) => void;
3830
- ['activeSpeaker']: (payload: {
3831
- peerId: string;
3832
- volume: number;
3833
- }) => void;
3834
- ['broadcastedMessage']: (payload: {
3835
- type: string;
3836
- payload: BroadcastMessagePayload;
3837
- timestamp: number;
3838
- }) => void;
3839
- ['poorConnection']: (payload: {
3840
- participantId: string;
3841
- score: number;
3842
- kind: string;
3843
- }) => void;
3844
- ['pageChanged']: (payload: {
3845
- viewMode: string;
3846
- currentPage: number;
3847
- pageCount: number;
3848
- }) => void;
3849
- ['mediaScoreUpdate']: (payload: {
3850
- kind: string;
3851
- isScreenshare: boolean;
3852
- score: number;
3853
- participantId: string;
3854
- }) => void;
3855
- ['media_decode_error']: (payload: {
3856
- reason: string;
3857
- code: '1702' | '1703';
3858
- }) => void;
3859
- ['*']: (event: string, ...args: any[]) => void;
3860
- };
3861
- declare class RTKParticipants$1 extends RTKTypedEventEmitter<ParticipantsEvents> {
3862
- #private;
3863
- readonly waitlisted: Readonly<RTKParticipantMap$1<Omit<RTKParticipant$1, 'audioTrack' | 'videoTrack' | 'screenShareTracks'>>>;
3864
- readonly joined: Readonly<RTKParticipantMap$1>;
3865
- readonly active: Readonly<RTKParticipantMap$1>;
3866
- readonly pinned: Readonly<RTKParticipantMap$1>;
3867
- readonly all: Readonly<RTKBasicParticipantsMap>;
3868
- readonly pip: Readonly<RTKPip>;
3869
- private get roomJoined();
3870
- viewMode: ViewMode;
3871
- currentPage: number;
3872
- lastActiveSpeaker: string;
3873
- selectedPeers: RTKSelectedPeers;
3874
- constructor(context: Context<RTKContextState>, self: RTKSelf$1, roomSocketHandler: RoomSocketHandler, modules?: Modules);
3875
- setupEvents(): void;
3876
- get count(): number;
3877
- get maxActiveParticipantsCount(): number;
3878
- setMaxActiveParticipantsCount(limit: number): void;
3879
- get pageCount(): number;
3880
- acceptWaitingRoomRequest(id: string): void;
3881
- acceptAllWaitingRoomRequest(userIds: string[]): Promise<void>;
3882
- rejectWaitingRoomRequest(id: string): Promise<void>;
3883
- setViewMode(viewMode: ViewMode): Promise<void>;
3884
- subscribe(peers: SubscriptionProducerConfig[]): Promise<void>;
3885
- unsubscribe(peers: string[]): Promise<void>;
3886
- getPeerIdsForCurrentPage(): string[];
3887
- setPage(page: number): Promise<void>;
3888
- disableAllAudio(allowUnmute: boolean): Promise<void>;
3889
- disableAllVideo(): Promise<void>;
3890
- disableAudio(participantId: string): Promise<void>;
3891
- disableVideo(participantId: string): Promise<void>;
3892
- kick(participantId: string): Promise<void>;
3893
- kickAll(): Promise<void>;
3894
- broadcastMessage(type: Exclude<string, 'spotlight'>, payload: BroadcastMessagePayload, target?: BroadcastMessageTarget): Promise<void>;
3895
- getAllJoinedPeers(searchQuery: string, limit: number, offset: number): Promise<{
3896
- id: string;
3897
- userId: string;
3898
- name: string;
3899
- displayName: string;
3900
- stageType: StageStatus;
3901
- customParticipantId: string;
3902
- presetId: string;
3903
- picture: string;
3904
- waitlisted: boolean;
3905
- stageStatus: StageStatus;
3906
- metadata: {
3907
- preset_name: string;
3908
- };
3909
- recorderType: string;
3910
- flags: {
3911
- hiddenParticipant: boolean;
3912
- recorder: boolean;
3913
- };
3914
- }[]>;
3915
- updatePermissions(participantIds: string[], permissions: PresetUpdates): Promise<void>;
3916
- getParticipantsInMeetingPreJoin(): Promise<RoomPeersInfoResponse>;
3917
- }
3918
-
3919
- type EventHandlerTypes = PeerInfoResponse | GetWaitingRoomRequests | RecordingEvent | UpdatePeersPresetResponse | PeerJoinBroadcastResponse | PeerJoinCompleteResponse | GlobalPeerPinningBroadcastResponse | PeerLeaveResponse | SelectedPeersResponse | SelectedPeersDiffResponse;
3920
- declare class RoomSocketHandler {
3921
- socket: SocketService;
3922
- static create(socket: SocketService): RoomSocketHandler;
3923
- static cleanup(): void;
3924
- constructor(socketService: SocketService);
3925
- joinRoom(displayName: string, peerId: string, userId: string, viewType: ViewType): Promise<{
3926
- peer: Peer;
3927
- }>;
3928
- getAllAddedParticipants(): Promise<RTKBasicParticipant[]>;
3929
- getRoomPeers(searchQuery: string, limit: number, offset: number): Promise<RoomPeersInfoResponse>;
3930
- getRoomPeersNonPaginated(): Promise<RoomPeersInfoResponse>;
3931
- getStagePeers(): Promise<RoomPeersInfoResponse>;
3932
- getPeerInfo(peerId: string): Promise<PeerInfoResponse>;
3933
- getRoomState(): Promise<RoomInfoResponse>;
3934
- getRoomStageState(): Promise<GetRoomStageStateResponse>;
3935
- broadcastMessage(type: string, payload: BroadcastMessagePayload): Promise<{
3936
- id: string;
3937
- payload: Uint8Array;
3938
- }>;
3939
- broadcastToPeers(type: string, peerIds: string[], payload: BroadcastMessagePayload): Promise<boolean>;
3940
- leaveRoom(): Promise<void>;
3941
- kick(peerId: string): Promise<void>;
3942
- kickAll(): Promise<void>;
3943
- getWaitingRoomRequests(): void;
3944
- acceptWaitingRoomRequest(userIds: string[]): void;
3945
- rejectWaitingRoomRequest(userIds: string[]): void;
3946
- updatePermissions(userIds: string[], patch: PresetUpdates): Promise<{
3947
- id: string;
3948
- payload: Uint8Array;
3949
- }>;
3950
- private handleSocketEvents;
3951
- on(event: number, handler: (message: EventHandlerTypes) => void): void;
3952
- getUserPermissions(userId: string): Promise<Pick<PresetTypeV2['permissions'], 'chat' | 'polls' | 'plugins'>>;
3953
- }
3954
-
3955
- interface DeviceConfig {
3956
- browserName: string;
3957
- browserVersion: string;
3958
- isMobile: boolean;
3959
- engineName: string;
3960
- osName: string;
3961
- }
3962
- interface ProducerState {
3963
- producerId: string;
3964
- kind: 'audio' | 'video';
3965
- pause: boolean;
3966
- screenShare: boolean;
3967
- producingTransportId: string;
3968
- }
3969
- interface Participant {
3970
- id: string;
3971
- userId: string;
3972
- displayName: string;
3973
- device?: DeviceConfig;
3974
- picture?: string;
3975
- isHost: boolean;
3976
- flags: {
3977
- [key: string]: string | boolean;
3995
+ eventName: string;
3996
+ listenerCount: number;
3978
3997
  };
3979
- clientSpecificId?: string;
3980
- customParticipantId?: string;
3981
- stageStatus?: StageStatus;
3982
- audioMuted: boolean;
3983
- audioTrack: MediaStreamTrack;
3984
- videoTrack: MediaStreamTrack;
3985
- videoEnabled: boolean;
3998
+ dataChannelMessageChunk?: {
3999
+ id: string;
4000
+ count: number;
4001
+ chunkIndex: number;
4002
+ chunk: string;
4003
+ transprtId: string;
4004
+ };
4005
+ peerIds?: string[];
3986
4006
  producers?: ProducerState[];
3987
- metadata?: {
3988
- preset_name?: string;
4007
+ };
4008
+
4009
+ type EventSeverities = SupportedEventSeverities;
4010
+ type LogData$1 = LogData$2;
4011
+ declare class RTKTelemetry {
4012
+ static logsCache: {
4013
+ [key: string]: any;
4014
+ }[];
4015
+ static logsProcessorTimer: NodeJS.Timer;
4016
+ static location: {
4017
+ country: string;
3989
4018
  };
3990
- recorderType?: string;
4019
+ static get logsEndpoint(): string;
4020
+ static tracingEnabled: boolean;
4021
+ static initialized: boolean;
4022
+ static readonly logsProcessingInterval = 7000;
4023
+ static logExclusionList: string[];
4024
+ static meetingMetadata: {
4025
+ peerId?: string;
4026
+ roomName?: string;
4027
+ organizationId?: string;
4028
+ sdkVersion?: string;
4029
+ deviceInfo?: object;
4030
+ visitedUrl?: string;
4031
+ userId?: string;
4032
+ };
4033
+ static resetPeerId(peerId: string): void;
4034
+ static init(context: Context<RTKContextState>, enableTracing: boolean): void;
4035
+ static trace(spanName: string, metadata?: LogData$1 | undefined): (_target: Object, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
4036
+ static injectContext(injectionReceiver: any): void;
4037
+ static addLogInCurrentSpan(eventSeverity: EventSeverities, eventName: string, metadata?: LogData$1, noCache?: boolean): void;
4038
+ static sendOtelLogsToNewRelic(logs: object[]): void;
4039
+ static processCachedLogs(): void;
4040
+ static destruct(): void;
3991
4041
  }
3992
- declare class RTKParticipant$1 extends RTKTypedEventEmitter<ParticipantEvents> {
4042
+
4043
+ type LogData = LogData$1;
4044
+ declare class RTKLogger$1 {
4045
+ static info(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
4046
+ static error(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
4047
+ static debug(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
4048
+ static log(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
4049
+ static warn(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
4050
+ }
4051
+
4052
+ declare class RTKInternals {
4053
+ logger: typeof RTKLogger$1;
4054
+ features: typeof RTKFeatures;
4055
+ browserSpecs: BrowserCapabilities;
4056
+ callStats: any;
4057
+ constructor(logger: typeof RTKLogger$1, features: typeof RTKFeatures, callStats: any);
4058
+ static init(callstats: any): RTKInternals;
4059
+ }
4060
+
4061
+ type StoreData = {
4062
+ [type: string]: any;
4063
+ };
4064
+ declare class RTKStore$1 {
3993
4065
  #private;
3994
- id: string;
3995
- userId: string;
3996
4066
  name: string;
3997
- picture: string;
3998
- isHost: boolean;
3999
- customParticipantId?: string;
4000
- get clientSpecificId(): string;
4001
- flags: {
4002
- [key: string]: string | boolean;
4067
+ rateLimitConfig: {
4068
+ maxInvocations: number;
4069
+ period: number;
4003
4070
  };
4004
- device: DeviceConfig;
4005
- videoTrack: MediaStreamTrack;
4006
- audioTrack: MediaStreamTrack;
4007
- screenShareTracks: {
4008
- audio: MediaStreamTrack;
4009
- video: MediaStreamTrack;
4071
+ bulkRateLimitConfig: {
4072
+ maxInvocations: number;
4073
+ period: number;
4010
4074
  };
4011
- videoEnabled: boolean;
4012
- audioEnabled: boolean;
4013
- screenShareEnabled: boolean;
4014
- producers: ProducerState[];
4015
- manualProducerConfig: PeerProducerConfig;
4016
- supportsRemoteControl: boolean;
4017
- presetName?: string;
4018
- get stageStatus(): StageStatus;
4019
- private get roomJoined();
4020
- constructor(context: Context<RTKContextState>, participant: Participant, self: RTKSelf, roomSocket: RoomSocketHandler);
4021
- setVideoEnabled(videoEnabled: boolean, emitEvent?: boolean): void;
4022
- setAudioEnabled(audioEnabled: boolean, emitEvent?: boolean): void;
4023
- setScreenShareEnabled(screenShareEnabled: boolean, emitEvent?: boolean): void;
4024
- private setupEvents;
4025
- pin(): Promise<unknown>;
4026
- unpin(): Promise<unknown>;
4027
- setIsPinned(isPinned: boolean, emitEvent?: boolean): void;
4028
- disableAudio(): Promise<void>;
4029
- kick(): Promise<void>;
4030
- disableVideo(): Promise<void>;
4031
- getPermissions(): Promise<Pick<Permissions, "polls" | "plugins" | "chat">>;
4032
- setStageStatus(stageStatus: StageStatus): void;
4033
- get isPinned(): boolean;
4034
- registerVideoElement(videoElem: HTMLVideoElement): void;
4035
- deregisterVideoElement(videoElem: HTMLVideoElement): void;
4075
+ private listeners;
4076
+ constructor({ name, socketHandler, meetingId }: {
4077
+ name: string;
4078
+ socketHandler: PluginSocketHandler;
4079
+ meetingId: string;
4080
+ });
4081
+ set(key: string, value: any, sync?: boolean, emit?: boolean): Promise<void>;
4082
+ private remoteSet;
4083
+ bulkSet(data: {
4084
+ key: string;
4085
+ payload: any;
4086
+ }[]): Promise<void>;
4087
+ update(key: string, value: any, sync?: boolean): Promise<void>;
4088
+ delete(key: string, sync?: boolean, emit?: boolean): Promise<void>;
4089
+ bulkDelete(data: {
4090
+ key: string;
4091
+ }[]): Promise<void>;
4092
+ get(key: string): any;
4093
+ getAll(): StoreData;
4094
+ get rateLimits(): {
4095
+ maxInvocations: number;
4096
+ period: number;
4097
+ };
4098
+ updateRateLimits(num: number, period: number): void;
4099
+ get bulkRateLimits(): {
4100
+ maxInvocations: number;
4101
+ period: number;
4102
+ };
4103
+ updateBulkRateLimits(num: number, period: number): void;
4104
+ subscribe(key: string | '*', cb: (value: any) => any): void;
4105
+ unsubscribe(key: string | '*', cb?: (value: any) => any): void;
4106
+ populate(data: StoreData): void;
4036
4107
  }
4037
4108
 
4038
- declare abstract class RoomNodeClient {
4109
+ declare class RTKStoreManager {
4039
4110
  #private;
4111
+ stores: Map<String, RTKStore$1>;
4112
+ constructor(context: Context<RTKContextState>, handler: PluginSocketHandler);
4113
+ create(name: string): Promise<RTKStore$1>;
4114
+ }
4115
+
4116
+ interface Modules {
4117
+ pip?: boolean;
4118
+ chat?: boolean;
4119
+ poll?: boolean;
4120
+ theme?: boolean;
4121
+ stage?: boolean;
4122
+ plugin?: boolean;
4123
+ tracing?: boolean;
4124
+ internals?: boolean;
4125
+ recording?: boolean;
4126
+ livestream?: boolean;
4127
+ participant?: boolean;
4128
+ connectedMeetings?: boolean;
4129
+ e2ee?: {
4130
+ manager: any;
4131
+ enabled: boolean;
4132
+ };
4133
+ devTools?: {
4134
+ logs: boolean;
4135
+ plugins?: {
4136
+ id: string;
4137
+ name: string;
4138
+ port: number;
4139
+ picture?: string;
4140
+ description?: string;
4141
+ staggered?: boolean;
4142
+ }[];
4143
+ };
4144
+ }
4145
+ interface DefaultOptions {
4146
+ video?: boolean;
4147
+ audio?: boolean;
4148
+ recording?: RecordingConfig;
4149
+ mediaHandler?: RTKSelfMedia;
4150
+ autoSwitchAudioDevice?: boolean;
4151
+ mediaConfiguration?: {
4152
+ video?: VideoQualityConstraints;
4153
+ audio?: AudioQualityConstraints;
4154
+ screenshare?: ScreenshareQualityConstraints;
4155
+ };
4156
+ isNonPreferredDevice?: (device: MediaDeviceInfo) => boolean;
4157
+ }
4158
+ interface RoomDetails {
4159
+ sfu: MediaNodeType;
4160
+ roomNodeUrl: string;
4040
4161
  meetingTitle: string;
4041
- roomName: string;
4042
- roomUUID: string;
4043
- context: Context<RTKContextState>;
4044
- get peerId(): string;
4045
- authToken: string;
4046
- maxPreferredStreams: number;
4047
- roomJoined: boolean;
4048
- get sfuHandler(): any;
4049
- get socketState(): SocketConnectionState;
4050
- get mediaState(): MediaConnectionState;
4051
- reconnect(): void;
4052
- partialJoinRoom(displayName: string, roomUuid: string, rejoining?: boolean, loc?: GeoLocation): Promise<void>;
4053
- joinRoom(displayName: string, roomUUID: string, currentUserSharedMediaStates?: {
4054
- audio?: boolean;
4055
- video?: boolean;
4056
- screen?: boolean;
4057
- }, forceFullReset?: boolean, rejoining?: boolean): Promise<{
4058
- roomJoined: boolean;
4059
- }>;
4060
- leaveRoom(): Promise<void>;
4061
- reset(full?: boolean): void;
4062
- handleSocketCallbacks(message: any): Promise<void>;
4063
- handleSockets(message: any, callBack: (arg?: string) => void): Promise<void>;
4064
- shareMic(audioTrack: MediaStreamTrack): Promise<void>;
4065
- shareWebcam(videoTrack: MediaStreamTrack): Promise<MediaStreamTrack | null>;
4066
- shareScreen(screenShareTracks: {
4067
- audio?: MediaStreamTrack;
4068
- video?: MediaStreamTrack;
4069
- }): Promise<void>;
4070
- unmuteSelf(): Promise<void>;
4071
- muteSelf(): Promise<void>;
4072
- pauseWebcam(): Promise<void>;
4073
- disableScreenShare(): Promise<void>;
4074
- acceptWaitingRequest(id: string): Promise<void>;
4075
- rejectWaitingRequest(id: string): Promise<void>;
4076
- muteAll(allowUnMute: boolean): Promise<void>;
4077
- muteAllVideo(): Promise<void>;
4078
- disableAudio(peerId: string): Promise<void>;
4079
- disableVideo(peerId: string): Promise<void>;
4080
- kickAll(): Promise<void>;
4081
- kick(peerId: string): Promise<void>;
4082
- pinPeer(id: string): Promise<unknown>;
4083
- getConsumers(): any;
4084
- stopAllProducers(): void;
4085
- activatePeers(producerInfos: {
4086
- peerId: string;
4087
- producers: ProducerState[];
4088
- force?: boolean;
4089
- }[]): Promise<void>;
4090
- deactivatePeers(producerInfo: {
4091
- peerId: string;
4092
- producers: ProducerState[];
4093
- }): Promise<void>;
4094
- switchConsumersToLayer(consumerIds: string[], layer: number): Promise<void>;
4162
+ useHiveMedia: boolean;
4163
+ }
4164
+
4165
+ declare class ConnectionHandler {
4166
+ mediaJoined: boolean;
4167
+ socketJoined: boolean;
4168
+ socketJoinAttempted: boolean;
4169
+ mediaJoinAttempted: boolean;
4170
+ socketState: SocketConnectionState;
4171
+ mediaState: MediaConnectionState;
4172
+ get joinAttempted(): boolean;
4173
+ get roomJoined(): boolean;
4174
+ constructor();
4175
+ updateSocketConnectionState(state: SocketStateEvent, attempt?: number): void;
4176
+ }
4177
+
4178
+ declare const ERROR_CODES: {
4179
+ '0000': string;
4180
+ '0001': string;
4181
+ '0002': string;
4182
+ '0003': string;
4183
+ '0004': string;
4184
+ '0010': string;
4185
+ '0011': string;
4186
+ '0012': string;
4187
+ '0013': string;
4188
+ '0100': string;
4189
+ '0101': string;
4190
+ '0102': string;
4191
+ '0200': string;
4192
+ '0300': string;
4193
+ '0400': string;
4194
+ '0404': string;
4195
+ '0500': string;
4196
+ '0501': string;
4197
+ '0502': string;
4198
+ '0503': string;
4199
+ '0504': string;
4200
+ '0505': string;
4201
+ '0506': string;
4202
+ '0510': string;
4203
+ '0600': string;
4204
+ '0601': string;
4205
+ '0602': string;
4206
+ '0603': string;
4207
+ '0700': string;
4208
+ '0705': string;
4209
+ '0800': string;
4210
+ '0801': string;
4211
+ '0900': string;
4212
+ '0904': string;
4213
+ '1000': string;
4214
+ '1001': string;
4215
+ '1004': string;
4216
+ '1005': string;
4217
+ '1100': string;
4218
+ '1101': string;
4219
+ '1102': string;
4220
+ '1103': string;
4221
+ '1104': string;
4222
+ '1105': string;
4223
+ '1106': string;
4224
+ '1200': string;
4225
+ '1201': string;
4226
+ '1202': string;
4227
+ '1203': string;
4228
+ '1204': string;
4229
+ '1205': string;
4230
+ '1206': string;
4231
+ '1207': string;
4232
+ '1208': string;
4233
+ '1209': string;
4234
+ '1300': string;
4235
+ '1400': string;
4236
+ '1402': string;
4237
+ '1403': string;
4238
+ '1500': string;
4239
+ '1600': string;
4240
+ '1601': string;
4241
+ '1602': string;
4242
+ '1603': string;
4243
+ '1604': string;
4244
+ '1605': string;
4245
+ '1606': string;
4246
+ '1607': string;
4247
+ '1608': string;
4248
+ '1609': string;
4249
+ '1610': string;
4250
+ '1611': string;
4251
+ '1612': string;
4252
+ '1701': string;
4253
+ '1800': string;
4254
+ '1801': string;
4255
+ '1900': string;
4256
+ '1901': string;
4257
+ '1902': string;
4258
+ '2000': string;
4259
+ '2001': string;
4260
+ '2002': string;
4261
+ '2003': string;
4262
+ '2004': string;
4263
+ '2005': string;
4264
+ '2006': string;
4265
+ '9900': string;
4266
+ };
4267
+ declare class RTKError extends Error {
4268
+ code: keyof typeof ERROR_CODES;
4269
+ constructor(message: string, code?: keyof typeof ERROR_CODES, log?: boolean);
4095
4270
  }
4096
4271
 
4097
4272
  type RTKContextState = {
@@ -4099,18 +4274,19 @@ type RTKContextState = {
4099
4274
  peerId?: string;
4100
4275
  apiBase?: string;
4101
4276
  baseURI?: string;
4277
+ onError?: (error: RTKError) => void;
4102
4278
  stageStatus?: StageStatus;
4103
4279
  organizationId?: string;
4280
+ maxPreferredStreams?: number;
4104
4281
  defaults?: DefaultOptions;
4105
4282
  modules?: Modules;
4106
- overrides?: {
4107
- [key: string]: boolean | string;
4108
- };
4283
+ overrides?: Overrides;
4109
4284
  apiClient?: BaseAPIClient;
4110
4285
  userId?: string;
4111
4286
  meetingId?: string;
4112
4287
  roomName?: string;
4113
4288
  socketService?: SocketService;
4289
+ pip?: RTKPip;
4114
4290
  roomNodeOptions?: {
4115
4291
  meetingTitle: string;
4116
4292
  roomNodeUrl: string;
@@ -4121,6 +4297,7 @@ type RTKContextState = {
4121
4297
  env?: ClientEnvTypeAll;
4122
4298
  sdkVersion?: string;
4123
4299
  sdkName?: 'web-core';
4300
+ connectionHandler?: ConnectionHandler;
4124
4301
  cachedUserDetails?: CachedUserDetails;
4125
4302
  };
4126
4303
  interface Context<T extends Record<string, any>> {
@@ -4145,7 +4322,8 @@ declare class SocketService {
4145
4322
  readonly roomName: string;
4146
4323
  readonly authToken: string;
4147
4324
  readonly capabilities: SocketServiceCapabilities;
4148
- connectionState: SocketConnectionState;
4325
+ get joinAttempted(): boolean;
4326
+ set joinAttempted(value: boolean);
4149
4327
  get peerId(): string;
4150
4328
  constructor(context: Context<RTKContextState>, { peerId, meetingId, authToken, capabilities, }: {
4151
4329
  peerId: string;
@@ -4157,7 +4335,7 @@ declare class SocketService {
4157
4335
  private static getSocketEdgeDomain;
4158
4336
  get url(): string;
4159
4337
  connect(): Promise<void>;
4160
- disconnect(): void;
4338
+ disconnect(): Promise<void>;
4161
4339
  get isConnected(): boolean;
4162
4340
  sendMessage(event: number, protobuf?: Uint8Array, messageId?: string): boolean;
4163
4341
  sendMessagePromise(event: number, protobuf?: Uint8Array, messageId?: string, resp?: number): Promise<{
@@ -4179,7 +4357,13 @@ declare class SocketService {
4179
4357
  payload?: Uint8Array;
4180
4358
  }) => void): void;
4181
4359
  onStateEvent(event: SocketStateEvent, listener: (...args: any) => void): void;
4360
+ removeListener(event: number, listener: (message: {
4361
+ id?: string;
4362
+ payload?: Uint8Array;
4363
+ }) => void): void;
4364
+ removeListeners(event: number): void;
4182
4365
  flush(): any;
4366
+ handleSocketConnectionEvents(): void;
4183
4367
  }
4184
4368
 
4185
4369
  type StageSocketMessage = GetStageRequestsResponse | GetStagePeersResponse | DenyStageAccessRequest | PeerStatusUpdate;
@@ -4265,12 +4449,14 @@ declare class RTKSelf$1 extends RTKSelfMedia {
4265
4449
  organizationId: string;
4266
4450
  supportsRemoteControl: boolean;
4267
4451
  device: DeviceConfig;
4452
+ hidden: boolean;
4268
4453
  get stageStatus(): StageStatus;
4269
4454
  get id(): string;
4270
4455
  presetName: string;
4271
4456
  roomState: 'init' | 'joined' | 'waitlisted' | leaveRoomState;
4272
4457
  private constructor();
4273
4458
  static __init__(context: Context<RTKContextState>, details: UserDetailsResponse, permissions: RTKPermissionsPreset$1, theme: RTKThemePreset$1, presetName: string, skipAwaits?: boolean): Promise<RTKSelf$1>;
4459
+ cleanupEvents(): void;
4274
4460
  private setupEvents;
4275
4461
  get permissions(): RTKPermissionsPreset$1;
4276
4462
  get config(): RTKThemePreset$1;
@@ -4296,11 +4482,13 @@ declare class RTKSelf$1 extends RTKSelfMedia {
4296
4482
  get isPinned(): boolean;
4297
4483
  pin(): Promise<unknown>;
4298
4484
  unpin(): Promise<unknown>;
4485
+ hide(): Promise<void>;
4486
+ show(): void;
4299
4487
  setDevice(device: MediaDeviceInfo): Promise<void>;
4300
4488
  cleanUpTracks(): void;
4301
- registerVideoElement(videoElem: HTMLVideoElement): void;
4302
- deregisterVideoElement(videoElem: HTMLVideoElement): void;
4303
- updateVideo(e: HTMLVideoElement): void;
4489
+ registerVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
4490
+ deregisterVideoElement(videoElem?: HTMLVideoElement, isPreview?: boolean): void;
4491
+ private updateVideo;
4304
4492
  }
4305
4493
 
4306
4494
  interface RTKPluginResponse {
@@ -4534,14 +4722,17 @@ declare class RTKConnectedMeetings$1 extends RTKTypedEventEmitter<ConnectedMeeti
4534
4722
  private moveSuccessHandler;
4535
4723
  }
4536
4724
 
4725
+ interface Overrides {
4726
+ disableSimulcast?: boolean;
4727
+ [key: string]: boolean | string | number;
4728
+ }
4537
4729
  interface RealtimeKitClientOptions {
4538
4730
  authToken: string;
4539
4731
  defaults?: DefaultOptions;
4540
4732
  modules?: Modules;
4541
- overrides?: {
4542
- [key: string]: boolean | string;
4543
- };
4733
+ overrides?: Overrides;
4544
4734
  baseURI?: string;
4735
+ onError?: (error: RTKError) => void;
4545
4736
  cachedUserDetails?: CachedUserDetails;
4546
4737
  }
4547
4738
  declare class RealtimeKitClient {
@@ -4572,8 +4763,14 @@ type RTKParticipant = Readonly<RTKParticipant$1>;
4572
4763
 
4573
4764
  type RTKParticipants = Readonly<RTKParticipants$1>;
4574
4765
  type RTKParticipantMap = Readonly<RTKParticipantMap$1>;
4766
+
4767
+ type RTKPlugin = Readonly<RTKPlugin$1>;
4575
4768
  type RTKSelf = Readonly<RTKSelf$1>;
4576
4769
 
4770
+ type RTKConnectedMeetings = Readonly<RTKConnectedMeetings$1>;
4771
+
4772
+ type RTKPermissionsPreset = Readonly<RTKPermissionsPreset$1>;
4773
+
4577
4774
  type RTKType = {
4578
4775
  callStats?: unknown;
4579
4776
  RTKTelemetry?: typeof RTKTelemetry;
@@ -4592,4 +4789,4 @@ declare global {
4592
4789
  }
4593
4790
  }
4594
4791
 
4595
- export { RealtimeKitClientOptions, RTKParticipant, RTKParticipantMap, RTKSelf, RTKSelfMedia, RealtimeKitClient as default };
4792
+ export { ActiveTabType, CustomMessage, DeviceConfig, RTKBasicParticipant, RealtimeKitClientOptions, RTKConnectedMeetings, RTKParticipant, RTKParticipantMap, RTKParticipants, RTKPermissionsPreset, RTKPlugin, RTKSelf, RTKSelfMedia, FileMessage, ImageMessage, LivestreamState, MediaConnectionState, MediaKind$1 as MediaKind, Message, ProducerScoreStats, SocketConnectionState, StageStatus, TextMessage, VideoProducerScoreStats, RealtimeKitClient as default, leaveRoomState };