@cloudflare/realtimekit 0.5.0-staging.98 → 1.0.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.
- package/dist/browser.js +15 -17
- package/dist/index.cjs.js +15 -17
- package/dist/index.d.ts +59 -48
- package/dist/index.es.js +8219 -9111
- package/dist/index.rn.js +15 -17
- package/dist/mock.cjs.js +3 -3
- package/dist/mock.es.js +1158 -1039
- package/dist/ts3.4/dist/index.d.ts +56 -48
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -338,30 +338,6 @@ interface RtpCapabilitites {
|
|
|
338
338
|
*/
|
|
339
339
|
declare const RtpCapabilitites: RtpCapabilitites$Type;
|
|
340
340
|
|
|
341
|
-
declare class GeoLocation$Type extends MessageType$1<GeoLocation> {
|
|
342
|
-
constructor();
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* @generated from protobuf message media.edge.GeoLocation
|
|
346
|
-
*/
|
|
347
|
-
interface GeoLocation {
|
|
348
|
-
/**
|
|
349
|
-
* @generated from protobuf field: float latitude = 1;
|
|
350
|
-
*/
|
|
351
|
-
latitude: number;
|
|
352
|
-
/**
|
|
353
|
-
* @generated from protobuf field: float longitude = 2;
|
|
354
|
-
*/
|
|
355
|
-
longitude: number;
|
|
356
|
-
/**
|
|
357
|
-
* @generated from protobuf field: optional string region = 3;
|
|
358
|
-
*/
|
|
359
|
-
region?: string;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* @generated MessageType for protobuf message media.edge.GeoLocation
|
|
363
|
-
*/
|
|
364
|
-
declare const GeoLocation: GeoLocation$Type;
|
|
365
341
|
declare class GetRoomStateResponse$Type extends MessageType$1<GetRoomStateResponse> {
|
|
366
342
|
constructor();
|
|
367
343
|
}
|
|
@@ -2181,18 +2157,13 @@ declare enum MediaNodeType {
|
|
|
2181
2157
|
type MediaConnectionState = {
|
|
2182
2158
|
recv: {
|
|
2183
2159
|
state: `${TransportState}`;
|
|
2184
|
-
reconnected: boolean;
|
|
2185
2160
|
};
|
|
2186
2161
|
send: {
|
|
2187
2162
|
state: `${TransportState}`;
|
|
2188
|
-
reconnected: boolean;
|
|
2189
2163
|
};
|
|
2190
2164
|
};
|
|
2191
2165
|
|
|
2192
2166
|
type TransportPromiseEvents = {
|
|
2193
|
-
'connect': {
|
|
2194
|
-
answer: RTCSessionDescriptionInit;
|
|
2195
|
-
};
|
|
2196
2167
|
'close': {
|
|
2197
2168
|
answer: RTCSessionDescriptionInit;
|
|
2198
2169
|
};
|
|
@@ -2408,7 +2379,7 @@ declare class RTKParticipant$1 extends RTKTypedEventEmitter<ParticipantEvents> {
|
|
|
2408
2379
|
setStageStatus(stageStatus: StageStatus): void;
|
|
2409
2380
|
get isPinned(): boolean;
|
|
2410
2381
|
registerVideoElement(videoElem: HTMLVideoElement): void;
|
|
2411
|
-
deregisterVideoElement(videoElem
|
|
2382
|
+
deregisterVideoElement(videoElem?: HTMLVideoElement): void;
|
|
2412
2383
|
}
|
|
2413
2384
|
|
|
2414
2385
|
type TranscriptionData = {
|
|
@@ -2569,6 +2540,25 @@ type BroadcastMessageTarget = {
|
|
|
2569
2540
|
} | {
|
|
2570
2541
|
meetingIds: string[];
|
|
2571
2542
|
};
|
|
2543
|
+
type JoinedPeer = {
|
|
2544
|
+
id: string;
|
|
2545
|
+
userId: string;
|
|
2546
|
+
name: string;
|
|
2547
|
+
stageType?: StageStatus;
|
|
2548
|
+
customParticipantId?: string;
|
|
2549
|
+
presetId?: string;
|
|
2550
|
+
picture?: string;
|
|
2551
|
+
waitlisted: boolean;
|
|
2552
|
+
recorderType?: string;
|
|
2553
|
+
stageStatus?: StageStatus;
|
|
2554
|
+
metadata?: {
|
|
2555
|
+
preset_name?: string;
|
|
2556
|
+
};
|
|
2557
|
+
flags?: {
|
|
2558
|
+
hiddenParticipant?: boolean;
|
|
2559
|
+
recorder?: boolean;
|
|
2560
|
+
};
|
|
2561
|
+
};
|
|
2572
2562
|
type ParticipantsEvents = {
|
|
2573
2563
|
['viewModeChanged']: (payload: {
|
|
2574
2564
|
viewMode: string;
|
|
@@ -2748,7 +2738,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2748
2738
|
get rawAudioTrack(): MediaStreamTrack;
|
|
2749
2739
|
get audioTrack(): MediaStreamTrack;
|
|
2750
2740
|
get audioEnabled(): boolean;
|
|
2751
|
-
enableAudio(): Promise<void>;
|
|
2741
|
+
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
2752
2742
|
disableAudio(): void;
|
|
2753
2743
|
getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
2754
2744
|
setAudioDevice(device: MediaDeviceInfo): Promise<void>;
|
|
@@ -2757,7 +2747,7 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2757
2747
|
get rawVideoTrack(): MediaStreamTrack;
|
|
2758
2748
|
get videoTrack(): MediaStreamTrack;
|
|
2759
2749
|
get videoEnabled(): boolean;
|
|
2760
|
-
enableVideo(): Promise<void>;
|
|
2750
|
+
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
2761
2751
|
disableVideo(): void;
|
|
2762
2752
|
getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
2763
2753
|
setVideoDevice(device: MediaDeviceInfo): Promise<void>;
|
|
@@ -3853,6 +3843,14 @@ type LogData$2 = {
|
|
|
3853
3843
|
};
|
|
3854
3844
|
peerIds?: string[];
|
|
3855
3845
|
producers?: ProducerState[];
|
|
3846
|
+
sdp?: RTCSessionDescription['sdp'];
|
|
3847
|
+
awaitQueueTask?: {
|
|
3848
|
+
id?: string | number;
|
|
3849
|
+
metadata?: Record<string, unknown>;
|
|
3850
|
+
queueSizeAtStart?: number;
|
|
3851
|
+
taskStartTime?: number;
|
|
3852
|
+
execTime?: number;
|
|
3853
|
+
};
|
|
3856
3854
|
};
|
|
3857
3855
|
|
|
3858
3856
|
type EventSeverities = SupportedEventSeverities;
|
|
@@ -3958,6 +3956,11 @@ declare class RTKStoreManager {
|
|
|
3958
3956
|
create(name: string): Promise<RTKStore$1>;
|
|
3959
3957
|
}
|
|
3960
3958
|
|
|
3959
|
+
interface MediaPermissions {
|
|
3960
|
+
canProduceAudio?: MediaProductionPermissionType;
|
|
3961
|
+
canProduceVideo?: MediaProductionPermissionType;
|
|
3962
|
+
canProduceScreenshare?: MediaProductionPermissionType;
|
|
3963
|
+
}
|
|
3961
3964
|
declare const videoCodecPriority: readonly ["video/VP9", "video/VP8"];
|
|
3962
3965
|
type VideoCodec = (typeof videoCodecPriority)[number];
|
|
3963
3966
|
interface MediaNodeClientOptions {
|
|
@@ -3972,20 +3975,14 @@ declare class MediaNodeClient {
|
|
|
3972
3975
|
constructor(context: Context<RTKContextState>, nodeType: MediaNodeType, options: MediaNodeClientOptions);
|
|
3973
3976
|
get mediaJoined(): boolean;
|
|
3974
3977
|
set mediaJoined(joined: boolean);
|
|
3975
|
-
reset(
|
|
3976
|
-
joinRoom(displayName: string, roomUuid: string,
|
|
3977
|
-
audio?: boolean;
|
|
3978
|
-
video?: boolean;
|
|
3979
|
-
screen?: boolean;
|
|
3980
|
-
}, forceFullReset?: boolean, rejoining?: boolean): Promise<{
|
|
3978
|
+
reset(): void;
|
|
3979
|
+
joinRoom(displayName: string, roomUuid: string, forceFullReset?: boolean, rejoining?: boolean, permissions?: MediaPermissions): Promise<{
|
|
3981
3980
|
roomJoined: boolean;
|
|
3982
3981
|
}>;
|
|
3983
|
-
|
|
3984
|
-
partialJoinRoom(displayName: string, roomUuid: string, rejoining?: boolean, loc?: GeoLocation): Promise<any>;
|
|
3985
|
-
leaveRoom(): Promise<void>;
|
|
3982
|
+
initializeConnection(displayName: string, roomUuid: string, rejoining?: boolean, permissions?: MediaPermissions): Promise<void>;
|
|
3986
3983
|
getConsumers(): Map<string, Consumer>;
|
|
3984
|
+
leaveRoom(): Promise<void>;
|
|
3987
3985
|
activatePeers(producers: ProducerState[]): Promise<void>;
|
|
3988
|
-
deactivatePeers(producers: ProducerState[], mode?: 'manual' | 'default'): Promise<void>;
|
|
3989
3986
|
createConsumers(producers: ProducerState[]): Promise<void>;
|
|
3990
3987
|
closeConsumers(producers: ProducerState[]): Promise<void>;
|
|
3991
3988
|
_shareWebcam(videoTrack: MediaStreamTrack & {
|
|
@@ -4010,8 +4007,8 @@ declare class MediaNodeClient {
|
|
|
4010
4007
|
unmuteSelf(): Promise<void>;
|
|
4011
4008
|
resetVideoProducers(videoTrack: MediaStreamTrack, screenShareTrack?: MediaStreamTrack): Promise<void>;
|
|
4012
4009
|
changeDisplayName(displayName: string, peerId?: string): Promise<void>;
|
|
4013
|
-
kick(peerId: string):
|
|
4014
|
-
kickAll():
|
|
4010
|
+
kick(peerId: string): void;
|
|
4011
|
+
kickAll(): void;
|
|
4015
4012
|
muteAll(_allowUnMute: boolean): Promise<void>;
|
|
4016
4013
|
muteAllVideo(): Promise<void>;
|
|
4017
4014
|
disableAudio(peerId: string): Promise<void>;
|
|
@@ -4379,8 +4376,8 @@ declare class RTKSelf$1 extends RTKSelfMedia {
|
|
|
4379
4376
|
}): Promise<void>;
|
|
4380
4377
|
destructMediaHandler(): Promise<void>;
|
|
4381
4378
|
removeDocumentEventListeners(): Promise<void>;
|
|
4382
|
-
enableAudio(): Promise<void>;
|
|
4383
|
-
enableVideo(): Promise<void>;
|
|
4379
|
+
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
4380
|
+
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
4384
4381
|
updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
4385
4382
|
enableScreenShare(): Promise<void>;
|
|
4386
4383
|
updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
@@ -4397,7 +4394,7 @@ declare class RTKSelf$1 extends RTKSelfMedia {
|
|
|
4397
4394
|
setDevice(device: MediaDeviceInfo): Promise<void>;
|
|
4398
4395
|
cleanUpTracks(): void;
|
|
4399
4396
|
registerVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
|
|
4400
|
-
deregisterVideoElement(videoElem
|
|
4397
|
+
deregisterVideoElement(videoElem?: HTMLVideoElement, isPreview?: boolean): void;
|
|
4401
4398
|
}
|
|
4402
4399
|
|
|
4403
4400
|
interface RTKPluginResponse {
|
|
@@ -4652,13 +4649,27 @@ declare class RealtimeKitClient {
|
|
|
4652
4649
|
leaveRoom(state?: LeaveRoomState): Promise<void>;
|
|
4653
4650
|
}
|
|
4654
4651
|
|
|
4652
|
+
declare enum RequestToJoinType {
|
|
4653
|
+
PRESENT = "REQUEST_TO_PRESENT"
|
|
4654
|
+
}
|
|
4655
|
+
|
|
4655
4656
|
type RTKParticipant = Readonly<RTKParticipant$1>;
|
|
4656
4657
|
|
|
4657
4658
|
type RTKParticipants = Readonly<RTKParticipants$1>;
|
|
4658
4659
|
type RTKParticipantMap = Readonly<RTKParticipantMap$1>;
|
|
4659
4660
|
|
|
4660
4661
|
type RTKPlugin = Readonly<RTKPlugin$1>;
|
|
4662
|
+
type RTKPlugins = Readonly<RTKPlugins$1>;
|
|
4663
|
+
type RTKPluginMap = Readonly<RTKPluginMap$1>;
|
|
4664
|
+
type RTKMeta = Readonly<RTKMeta$1>;
|
|
4661
4665
|
type RTKSelf = Readonly<RTKSelf$1>;
|
|
4666
|
+
type RTKChat = Readonly<RTKChat$1>;
|
|
4667
|
+
type RTKPolls = Readonly<RTKPolls$1>;
|
|
4668
|
+
type RTKRecording = Readonly<RTKRecording$1>;
|
|
4669
|
+
|
|
4670
|
+
type RTKLivestream = Readonly<RTKLivestream$1>;
|
|
4671
|
+
|
|
4672
|
+
type RTKStore = RTKStore$1;
|
|
4662
4673
|
|
|
4663
4674
|
type RTKConnectedMeetings = Readonly<RTKConnectedMeetings$1>;
|
|
4664
4675
|
|
|
@@ -4683,4 +4694,4 @@ declare global {
|
|
|
4683
4694
|
}
|
|
4684
4695
|
}
|
|
4685
4696
|
|
|
4686
|
-
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 };
|
|
4697
|
+
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 };
|