@cloudflare/realtimekit 0.5.0-staging.99 → 1.0.2-staging.1

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.
@@ -333,30 +333,6 @@ interface RtpCapabilitites {
333
333
  * @generated MessageType for protobuf message media.RtpCapabilitites
334
334
  */
335
335
  declare const RtpCapabilitites: RtpCapabilitites$Type;
336
- declare class GeoLocation$Type extends MessageType$1<GeoLocation> {
337
- constructor();
338
- }
339
- /**
340
- * @generated from protobuf message media.edge.GeoLocation
341
- */
342
- interface GeoLocation {
343
- /**
344
- * @generated from protobuf field: float latitude = 1;
345
- */
346
- latitude: number;
347
- /**
348
- * @generated from protobuf field: float longitude = 2;
349
- */
350
- longitude: number;
351
- /**
352
- * @generated from protobuf field: optional string region = 3;
353
- */
354
- region?: string;
355
- }
356
- /**
357
- * @generated MessageType for protobuf message media.edge.GeoLocation
358
- */
359
- declare const GeoLocation: GeoLocation$Type;
360
336
  declare class GetRoomStateResponse$Type extends MessageType$1<GetRoomStateResponse> {
361
337
  constructor();
362
338
  }
@@ -2154,17 +2130,12 @@ declare enum MediaNodeType {
2154
2130
  type MediaConnectionState = {
2155
2131
  recv: {
2156
2132
  state: string;
2157
- reconnected: boolean;
2158
2133
  };
2159
2134
  send: {
2160
2135
  state: string;
2161
- reconnected: boolean;
2162
2136
  };
2163
2137
  };
2164
2138
  type TransportPromiseEvents = {
2165
- 'connect': {
2166
- answer: RTCSessionDescriptionInit;
2167
- };
2168
2139
  'close': {
2169
2140
  answer: RTCSessionDescriptionInit;
2170
2141
  };
@@ -2387,7 +2358,7 @@ declare class RTKParticipant$1 extends RTKTypedEventEmitter<ParticipantEvents> {
2387
2358
  setStageStatus(stageStatus: StageStatus): void;
2388
2359
  readonly isPinned: boolean;
2389
2360
  registerVideoElement(videoElem: HTMLVideoElement): void;
2390
- deregisterVideoElement(videoElem: HTMLVideoElement): void;
2361
+ deregisterVideoElement(videoElem?: HTMLVideoElement): void;
2391
2362
  }
2392
2363
  type TranscriptionData = {
2393
2364
  id: string;
@@ -2565,6 +2536,25 @@ type BroadcastMessageTarget = {
2565
2536
  } | {
2566
2537
  meetingIds: string[];
2567
2538
  };
2539
+ type JoinedPeer = {
2540
+ id: string;
2541
+ userId: string;
2542
+ name: string;
2543
+ stageType?: StageStatus;
2544
+ customParticipantId?: string;
2545
+ presetId?: string;
2546
+ picture?: string;
2547
+ waitlisted: boolean;
2548
+ recorderType?: string;
2549
+ stageStatus?: StageStatus;
2550
+ metadata?: {
2551
+ preset_name?: string;
2552
+ };
2553
+ flags?: {
2554
+ hiddenParticipant?: boolean;
2555
+ recorder?: boolean;
2556
+ };
2557
+ };
2568
2558
  type ParticipantsEvents = {
2569
2559
  ['viewModeChanged']: (payload: {
2570
2560
  viewMode: string;
@@ -2740,7 +2730,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
2740
2730
  readonly rawAudioTrack: MediaStreamTrack;
2741
2731
  readonly audioTrack: MediaStreamTrack;
2742
2732
  readonly audioEnabled: boolean;
2743
- enableAudio(): Promise<void>;
2733
+ enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
2744
2734
  disableAudio(): void;
2745
2735
  getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2746
2736
  setAudioDevice(device: MediaDeviceInfo): Promise<void>;
@@ -2749,7 +2739,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
2749
2739
  readonly rawVideoTrack: MediaStreamTrack;
2750
2740
  readonly videoTrack: MediaStreamTrack;
2751
2741
  readonly videoEnabled: boolean;
2752
- enableVideo(): Promise<void>;
2742
+ enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
2753
2743
  disableVideo(): void;
2754
2744
  getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
2755
2745
  setVideoDevice(device: MediaDeviceInfo): Promise<void>;
@@ -3822,6 +3812,14 @@ type LogData$2 = {
3822
3812
  };
3823
3813
  peerIds?: string[];
3824
3814
  producers?: ProducerState[];
3815
+ sdp?: RTCSessionDescription['sdp'];
3816
+ awaitQueueTask?: {
3817
+ id?: string | number;
3818
+ metadata?: Record<string, unknown>;
3819
+ queueSizeAtStart?: number;
3820
+ taskStartTime?: number;
3821
+ execTime?: number;
3822
+ };
3825
3823
  };
3826
3824
  type EventSeverities = SupportedEventSeverities;
3827
3825
  type LogData$1 = LogData$2;
@@ -3921,6 +3919,11 @@ declare class RTKStoreManager {
3921
3919
  constructor(context: Context<RTKContextState>, handler: PluginSocketHandler);
3922
3920
  create(name: string): Promise<RTKStore$1>;
3923
3921
  }
3922
+ interface MediaPermissions {
3923
+ canProduceAudio?: MediaProductionPermissionType;
3924
+ canProduceVideo?: MediaProductionPermissionType;
3925
+ canProduceScreenshare?: MediaProductionPermissionType;
3926
+ }
3924
3927
  declare const videoCodecPriority: readonly [
3925
3928
  "video/VP9",
3926
3929
  "video/VP8"
@@ -3937,20 +3940,14 @@ declare class MediaNodeClient {
3937
3940
  readonly peerId: string;
3938
3941
  constructor(context: Context<RTKContextState>, nodeType: MediaNodeType, options: MediaNodeClientOptions);
3939
3942
  mediaJoined: boolean;
3940
- reset(full?: boolean): void;
3941
- joinRoom(displayName: string, roomUuid: string, currentUserSharedMediaStates?: {
3942
- audio?: boolean;
3943
- video?: boolean;
3944
- screen?: boolean;
3945
- }, forceFullReset?: boolean, rejoining?: boolean): Promise<{
3943
+ reset(): void;
3944
+ joinRoom(displayName: string, roomUuid: string, forceFullReset?: boolean, rejoining?: boolean, permissions?: MediaPermissions): Promise<{
3946
3945
  roomJoined: boolean;
3947
3946
  }>;
3948
- _partialJoinRoom(displayName: string, roomUuid: string, rejoining?: boolean, loc?: GeoLocation): Promise<void>;
3949
- partialJoinRoom(displayName: string, roomUuid: string, rejoining?: boolean, loc?: GeoLocation): Promise<any>;
3950
- leaveRoom(): Promise<void>;
3947
+ initializeConnection(displayName: string, roomUuid: string, rejoining?: boolean, permissions?: MediaPermissions): Promise<void>;
3951
3948
  getConsumers(): Map<string, Consumer>;
3949
+ leaveRoom(): Promise<void>;
3952
3950
  activatePeers(producers: ProducerState[]): Promise<void>;
3953
- deactivatePeers(producers: ProducerState[], mode?: 'manual' | 'default'): Promise<void>;
3954
3951
  createConsumers(producers: ProducerState[]): Promise<void>;
3955
3952
  closeConsumers(producers: ProducerState[]): Promise<void>;
3956
3953
  _shareWebcam(videoTrack: MediaStreamTrack & {
@@ -4335,8 +4332,8 @@ declare class RTKSelf$1 extends RTKSelfMedia {
4335
4332
  }): Promise<void>;
4336
4333
  destructMediaHandler(): Promise<void>;
4337
4334
  removeDocumentEventListeners(): Promise<void>;
4338
- enableAudio(): Promise<void>;
4339
- enableVideo(): Promise<void>;
4335
+ enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
4336
+ enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
4340
4337
  updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
4341
4338
  enableScreenShare(): Promise<void>;
4342
4339
  updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
@@ -4353,7 +4350,7 @@ declare class RTKSelf$1 extends RTKSelfMedia {
4353
4350
  setDevice(device: MediaDeviceInfo): Promise<void>;
4354
4351
  cleanUpTracks(): void;
4355
4352
  registerVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
4356
- deregisterVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
4353
+ deregisterVideoElement(videoElem?: HTMLVideoElement, isPreview?: boolean): void;
4357
4354
  }
4358
4355
  interface RTKPluginResponse {
4359
4356
  baseURL: string;
@@ -4602,11 +4599,22 @@ declare class RealtimeKitClient {
4602
4599
  joinRoom(): Promise<void>;
4603
4600
  leaveRoom(state?: LeaveRoomState): Promise<void>;
4604
4601
  }
4602
+ declare enum RequestToJoinType {
4603
+ PRESENT = "REQUEST_TO_PRESENT"
4604
+ }
4605
4605
  type RTKParticipant = Readonly<RTKParticipant$1>;
4606
4606
  type RTKParticipants = Readonly<RTKParticipants$1>;
4607
4607
  type RTKParticipantMap = Readonly<RTKParticipantMap$1>;
4608
4608
  type RTKPlugin = Readonly<RTKPlugin$1>;
4609
+ type RTKPlugins = Readonly<RTKPlugins$1>;
4610
+ type RTKPluginMap = Readonly<RTKPluginMap$1>;
4611
+ type RTKMeta = Readonly<RTKMeta$1>;
4609
4612
  type RTKSelf = Readonly<RTKSelf$1>;
4613
+ type RTKChat = Readonly<RTKChat$1>;
4614
+ type RTKPolls = Readonly<RTKPolls$1>;
4615
+ type RTKRecording = Readonly<RTKRecording$1>;
4616
+ type RTKLivestream = Readonly<RTKLivestream$1>;
4617
+ type RTKStore = RTKStore$1;
4610
4618
  type RTKConnectedMeetings = Readonly<RTKConnectedMeetings$1>;
4611
4619
  type RTKPermissionsPreset = Readonly<RTKPermissionsPreset$1>;
4612
4620
  type RTKThemePreset = Readonly<RTKThemePreset$1>;
@@ -4627,4 +4635,4 @@ declare global {
4627
4635
  TransformStream?: any;
4628
4636
  }
4629
4637
  }
4630
- 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 };
4638
+ 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.5.0-staging.99",
3
+ "version": "1.0.2-staging.1",
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",