@cloudflare/realtimekit 0.0.3 → 0.1.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/.config/rewrite-types.js +15 -2
- package/README.md +1 -15
- package/build-types.sh +0 -16
- package/dist/browser.js +15 -16
- package/dist/index.cjs.js +15 -15
- package/dist/index.d.ts +4 -92
- package/dist/index.es.js +8046 -8831
- package/dist/index.rn.js +22 -0
- package/dist/mock.cjs.js +3 -3
- package/dist/mock.es.js +5 -1
- package/dist/ts3.4/dist/index.d.ts +7 -95
- package/package.json +3 -14
- package/dist/react.cjs.js +0 -23
- package/dist/react.d.ts +0 -4784
- package/dist/react.es.js +0 -30954
- package/dist/ts3.4/dist/react.d.ts +0 -4733
package/dist/mock.es.js
CHANGED
|
@@ -1132,12 +1132,16 @@ class ReflectionJsonReader {
|
|
|
1132
1132
|
target[localName] = field.T().internalJsonRead(jsonValue, options, target[localName]);
|
|
1133
1133
|
break;
|
|
1134
1134
|
case "enum":
|
|
1135
|
+
if (jsonValue === null)
|
|
1136
|
+
continue;
|
|
1135
1137
|
let val = this.enum(field.T(), jsonValue, field.name, options.ignoreUnknownFields);
|
|
1136
1138
|
if (val === false)
|
|
1137
1139
|
continue;
|
|
1138
1140
|
target[localName] = val;
|
|
1139
1141
|
break;
|
|
1140
1142
|
case "scalar":
|
|
1143
|
+
if (jsonValue === null)
|
|
1144
|
+
continue;
|
|
1141
1145
|
target[localName] = this.scalar(jsonValue, field.T, field.L, field.name);
|
|
1142
1146
|
break;
|
|
1143
1147
|
}
|
|
@@ -7907,7 +7911,7 @@ new hi();
|
|
|
7907
7911
|
class ki extends MessageType {
|
|
7908
7912
|
constructor() {
|
|
7909
7913
|
super("common.CFWorkersResponse", [
|
|
7910
|
-
{ no: 1, name: "
|
|
7914
|
+
{ no: 1, name: "responses", kind: "message", repeat: 1, T: () => Ae },
|
|
7911
7915
|
{ no: 2, name: "broadcast_responses", kind: "message", repeat: 1, T: () => Ae }
|
|
7912
7916
|
]);
|
|
7913
7917
|
}
|
|
@@ -1959,8 +1959,6 @@ declare class ChatSocketHandler {
|
|
|
1959
1959
|
on(event: number, handler: (socketMessage: ChatSocketMessage) => void): void;
|
|
1960
1960
|
}
|
|
1961
1961
|
declare class RTKSelectedPeers {
|
|
1962
|
-
private readonly _activeSpeakerPeers;
|
|
1963
|
-
private readonly _compulsoryPeers;
|
|
1964
1962
|
constructor();
|
|
1965
1963
|
add(peerId: string, priority: number): number;
|
|
1966
1964
|
delete(peerId: string): void;
|
|
@@ -1968,7 +1966,6 @@ declare class RTKSelectedPeers {
|
|
|
1968
1966
|
readonly peers: string[];
|
|
1969
1967
|
readonly compulsoryPeers: string[];
|
|
1970
1968
|
readonly activeSpeakerPeers: string[];
|
|
1971
|
-
private _removeFromCompulsoryPeer;
|
|
1972
1969
|
}
|
|
1973
1970
|
type PipEvents = {
|
|
1974
1971
|
['cameraToggled']: () => void;
|
|
@@ -1981,40 +1978,15 @@ type PipEvents = {
|
|
|
1981
1978
|
declare class RTKPip extends RTKTypedEventEmitter<PipEvents> {
|
|
1982
1979
|
private constructor();
|
|
1983
1980
|
static _init(context: Context<RTKContextState>, self: RTKSelf$1): Promise<RTKPip>;
|
|
1984
|
-
private setupIcon;
|
|
1985
1981
|
overrideIcon(icon: 'handRaise' | 'pin', value: string): Promise<void>;
|
|
1986
|
-
private constructImage;
|
|
1987
|
-
private createVideoContainer;
|
|
1988
|
-
private setupEventListeners;
|
|
1989
|
-
private cleanupEventListeners;
|
|
1990
|
-
private enablePipMediaControls;
|
|
1991
|
-
private onSelfVideoUpdateListener;
|
|
1992
|
-
private onSelfAudioUpdateListener;
|
|
1993
|
-
private handlePipMediaControls;
|
|
1994
|
-
private createCanvas;
|
|
1995
|
-
private eventCallback;
|
|
1996
|
-
private setupMediaSessionEvents;
|
|
1997
|
-
private mountAudioEvents;
|
|
1998
|
-
private mountVideoEvents;
|
|
1999
|
-
private unmountEvents;
|
|
2000
|
-
private getSources;
|
|
2001
|
-
private drawEmptyTile;
|
|
2002
|
-
private drawIcons;
|
|
2003
|
-
private drawTile;
|
|
2004
|
-
private calcGridElemSize;
|
|
2005
|
-
private paintCanvas;
|
|
2006
|
-
private animate;
|
|
2007
1982
|
isSupported(): boolean;
|
|
2008
1983
|
readonly isActive: boolean;
|
|
2009
|
-
private cleanup;
|
|
2010
1984
|
init({ height, width }?: {
|
|
2011
1985
|
height?: number;
|
|
2012
1986
|
width?: number;
|
|
2013
1987
|
}): void;
|
|
2014
|
-
private updateMediaSession;
|
|
2015
1988
|
enableSource(source: string): void;
|
|
2016
1989
|
disableSource(source: string): void;
|
|
2017
|
-
private generateAvatar;
|
|
2018
1990
|
addSource(id: string, element: HTMLVideoElement, enabled: boolean, pinned?: boolean, displayText?: string, imageUrl?: string, handRaised?: boolean): void;
|
|
2019
1991
|
updateSource(id: string, source: any): void;
|
|
2020
1992
|
removeSource(id: string): void;
|
|
@@ -2102,7 +2074,6 @@ declare class RoomSocketHandler {
|
|
|
2102
2074
|
id: string;
|
|
2103
2075
|
payload: Uint8Array;
|
|
2104
2076
|
}>;
|
|
2105
|
-
private handleSocketEvents;
|
|
2106
2077
|
on(event: number, handler: (message: EventHandlerTypes) => void): void;
|
|
2107
2078
|
getUserPermissions(userId: string): Promise<Pick<PresetTypeV2['permissions'], 'chat' | 'polls' | 'plugins'>>;
|
|
2108
2079
|
}
|
|
@@ -2140,12 +2111,7 @@ interface HandlerSendResult extends GenericHandlerResult {
|
|
|
2140
2111
|
mid: string;
|
|
2141
2112
|
}
|
|
2142
2113
|
declare abstract class HandlerInterface<TransportPromiseEvents> extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
2143
|
-
|
|
2144
|
-
protected _sendScreenShareStream: MediaStream;
|
|
2145
|
-
protected _direction?: 'send' | 'recv';
|
|
2146
|
-
pc: RTCPeerConnection;
|
|
2147
|
-
protected _transportReady: boolean;
|
|
2148
|
-
private readonly _mapMidTransceiver;
|
|
2114
|
+
pc: RTCPeerConnection;
|
|
2149
2115
|
enableHighBitrate: boolean;
|
|
2150
2116
|
enableStereo: boolean;
|
|
2151
2117
|
enableDtx: boolean;
|
|
@@ -2155,9 +2121,7 @@ declare abstract class HandlerInterface<TransportPromiseEvents> extends Enhanced
|
|
|
2155
2121
|
restartIce(): Promise<GenericHandlerResult>;
|
|
2156
2122
|
init({ direction, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, onTrackHandler, }: HandlerRunOptions): void;
|
|
2157
2123
|
connect(): Promise<GenericHandlerResult>;
|
|
2158
|
-
getTransportStats(): Promise<RTCStatsReport>;
|
|
2159
|
-
protected _assertSendDirection(): void;
|
|
2160
|
-
protected _assertRecvDirection(): void;
|
|
2124
|
+
getTransportStats(): Promise<RTCStatsReport>;
|
|
2161
2125
|
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
2162
2126
|
stopSending(localId: string): Promise<GenericHandlerResult>;
|
|
2163
2127
|
abstract send(options: HandlerSendOptions): Promise<HandlerSendResult>;
|
|
@@ -2409,13 +2373,10 @@ declare class RTKParticipant$1 extends RTKTypedEventEmitter<ParticipantEvents> {
|
|
|
2409
2373
|
supportsRemoteControl: boolean;
|
|
2410
2374
|
presetName?: string;
|
|
2411
2375
|
readonly stageStatus: StageStatus;
|
|
2412
|
-
private readonly mediaJoined: any;
|
|
2413
|
-
private readonly socketJoined: any;
|
|
2414
2376
|
constructor(context: Context<RTKContextState>, participant: Participant, self: RTKSelf, roomSocket: RoomSocketHandler);
|
|
2415
2377
|
setVideoEnabled(videoEnabled: boolean, emitEvent?: boolean): void;
|
|
2416
2378
|
setAudioEnabled(audioEnabled: boolean, emitEvent?: boolean): void;
|
|
2417
2379
|
setScreenShareEnabled(screenShareEnabled: boolean, emitEvent?: boolean): void;
|
|
2418
|
-
private setupEvents;
|
|
2419
2380
|
pin(): Promise<void>;
|
|
2420
2381
|
unpin(): Promise<void>;
|
|
2421
2382
|
setIsPinned(isPinned: boolean, emitEvent?: boolean): void;
|
|
@@ -2427,7 +2388,6 @@ declare class RTKParticipant$1 extends RTKTypedEventEmitter<ParticipantEvents> {
|
|
|
2427
2388
|
readonly isPinned: boolean;
|
|
2428
2389
|
registerVideoElement(videoElem: HTMLVideoElement): void;
|
|
2429
2390
|
deregisterVideoElement(videoElem: HTMLVideoElement): void;
|
|
2430
|
-
private updateVideo;
|
|
2431
2391
|
}
|
|
2432
2392
|
type TranscriptionData = {
|
|
2433
2393
|
id: string;
|
|
@@ -2494,7 +2454,6 @@ declare class RTKMeta$1 extends RTKTypedEventEmitter<MetaEvents> {
|
|
|
2494
2454
|
readonly meetingId: string;
|
|
2495
2455
|
setBroadcastTabChanges(broadcastTabChanges: boolean): void;
|
|
2496
2456
|
setSelfActiveTab(spotlightTab: ActiveTab, tabChangeSource: TabChangeSource): void;
|
|
2497
|
-
private assertActiveTabToRoom;
|
|
2498
2457
|
}
|
|
2499
2458
|
interface RTKMapEvents<T extends EventMap> {
|
|
2500
2459
|
onAddEvent?: keyof T;
|
|
@@ -2653,8 +2612,6 @@ declare class RTKParticipants$1 extends RTKTypedEventEmitter<ParticipantsEvents>
|
|
|
2653
2612
|
readonly pinned: Readonly<RTKParticipantMap$1>;
|
|
2654
2613
|
readonly all: Readonly<RTKBasicParticipantsMap>;
|
|
2655
2614
|
readonly pip: RTKPip;
|
|
2656
|
-
private readonly socketJoined: any;
|
|
2657
|
-
private readonly mediaJoined: any;
|
|
2658
2615
|
rateLimitConfig: {
|
|
2659
2616
|
maxInvocations: number;
|
|
2660
2617
|
period: number;
|
|
@@ -2748,8 +2705,7 @@ declare class FetchClient {
|
|
|
2748
2705
|
retry: number;
|
|
2749
2706
|
retryDelay: number;
|
|
2750
2707
|
responseType?: string;
|
|
2751
|
-
});
|
|
2752
|
-
private buildURL;
|
|
2708
|
+
});
|
|
2753
2709
|
request<T = any>(config: FetchRequestConfig): Promise<FetchResponse<T>>;
|
|
2754
2710
|
get<T = any>(url: string, config?: FetchRequestConfig): Promise<FetchResponse<T>>;
|
|
2755
2711
|
post<T = any>(url: string, data?: any, config?: FetchRequestConfig): Promise<FetchResponse<T>>;
|
|
@@ -2764,7 +2720,6 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2764
2720
|
audioUpdateInProgress: boolean;
|
|
2765
2721
|
videoUpdateInProgress: boolean;
|
|
2766
2722
|
constructor(context: Context<RTKContextState>, mediaConstraints: MediaConstraints, isNonPreferredDevice?: (media: MediaDeviceInfo) => boolean, autoSwitchDevice?: boolean);
|
|
2767
|
-
private onVisibilityChange;
|
|
2768
2723
|
repopulateAvailableDevices(): Promise<boolean>;
|
|
2769
2724
|
setupStreams({ audio, video, }: {
|
|
2770
2725
|
audio: boolean;
|
|
@@ -2782,8 +2737,6 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2782
2737
|
};
|
|
2783
2738
|
getAllDevices(): Promise<InputDeviceInfo[]>;
|
|
2784
2739
|
getDeviceById(deviceId: string, kind?: 'audioinput' | 'audiooutput' | 'videoinput'): Promise<MediaDeviceInfo>;
|
|
2785
|
-
private onAudioTrackMuted;
|
|
2786
|
-
private onAudioTrackChanged;
|
|
2787
2740
|
readonly rawAudioTrack: MediaStreamTrack;
|
|
2788
2741
|
readonly audioTrack: MediaStreamTrack;
|
|
2789
2742
|
readonly audioEnabled: boolean;
|
|
@@ -2793,8 +2746,6 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2793
2746
|
setAudioDevice(device: MediaDeviceInfo): Promise<void>;
|
|
2794
2747
|
setupSpeaker(): Promise<void>;
|
|
2795
2748
|
setSpeakerDevice(device: MediaDeviceInfo): Promise<void>;
|
|
2796
|
-
private onVideoTrackChanged;
|
|
2797
|
-
private onVideoTrackEnded;
|
|
2798
2749
|
readonly rawVideoTrack: MediaStreamTrack;
|
|
2799
2750
|
readonly videoTrack: MediaStreamTrack;
|
|
2800
2751
|
readonly videoEnabled: boolean;
|
|
@@ -2803,7 +2754,6 @@ declare class LocalMediaHandler extends RTKEventEmitter<LocalMediaEvents> {
|
|
|
2803
2754
|
getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
2804
2755
|
setVideoDevice(device: MediaDeviceInfo): Promise<void>;
|
|
2805
2756
|
updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
2806
|
-
private onScreenShareEnded;
|
|
2807
2757
|
readonly screenShareTracks: {
|
|
2808
2758
|
audio: MediaStreamTrack;
|
|
2809
2759
|
video: MediaStreamTrack;
|
|
@@ -3094,7 +3044,6 @@ type PermissionEvents = {
|
|
|
3094
3044
|
};
|
|
3095
3045
|
declare class RTKPermissionsPreset$1 extends RTKTypedEventEmitter<PermissionEvents> {
|
|
3096
3046
|
private constructor();
|
|
3097
|
-
private setupEvents;
|
|
3098
3047
|
static fromResponse(response: PresetPermissions, viewType: ViewType, context: Context<RTKContextState>): RTKPermissionsPreset$1;
|
|
3099
3048
|
static default(context: Context<RTKContextState>, viewType: ViewType): RTKPermissionsPreset$1;
|
|
3100
3049
|
static init(context: Context<RTKContextState>, viewType: ViewType, response?: PresetPermissions): RTKPermissionsPreset$1;
|
|
@@ -3175,7 +3124,6 @@ declare class RTKLivestream$1 extends RTKTypedEventEmitter<LivestreamEvents> {
|
|
|
3175
3124
|
viewerCount: number;
|
|
3176
3125
|
constructor(self: RTKSelf);
|
|
3177
3126
|
setLivestreamState(livestreamState: LivestreamState): void;
|
|
3178
|
-
private emitCurrentLivestreamState;
|
|
3179
3127
|
start(livestreamConfig?: StartLivestreamConfig): Promise<void>;
|
|
3180
3128
|
stop(): Promise<void>;
|
|
3181
3129
|
}
|
|
@@ -3321,12 +3269,7 @@ declare class RTKChat$1 extends RTKTypedEventEmitter<ChatEvents> {
|
|
|
3321
3269
|
channels: ChatChannel[];
|
|
3322
3270
|
maxTextLimit: number;
|
|
3323
3271
|
setMaxTextLimit(limit: number): void;
|
|
3324
|
-
private readonly socketJoined: any;
|
|
3325
3272
|
constructor(context: Context<RTKContextState>, chatSocketHandler: ChatSocketHandler, chatChannelSocketHandler: ChatChannelSocketHandler, self: RTKSelf$1, participants: RTKParticipants$1);
|
|
3326
|
-
private sendMessageInternal;
|
|
3327
|
-
private sendTextMessageInternal;
|
|
3328
|
-
private sendImageMessageInternal;
|
|
3329
|
-
private sendFileMessageInternal;
|
|
3330
3273
|
readonly rateLimits: {
|
|
3331
3274
|
maxInvocations: number;
|
|
3332
3275
|
period: number;
|
|
@@ -3402,7 +3345,6 @@ type PollsEvents = {
|
|
|
3402
3345
|
};
|
|
3403
3346
|
declare class RTKPolls$1 extends RTKTypedEventEmitter<PollsEvents> {
|
|
3404
3347
|
items: Poll[];
|
|
3405
|
-
private readonly socketJoined: any;
|
|
3406
3348
|
constructor(context: Context<RTKContextState>, self: RTKSelf$1, pollSocketHandler: PollSocketHandler);
|
|
3407
3349
|
create(question: string, options: string[], anonymous?: boolean, hideVotes?: boolean): Promise<void>;
|
|
3408
3350
|
vote(id: string, index: number): Promise<void>;
|
|
@@ -3462,12 +3404,6 @@ declare class PluginSocketHandler {
|
|
|
3462
3404
|
on(event: number, handler: (socketMessage: PluginSocketMessage, messageId?: string) => void): void;
|
|
3463
3405
|
}
|
|
3464
3406
|
declare class RTKSelfMedia extends RTKTypedEventEmitter<SelfEvents> {
|
|
3465
|
-
protected localMediaHandler: LocalMediaHandler;
|
|
3466
|
-
protected updatePermission(): Promise<void>;
|
|
3467
|
-
protected populateMediaPermissionsInCallstats({ message, kind, }: {
|
|
3468
|
-
message: keyof typeof MediaPermission;
|
|
3469
|
-
kind: 'audio' | 'video' | 'screenshare';
|
|
3470
|
-
}): Promise<void>;
|
|
3471
3407
|
init(options?: {
|
|
3472
3408
|
video?: boolean;
|
|
3473
3409
|
audio?: boolean;
|
|
@@ -3886,6 +3822,7 @@ type LogData$2 = {
|
|
|
3886
3822
|
};
|
|
3887
3823
|
peerIds?: string[];
|
|
3888
3824
|
producers?: ProducerState[];
|
|
3825
|
+
sdp?: RTCSessionDescription['sdp'];
|
|
3889
3826
|
};
|
|
3890
3827
|
type EventSeverities = SupportedEventSeverities;
|
|
3891
3828
|
type LogData$1 = LogData$2;
|
|
@@ -3949,14 +3886,12 @@ declare class RTKStore$1 {
|
|
|
3949
3886
|
maxInvocations: number;
|
|
3950
3887
|
period: number;
|
|
3951
3888
|
};
|
|
3952
|
-
private listeners;
|
|
3953
3889
|
constructor({ name, socketHandler, meetingId }: {
|
|
3954
3890
|
name: string;
|
|
3955
3891
|
socketHandler: PluginSocketHandler;
|
|
3956
3892
|
meetingId: string;
|
|
3957
3893
|
});
|
|
3958
3894
|
set(key: string, value: any, sync?: boolean, emit?: boolean): Promise<void>;
|
|
3959
|
-
private remoteSet;
|
|
3960
3895
|
bulkSet(data: {
|
|
3961
3896
|
key: string;
|
|
3962
3897
|
payload: any;
|
|
@@ -4000,7 +3935,6 @@ declare class MediaNodeClient {
|
|
|
4000
3935
|
readonly context: Context<RTKContextState>;
|
|
4001
3936
|
readonly authToken: string;
|
|
4002
3937
|
readonly e2ee: boolean;
|
|
4003
|
-
maxPreferredStreams: number;
|
|
4004
3938
|
readonly peerId: string;
|
|
4005
3939
|
constructor(context: Context<RTKContextState>, nodeType: MediaNodeType, options: MediaNodeClientOptions);
|
|
4006
3940
|
mediaJoined: boolean;
|
|
@@ -4012,11 +3946,8 @@ declare class MediaNodeClient {
|
|
|
4012
3946
|
}, forceFullReset?: boolean, rejoining?: boolean): Promise<{
|
|
4013
3947
|
roomJoined: boolean;
|
|
4014
3948
|
}>;
|
|
4015
|
-
private partialJoinRoomPromise;
|
|
4016
3949
|
_partialJoinRoom(displayName: string, roomUuid: string, rejoining?: boolean, loc?: GeoLocation): Promise<void>;
|
|
4017
3950
|
partialJoinRoom(displayName: string, roomUuid: string, rejoining?: boolean, loc?: GeoLocation): Promise<any>;
|
|
4018
|
-
private _joinRoom;
|
|
4019
|
-
private completeJoinRoom;
|
|
4020
3951
|
leaveRoom(): Promise<void>;
|
|
4021
3952
|
getConsumers(): Map<string, Consumer>;
|
|
4022
3953
|
activatePeers(producers: ProducerState[]): Promise<void>;
|
|
@@ -4045,8 +3976,8 @@ declare class MediaNodeClient {
|
|
|
4045
3976
|
unmuteSelf(): Promise<void>;
|
|
4046
3977
|
resetVideoProducers(videoTrack: MediaStreamTrack, screenShareTrack?: MediaStreamTrack): Promise<void>;
|
|
4047
3978
|
changeDisplayName(displayName: string, peerId?: string): Promise<void>;
|
|
4048
|
-
kick(peerId: string):
|
|
4049
|
-
kickAll():
|
|
3979
|
+
kick(peerId: string): void;
|
|
3980
|
+
kickAll(): void;
|
|
4050
3981
|
muteAll(_allowUnMute: boolean): Promise<void>;
|
|
4051
3982
|
muteAllVideo(): Promise<void>;
|
|
4052
3983
|
disableAudio(peerId: string): Promise<void>;
|
|
@@ -4277,7 +4208,6 @@ declare class SocketService {
|
|
|
4277
4208
|
capabilities: SocketServiceCapabilities;
|
|
4278
4209
|
});
|
|
4279
4210
|
updateURL(peerID: string): void;
|
|
4280
|
-
private static getSocketEdgeDomain;
|
|
4281
4211
|
readonly url: string;
|
|
4282
4212
|
connect(): Promise<void>;
|
|
4283
4213
|
disconnect(): Promise<void>;
|
|
@@ -4352,7 +4282,6 @@ type StageEvents = {
|
|
|
4352
4282
|
declare class RTKStage extends RTKTypedEventEmitter<StageEvents> {
|
|
4353
4283
|
constructor(context: Context<RTKContextState>, self: RTKSelf$1, participants: RTKParticipants, stageSocketHandler: StageSocketHandler, roomSocketHandler: RoomSocketHandler);
|
|
4354
4284
|
readonly status: StageStatus;
|
|
4355
|
-
private setupEvents;
|
|
4356
4285
|
getAccessRequests(): {
|
|
4357
4286
|
stageRequests: StageRequestPayload[];
|
|
4358
4287
|
};
|
|
@@ -4396,7 +4325,6 @@ declare class RTKSelf$1 extends RTKSelfMedia {
|
|
|
4396
4325
|
private constructor();
|
|
4397
4326
|
static __init__(context: Context<RTKContextState>, details: UserDetailsResponse, permissions: RTKPermissionsPreset$1, theme: RTKThemePreset$1, presetName: string, skipAwaits?: boolean): Promise<RTKSelf$1>;
|
|
4398
4327
|
cleanupEvents(): void;
|
|
4399
|
-
private setupEvents;
|
|
4400
4328
|
readonly permissions: RTKPermissionsPreset$1;
|
|
4401
4329
|
readonly config: RTKThemePreset$1;
|
|
4402
4330
|
readonly roomJoined: boolean;
|
|
@@ -4427,7 +4355,6 @@ declare class RTKSelf$1 extends RTKSelfMedia {
|
|
|
4427
4355
|
cleanUpTracks(): void;
|
|
4428
4356
|
registerVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
|
|
4429
4357
|
deregisterVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
|
|
4430
|
-
private updateVideo;
|
|
4431
4358
|
}
|
|
4432
4359
|
interface RTKPluginResponse {
|
|
4433
4360
|
baseURL: string;
|
|
@@ -4534,11 +4461,9 @@ declare class RTKPlugin$1 extends RTKEventEmitter<PluginEvents> {
|
|
|
4534
4461
|
enabledBy: string;
|
|
4535
4462
|
constructor(context: Context<RTKContextState>, { baseURL, createdAt, description, id, name, organizationId, picture, private: isPrivate, published, staggered, tags, type, updatedAt, }: RTKPluginResponse, pluginSocketHandler: PluginSocketHandler, self: RTKSelf$1, participants: RTKParticipants$1, chat: Readonly<RTKChat$1>, meetingTitle: string);
|
|
4536
4463
|
sendIframeEvent(message: PluginIframeMessage): void;
|
|
4537
|
-
private handleIframeMessage;
|
|
4538
4464
|
sendData(payload: SendDataOptions): void;
|
|
4539
4465
|
removePluginView(viewId?: string): void;
|
|
4540
4466
|
addPluginView(iframe: HTMLIFrameElement | ReactNativeWebView, viewId?: string): void;
|
|
4541
|
-
private setActive;
|
|
4542
4467
|
activateForSelf(): Promise<void>;
|
|
4543
4468
|
deactivateForSelf(): void;
|
|
4544
4469
|
enable(): Promise<void>;
|
|
@@ -4569,16 +4494,6 @@ interface APIOptions {
|
|
|
4569
4494
|
}
|
|
4570
4495
|
declare class API {
|
|
4571
4496
|
ipInfo: any;
|
|
4572
|
-
protected fetchClient: FetchClient;
|
|
4573
|
-
protected requests: FetchClient;
|
|
4574
|
-
protected roomName: string;
|
|
4575
|
-
protected roomUUID: string;
|
|
4576
|
-
protected authToken: string;
|
|
4577
|
-
protected organizationId: string;
|
|
4578
|
-
protected iceServers: IceServerInformation[];
|
|
4579
|
-
protected pluginInformation: RTKPluginResponse[];
|
|
4580
|
-
protected userDetails: UserDetailsResponseV2;
|
|
4581
|
-
protected roomDetails: RoomDetails;
|
|
4582
4497
|
readonly peerId: string;
|
|
4583
4498
|
context: Context<RTKContextState>;
|
|
4584
4499
|
constructor(context: Context<RTKContextState>, options?: APIOptions);
|
|
@@ -4618,7 +4533,6 @@ declare class RTKConnectedMeetings$1 extends RTKTypedEventEmitter<ConnectedMeeti
|
|
|
4618
4533
|
readonly supportsConnectedMeetings: boolean;
|
|
4619
4534
|
readonly isActive: boolean;
|
|
4620
4535
|
readonly currentMeetingId: string;
|
|
4621
|
-
private validateConnectedMeetingsAction;
|
|
4622
4536
|
getConnectedMeetings(): Promise<{
|
|
4623
4537
|
parentMeeting: ConnectedMeeting;
|
|
4624
4538
|
meetings: ConnectedMeeting[];
|
|
@@ -4653,7 +4567,6 @@ declare class RTKConnectedMeetings$1 extends RTKTypedEventEmitter<ConnectedMeeti
|
|
|
4653
4567
|
success: boolean;
|
|
4654
4568
|
error: any;
|
|
4655
4569
|
}>;
|
|
4656
|
-
private moveSuccessHandler;
|
|
4657
4570
|
}
|
|
4658
4571
|
interface Overrides {
|
|
4659
4572
|
disableSimulcast?: boolean;
|
|
@@ -4672,7 +4585,6 @@ interface RealtimeKitClientOptions {
|
|
|
4672
4585
|
declare class RealtimeKitClient {
|
|
4673
4586
|
private constructor();
|
|
4674
4587
|
static init(options: RealtimeKitClientOptions): Promise<RealtimeKitClient>;
|
|
4675
|
-
private static setupContext;
|
|
4676
4588
|
join(): Promise<void>;
|
|
4677
4589
|
leave(state?: LeaveRoomState): Promise<void>;
|
|
4678
4590
|
readonly participants: Readonly<RTKParticipants$1>;
|
|
@@ -4716,4 +4628,4 @@ declare global {
|
|
|
4716
4628
|
TransformStream?: any;
|
|
4717
4629
|
}
|
|
4718
4630
|
}
|
|
4719
|
-
export { ActiveTab, ActiveTabType, AudioProducerScoreStats, ChatChannel, ChatUpdateParams, CustomMessage, DeviceConfig, RTKBasicParticipant, RealtimeKitClientOptions, RTKConnectedMeetings, RTKParticipant, RTKParticipantMap, RTKParticipants, RTKPermissionsPreset, RTKPlugin, RTKSelf,
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/realtimekit",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.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",
|
|
@@ -17,18 +17,6 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
-
"./react": {
|
|
21
|
-
"import": "./dist/react.es.js",
|
|
22
|
-
"require": "./dist/react.cjs.js",
|
|
23
|
-
"types": "./dist/react.d.ts",
|
|
24
|
-
"typesVersions": {
|
|
25
|
-
"<4.0": {
|
|
26
|
-
"*": [
|
|
27
|
-
"./dist/ts3.4/react.d.ts"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
20
|
"./inlined": {
|
|
33
21
|
"default": "./dist/browser.js",
|
|
34
22
|
"types": "./dist/index.d.ts",
|
|
@@ -53,6 +41,7 @@
|
|
|
53
41
|
}
|
|
54
42
|
}
|
|
55
43
|
},
|
|
44
|
+
"react-native": "./dist/index.rn.js",
|
|
56
45
|
"types": "./dist/index.d.ts",
|
|
57
46
|
"typesVersions": {
|
|
58
47
|
"<4.0": {
|
|
@@ -80,4 +69,4 @@
|
|
|
80
69
|
"scripts": {
|
|
81
70
|
"postpublish": "mv package.json.bak package.json"
|
|
82
71
|
}
|
|
83
|
-
}
|
|
72
|
+
}
|