@cloudflare/realtimekit 0.1.0 → 0.2.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.
@@ -2154,17 +2154,12 @@ declare enum MediaNodeType {
2154
2154
  type MediaConnectionState = {
2155
2155
  recv: {
2156
2156
  state: string;
2157
- reconnected: boolean;
2158
2157
  };
2159
2158
  send: {
2160
2159
  state: string;
2161
- reconnected: boolean;
2162
2160
  };
2163
2161
  };
2164
2162
  type TransportPromiseEvents = {
2165
- 'connect': {
2166
- answer: RTCSessionDescriptionInit;
2167
- };
2168
2163
  'close': {
2169
2164
  answer: RTCSessionDescriptionInit;
2170
2165
  };
@@ -2565,6 +2560,25 @@ type BroadcastMessageTarget = {
2565
2560
  } | {
2566
2561
  meetingIds: string[];
2567
2562
  };
2563
+ type JoinedPeer = {
2564
+ id: string;
2565
+ userId: string;
2566
+ name: string;
2567
+ stageType?: StageStatus;
2568
+ customParticipantId?: string;
2569
+ presetId?: string;
2570
+ picture?: string;
2571
+ waitlisted: boolean;
2572
+ recorderType?: string;
2573
+ stageStatus?: StageStatus;
2574
+ metadata?: {
2575
+ preset_name?: string;
2576
+ };
2577
+ flags?: {
2578
+ hiddenParticipant?: boolean;
2579
+ recorder?: boolean;
2580
+ };
2581
+ };
2568
2582
  type ParticipantsEvents = {
2569
2583
  ['viewModeChanged']: (payload: {
2570
2584
  viewMode: string;
@@ -2740,7 +2754,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
2740
2754
  readonly rawAudioTrack: MediaStreamTrack;
2741
2755
  readonly audioTrack: MediaStreamTrack;
2742
2756
  readonly audioEnabled: boolean;
2743
- enableAudio(): Promise<void>;
2757
+ enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
2744
2758
  disableAudio(): void;
2745
2759
  getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2746
2760
  setAudioDevice(device: MediaDeviceInfo): Promise<void>;
@@ -2749,7 +2763,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
2749
2763
  readonly rawVideoTrack: MediaStreamTrack;
2750
2764
  readonly videoTrack: MediaStreamTrack;
2751
2765
  readonly videoEnabled: boolean;
2752
- enableVideo(): Promise<void>;
2766
+ enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
2753
2767
  disableVideo(): void;
2754
2768
  getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2755
2769
  setVideoDevice(device: MediaDeviceInfo): Promise<void>;
@@ -3823,6 +3837,9 @@ type LogData$2 = {
3823
3837
  peerIds?: string[];
3824
3838
  producers?: ProducerState[];
3825
3839
  sdp?: RTCSessionDescription['sdp'];
3840
+ queueSizeAtStart?: number;
3841
+ taskStartTime?: number;
3842
+ subTasksSize?: number;
3826
3843
  };
3827
3844
  type EventSeverities = SupportedEventSeverities;
3828
3845
  type LogData$1 = LogData$2;
@@ -3951,7 +3968,6 @@ declare class MediaNodeClient {
3951
3968
  leaveRoom(): Promise<void>;
3952
3969
  getConsumers(): Map<string, Consumer>;
3953
3970
  activatePeers(producers: ProducerState[]): Promise<void>;
3954
- deactivatePeers(producers: ProducerState[], mode?: 'manual' | 'default'): Promise<void>;
3955
3971
  createConsumers(producers: ProducerState[]): Promise<void>;
3956
3972
  closeConsumers(producers: ProducerState[]): Promise<void>;
3957
3973
  _shareWebcam(videoTrack: MediaStreamTrack & {
@@ -4336,8 +4352,8 @@ declare class RTKSelf$1 extends RTKSelfMedia {
4336
4352
  }): Promise<void>;
4337
4353
  destructMediaHandler(): Promise<void>;
4338
4354
  removeDocumentEventListeners(): Promise<void>;
4339
- enableAudio(): Promise<void>;
4340
- enableVideo(): Promise<void>;
4355
+ enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
4356
+ enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
4341
4357
  updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
4342
4358
  enableScreenShare(): Promise<void>;
4343
4359
  updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
@@ -4603,11 +4619,22 @@ declare class RealtimeKitClient {
4603
4619
  joinRoom(): Promise<void>;
4604
4620
  leaveRoom(state?: LeaveRoomState): Promise<void>;
4605
4621
  }
4622
+ declare enum RequestToJoinType {
4623
+ PRESENT = "REQUEST_TO_PRESENT"
4624
+ }
4606
4625
  type RTKParticipant = Readonly<RTKParticipant$1>;
4607
4626
  type RTKParticipants = Readonly<RTKParticipants$1>;
4608
4627
  type RTKParticipantMap = Readonly<RTKParticipantMap$1>;
4609
4628
  type RTKPlugin = Readonly<RTKPlugin$1>;
4629
+ type RTKPlugins = Readonly<RTKPlugins$1>;
4630
+ type RTKPluginMap = Readonly<RTKPluginMap$1>;
4631
+ type RTKMeta = Readonly<RTKMeta$1>;
4610
4632
  type RTKSelf = Readonly<RTKSelf$1>;
4633
+ type RTKChat = Readonly<RTKChat$1>;
4634
+ type RTKPolls = Readonly<RTKPolls$1>;
4635
+ type RTKRecording = Readonly<RTKRecording$1>;
4636
+ type RTKLivestream = Readonly<RTKLivestream$1>;
4637
+ type RTKStore = RTKStore$1;
4611
4638
  type RTKConnectedMeetings = Readonly<RTKConnectedMeetings$1>;
4612
4639
  type RTKPermissionsPreset = Readonly<RTKPermissionsPreset$1>;
4613
4640
  type RTKThemePreset = Readonly<RTKThemePreset$1>;
@@ -4628,4 +4655,4 @@ declare global {
4628
4655
  TransformStream?: any;
4629
4656
  }
4630
4657
  }
4631
- export { ActiveTab, ActiveTabType, AudioProducerScoreStats, ChatChannel, ChatUpdateParams, CustomMessage, DeviceConfig, RTKBasicParticipant, RealtimeKitClientOptions, RTKConnectedMeetings, RTKParticipant, RTKParticipantMap, RTKParticipants, RTKPermissionsPreset, RTKPlugin, RTKSelf, RTKThemePreset, FileMessage, ImageMessage, LivestreamState, MediaConnectionState, MediaKind$1 as MediaKind, Message, ProducerScoreStats, RTKSelfMedia as RTKSelfMedia, RecordingState, SocketConnectionState, StageStatus, TextMessage, VideoProducerScoreStats, RealtimeKitClient as default, LeaveRoomState as leaveRoomState };
4658
+ export { ActiveTab, ActiveTabType, AudioConsumerScoreStats, AudioMiddleware, AudioProducerScoreStats, BroadcastMessagePayload, ChatChannel, ChatUpdateParams, CustomMessage, DeviceConfig, RTKBasicParticipant, RTKChat, RealtimeKitClientOptions, RTKConnectedMeetings, RTKLivestream, RTKMeta, RTKParticipant, RTKParticipantMap, RTKParticipants, RTKPermissionsPreset, RTKPlugin, RTKPluginMap, RTKPlugins, RTKPolls, RTKRecording, RTKSelf, RTKStore, RTKThemePreset, FileMessage, ImageMessage, JoinedPeer, LeaveRoomState, LivestreamIngestionCredentials, LivestreamState, LogData, MediaConnectionState, MediaConnectionUpdate, MediaKind$1 as MediaKind, MediaPermission, Message, ProducerScoreStats, RTKSelfMedia as RTKSelfMedia, RecordingState, RequestToJoinType, SocketConnectionState, StageStatus, StartLivestreamConfig, TextMessage, VideoConsumerScoreStats, VideoMiddleware, VideoProducerScoreStats, VideoQualityConstraints, RealtimeKitClient as default, LeaveRoomState as leaveRoomState };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/realtimekit",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A real-time video and audio SDK for building custom, collaborative communication experiences.",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.es.js",