@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.
- package/dist/browser.js +15 -15
- package/dist/index.cjs.js +15 -15
- package/dist/index.d.ts +41 -11
- package/dist/index.es.js +6361 -6472
- package/dist/index.rn.js +15 -15
- package/dist/mock.cjs.js +3 -3
- package/dist/mock.es.js +1154 -1039
- package/dist/ts3.4/dist/index.d.ts +38 -11
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2181,18 +2181,13 @@ declare enum MediaNodeType {
|
|
|
2181
2181
|
type MediaConnectionState = {
|
|
2182
2182
|
recv: {
|
|
2183
2183
|
state: `${TransportState}`;
|
|
2184
|
-
reconnected: boolean;
|
|
2185
2184
|
};
|
|
2186
2185
|
send: {
|
|
2187
2186
|
state: `${TransportState}`;
|
|
2188
|
-
reconnected: boolean;
|
|
2189
2187
|
};
|
|
2190
2188
|
};
|
|
2191
2189
|
|
|
2192
2190
|
type TransportPromiseEvents = {
|
|
2193
|
-
'connect': {
|
|
2194
|
-
answer: RTCSessionDescriptionInit;
|
|
2195
|
-
};
|
|
2196
2191
|
'close': {
|
|
2197
2192
|
answer: RTCSessionDescriptionInit;
|
|
2198
2193
|
};
|
|
@@ -2569,6 +2564,25 @@ type BroadcastMessageTarget = {
|
|
|
2569
2564
|
} | {
|
|
2570
2565
|
meetingIds: string[];
|
|
2571
2566
|
};
|
|
2567
|
+
type JoinedPeer = {
|
|
2568
|
+
id: string;
|
|
2569
|
+
userId: string;
|
|
2570
|
+
name: string;
|
|
2571
|
+
stageType?: StageStatus;
|
|
2572
|
+
customParticipantId?: string;
|
|
2573
|
+
presetId?: string;
|
|
2574
|
+
picture?: string;
|
|
2575
|
+
waitlisted: boolean;
|
|
2576
|
+
recorderType?: string;
|
|
2577
|
+
stageStatus?: StageStatus;
|
|
2578
|
+
metadata?: {
|
|
2579
|
+
preset_name?: string;
|
|
2580
|
+
};
|
|
2581
|
+
flags?: {
|
|
2582
|
+
hiddenParticipant?: boolean;
|
|
2583
|
+
recorder?: boolean;
|
|
2584
|
+
};
|
|
2585
|
+
};
|
|
2572
2586
|
type ParticipantsEvents = {
|
|
2573
2587
|
['viewModeChanged']: (payload: {
|
|
2574
2588
|
viewMode: string;
|
|
@@ -2748,7 +2762,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2748
2762
|
get rawAudioTrack(): MediaStreamTrack;
|
|
2749
2763
|
get audioTrack(): MediaStreamTrack;
|
|
2750
2764
|
get audioEnabled(): boolean;
|
|
2751
|
-
enableAudio(): Promise<void>;
|
|
2765
|
+
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
2752
2766
|
disableAudio(): void;
|
|
2753
2767
|
getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
2754
2768
|
setAudioDevice(device: MediaDeviceInfo): Promise<void>;
|
|
@@ -2757,7 +2771,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2757
2771
|
get rawVideoTrack(): MediaStreamTrack;
|
|
2758
2772
|
get videoTrack(): MediaStreamTrack;
|
|
2759
2773
|
get videoEnabled(): boolean;
|
|
2760
|
-
enableVideo(): Promise<void>;
|
|
2774
|
+
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
2761
2775
|
disableVideo(): void;
|
|
2762
2776
|
getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
2763
2777
|
setVideoDevice(device: MediaDeviceInfo): Promise<void>;
|
|
@@ -3854,6 +3868,9 @@ type LogData$2 = {
|
|
|
3854
3868
|
peerIds?: string[];
|
|
3855
3869
|
producers?: ProducerState[];
|
|
3856
3870
|
sdp?: RTCSessionDescription['sdp'];
|
|
3871
|
+
queueSizeAtStart?: number;
|
|
3872
|
+
taskStartTime?: number;
|
|
3873
|
+
subTasksSize?: number;
|
|
3857
3874
|
};
|
|
3858
3875
|
|
|
3859
3876
|
type EventSeverities = SupportedEventSeverities;
|
|
@@ -3986,7 +4003,6 @@ declare class MediaNodeClient {
|
|
|
3986
4003
|
leaveRoom(): Promise<void>;
|
|
3987
4004
|
getConsumers(): Map<string, Consumer>;
|
|
3988
4005
|
activatePeers(producers: ProducerState[]): Promise<void>;
|
|
3989
|
-
deactivatePeers(producers: ProducerState[], mode?: 'manual' | 'default'): Promise<void>;
|
|
3990
4006
|
createConsumers(producers: ProducerState[]): Promise<void>;
|
|
3991
4007
|
closeConsumers(producers: ProducerState[]): Promise<void>;
|
|
3992
4008
|
_shareWebcam(videoTrack: MediaStreamTrack & {
|
|
@@ -4380,8 +4396,8 @@ declare class RTKSelf$1 extends RTKSelfMedia {
|
|
|
4380
4396
|
}): Promise<void>;
|
|
4381
4397
|
destructMediaHandler(): Promise<void>;
|
|
4382
4398
|
removeDocumentEventListeners(): Promise<void>;
|
|
4383
|
-
enableAudio(): Promise<void>;
|
|
4384
|
-
enableVideo(): Promise<void>;
|
|
4399
|
+
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
4400
|
+
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
4385
4401
|
updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
4386
4402
|
enableScreenShare(): Promise<void>;
|
|
4387
4403
|
updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
@@ -4653,13 +4669,27 @@ declare class RealtimeKitClient {
|
|
|
4653
4669
|
leaveRoom(state?: LeaveRoomState): Promise<void>;
|
|
4654
4670
|
}
|
|
4655
4671
|
|
|
4672
|
+
declare enum RequestToJoinType {
|
|
4673
|
+
PRESENT = "REQUEST_TO_PRESENT"
|
|
4674
|
+
}
|
|
4675
|
+
|
|
4656
4676
|
type RTKParticipant = Readonly<RTKParticipant$1>;
|
|
4657
4677
|
|
|
4658
4678
|
type RTKParticipants = Readonly<RTKParticipants$1>;
|
|
4659
4679
|
type RTKParticipantMap = Readonly<RTKParticipantMap$1>;
|
|
4660
4680
|
|
|
4661
4681
|
type RTKPlugin = Readonly<RTKPlugin$1>;
|
|
4682
|
+
type RTKPlugins = Readonly<RTKPlugins$1>;
|
|
4683
|
+
type RTKPluginMap = Readonly<RTKPluginMap$1>;
|
|
4684
|
+
type RTKMeta = Readonly<RTKMeta$1>;
|
|
4662
4685
|
type RTKSelf = Readonly<RTKSelf$1>;
|
|
4686
|
+
type RTKChat = Readonly<RTKChat$1>;
|
|
4687
|
+
type RTKPolls = Readonly<RTKPolls$1>;
|
|
4688
|
+
type RTKRecording = Readonly<RTKRecording$1>;
|
|
4689
|
+
|
|
4690
|
+
type RTKLivestream = Readonly<RTKLivestream$1>;
|
|
4691
|
+
|
|
4692
|
+
type RTKStore = RTKStore$1;
|
|
4663
4693
|
|
|
4664
4694
|
type RTKConnectedMeetings = Readonly<RTKConnectedMeetings$1>;
|
|
4665
4695
|
|
|
@@ -4684,4 +4714,4 @@ declare global {
|
|
|
4684
4714
|
}
|
|
4685
4715
|
}
|
|
4686
4716
|
|
|
4687
|
-
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 };
|
|
4717
|
+
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 };
|