@cloudflare/realtimekit 2.0.3-staging.7 → 2.0.3-staging.9
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/AGENTS.md +5 -5
- package/dist/ClientMock.cjs.js +1 -1
- package/dist/ClientMock.es.js +447 -365
- package/dist/EncryptionManager.cjs.js +1 -1
- package/dist/EncryptionManager.d.ts +18 -3
- package/dist/EncryptionManager.es.js +11 -11
- package/dist/browser.js +10 -10
- package/dist/dependencies.txt +204 -16
- package/dist/index.cjs.js +7 -7
- package/dist/index.d.ts +18 -3
- package/dist/index.es.js +6007 -5888
- package/dist/index.es5.js +4672 -4680
- package/dist/index.rn.js +7 -7
- package/dist/ts3.4/dist/EncryptionManager.d.ts +18 -3
- package/dist/ts3.4/dist/index.d.ts +18 -3
- package/package.json +2 -2
|
@@ -490,6 +490,10 @@ interface PeerJoinBroadcastResponse {
|
|
|
490
490
|
* @generated from protobuf field: media.edge.RoomParticipants participant = 1;
|
|
491
491
|
*/
|
|
492
492
|
participant?: RoomParticipants;
|
|
493
|
+
/**
|
|
494
|
+
* @generated from protobuf field: optional string producer_handover_from_peer_id = 2;
|
|
495
|
+
*/
|
|
496
|
+
producerHandoverFromPeerId?: string;
|
|
493
497
|
}
|
|
494
498
|
/**
|
|
495
499
|
* @generated MessageType for protobuf message media.edge.PeerJoinBroadcastResponse
|
|
@@ -1796,6 +1800,7 @@ declare class SocketService {
|
|
|
1796
1800
|
readonly telemetry: Telemetry;
|
|
1797
1801
|
readonly logger: Logger;
|
|
1798
1802
|
readonly peerId: string;
|
|
1803
|
+
readonly replacedPeerIds: string[];
|
|
1799
1804
|
constructor(context: Context<ContextState>, { peerId, meetingId, authToken, capabilities, }: {
|
|
1800
1805
|
peerId: string;
|
|
1801
1806
|
meetingId: string;
|
|
@@ -1875,6 +1880,7 @@ declare class SelectedPeers {
|
|
|
1875
1880
|
constructor();
|
|
1876
1881
|
add(peerId: string, priority: number, context: Context<ContextState>): number;
|
|
1877
1882
|
delete(peerId: string, context: Context<ContextState>): void;
|
|
1883
|
+
reassignPeer(oldPeerId: string, newPeerId: string, context: Context<ContextState>): void;
|
|
1878
1884
|
index(peerId: string): number;
|
|
1879
1885
|
readonly peers: string[];
|
|
1880
1886
|
readonly compulsoryPeers: string[];
|
|
@@ -3230,6 +3236,7 @@ declare class AudioPlayback {
|
|
|
3230
3236
|
declare class AudioPlaybackManager extends AudioPlayback {
|
|
3231
3237
|
constructor();
|
|
3232
3238
|
addParticipantTrack(participantId: string, track: MediaStreamTrack): void;
|
|
3239
|
+
reassignParticipantTrack(oldParticipantId: string, newParticipantId: string): void;
|
|
3233
3240
|
removeParticipantTrack(participantId: string): void;
|
|
3234
3241
|
}
|
|
3235
3242
|
declare class SelfMedia extends TypedEventEmitter<SelfEvents> {
|
|
@@ -3458,13 +3465,14 @@ declare class Consumer extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
|
3458
3465
|
readonly producingTransportId: string;
|
|
3459
3466
|
readonly mimeType: string;
|
|
3460
3467
|
readonly track: MediaStreamTrack;
|
|
3461
|
-
|
|
3468
|
+
peerId: string;
|
|
3462
3469
|
readonly appData: Record<string, unknown>;
|
|
3463
3470
|
readonly transceiver: RTCRtpTransceiver;
|
|
3464
3471
|
constructor(context: Context<ContextState>, opts: ConsumerOptions);
|
|
3465
3472
|
readonly closed: boolean;
|
|
3466
3473
|
readonly kind: MediaKind$1;
|
|
3467
3474
|
readonly paused: boolean;
|
|
3475
|
+
reassignPeer(peerId: string): void;
|
|
3468
3476
|
close(reason?: string, closeTranscieverOnClose?: boolean): void;
|
|
3469
3477
|
getStats(): Promise<RTCStatsReport>;
|
|
3470
3478
|
pause(): void;
|
|
@@ -3603,7 +3611,7 @@ declare const modes: readonly [
|
|
|
3603
3611
|
];
|
|
3604
3612
|
type ViewMode = (typeof modes)[number];
|
|
3605
3613
|
interface BroadcastMessagePayload {
|
|
3606
|
-
[key: string]: boolean | number | string | Date | ActiveTab;
|
|
3614
|
+
[key: string]: boolean | number | string | string[] | Date | ActiveTab;
|
|
3607
3615
|
}
|
|
3608
3616
|
interface PeerProducerConfig {
|
|
3609
3617
|
audio: boolean;
|
|
@@ -3919,7 +3927,7 @@ declare class MediaNodeClient {
|
|
|
3919
3927
|
initializeConnection(displayName: string, roomUuid: string, rejoining?: boolean, permissions?: MediaPermissions): Promise<void>;
|
|
3920
3928
|
getConsumers(): Map<string, Consumer>;
|
|
3921
3929
|
getProducers(): Map<string, Producer>;
|
|
3922
|
-
|
|
3930
|
+
handoverPeerProducers(newPeerId: string, producerIds: string[]): Consumer[];
|
|
3923
3931
|
leaveRoom(): Promise<void>;
|
|
3924
3932
|
activatePeers(producers: ProducerState[]): Promise<void>;
|
|
3925
3933
|
createConsumers(producers: ProducerState[]): Promise<void>;
|
|
@@ -4039,8 +4047,14 @@ interface TypedEventEmitter$1<Events extends EventMap$1> {
|
|
|
4039
4047
|
setMaxListeners(maxListeners: number): this;
|
|
4040
4048
|
reset(): void;
|
|
4041
4049
|
}
|
|
4050
|
+
type ProducerHandoverPayload = {
|
|
4051
|
+
oldPeerId: string;
|
|
4052
|
+
newPeerId: string;
|
|
4053
|
+
producerIds: string[];
|
|
4054
|
+
};
|
|
4042
4055
|
declare enum SessionEvents {
|
|
4043
4056
|
NEW_PRODUCER = "NEW_PRODUCER",
|
|
4057
|
+
PRODUCER_HANDOVER = "PRODUCER_HANDOVER",
|
|
4044
4058
|
ROOM_NODE_CONNECTION_ERROR = "ROOM_NODE_CONNECTION_ERROR",
|
|
4045
4059
|
SOCKET_SERVICE_ROOM_JOINED = "SOCKET_SERVICE_ROOM_JOINED",
|
|
4046
4060
|
SOCKET_SERVICE_RECONNECTED = "SOCKET_SERVICE_RECONNECTED",
|
|
@@ -4095,6 +4109,7 @@ type AllEvents = {
|
|
|
4095
4109
|
[key in SessionEvents]: (payload?: any) => void;
|
|
4096
4110
|
};
|
|
4097
4111
|
type TypedEvents = {
|
|
4112
|
+
[SessionEvents.PRODUCER_HANDOVER]: (payload: ProducerHandoverPayload) => void;
|
|
4098
4113
|
[SessionEvents.TRANSPORT_STATE_UPDATE]: (payload: MediaConnectionUpdate) => void;
|
|
4099
4114
|
[SessionEvents.UPDATE_PERMISSIONS]: (p: PresetUpdates) => void;
|
|
4100
4115
|
[SessionEvents.MAX_SPATIAL_LAYER_CHANGE]: (p: {
|
|
@@ -461,6 +461,10 @@ interface PeerJoinBroadcastResponse {
|
|
|
461
461
|
* @generated from protobuf field: media.edge.RoomParticipants participant = 1;
|
|
462
462
|
*/
|
|
463
463
|
participant?: RoomParticipants;
|
|
464
|
+
/**
|
|
465
|
+
* @generated from protobuf field: optional string producer_handover_from_peer_id = 2;
|
|
466
|
+
*/
|
|
467
|
+
producerHandoverFromPeerId?: string;
|
|
464
468
|
}
|
|
465
469
|
/**
|
|
466
470
|
* @generated MessageType for protobuf message media.edge.PeerJoinBroadcastResponse
|
|
@@ -1767,6 +1771,7 @@ declare class SocketService {
|
|
|
1767
1771
|
readonly telemetry: Telemetry;
|
|
1768
1772
|
readonly logger: Logger;
|
|
1769
1773
|
readonly peerId: string;
|
|
1774
|
+
readonly replacedPeerIds: string[];
|
|
1770
1775
|
constructor(context: Context<ContextState>, { peerId, meetingId, authToken, capabilities, }: {
|
|
1771
1776
|
peerId: string;
|
|
1772
1777
|
meetingId: string;
|
|
@@ -1912,6 +1917,7 @@ declare class SelectedPeers {
|
|
|
1912
1917
|
constructor();
|
|
1913
1918
|
add(peerId: string, priority: number, context: Context<ContextState>): number;
|
|
1914
1919
|
delete(peerId: string, context: Context<ContextState>): void;
|
|
1920
|
+
reassignPeer(oldPeerId: string, newPeerId: string, context: Context<ContextState>): void;
|
|
1915
1921
|
index(peerId: string): number;
|
|
1916
1922
|
readonly peers: string[];
|
|
1917
1923
|
readonly compulsoryPeers: string[];
|
|
@@ -2258,13 +2264,14 @@ declare class Consumer extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
|
2258
2264
|
readonly producingTransportId: string;
|
|
2259
2265
|
readonly mimeType: string;
|
|
2260
2266
|
readonly track: MediaStreamTrack;
|
|
2261
|
-
|
|
2267
|
+
peerId: string;
|
|
2262
2268
|
readonly appData: Record<string, unknown>;
|
|
2263
2269
|
readonly transceiver: RTCRtpTransceiver;
|
|
2264
2270
|
constructor(context: Context<ContextState>, opts: ConsumerOptions);
|
|
2265
2271
|
readonly closed: boolean;
|
|
2266
2272
|
readonly kind: MediaKind$1;
|
|
2267
2273
|
readonly paused: boolean;
|
|
2274
|
+
reassignPeer(peerId: string): void;
|
|
2268
2275
|
close(reason?: string, closeTranscieverOnClose?: boolean): void;
|
|
2269
2276
|
getStats(): Promise<RTCStatsReport>;
|
|
2270
2277
|
pause(): void;
|
|
@@ -2451,7 +2458,7 @@ declare const modes: readonly [
|
|
|
2451
2458
|
];
|
|
2452
2459
|
type ViewMode = (typeof modes)[number];
|
|
2453
2460
|
interface BroadcastMessagePayload {
|
|
2454
|
-
[key: string]: boolean | number | string | Date | ActiveTab;
|
|
2461
|
+
[key: string]: boolean | number | string | string[] | Date | ActiveTab;
|
|
2455
2462
|
}
|
|
2456
2463
|
interface PeerProducerConfig {
|
|
2457
2464
|
audio: boolean;
|
|
@@ -3644,7 +3651,7 @@ declare class MediaNodeClient {
|
|
|
3644
3651
|
initializeConnection(displayName: string, roomUuid: string, rejoining?: boolean, permissions?: MediaPermissions): Promise<void>;
|
|
3645
3652
|
getConsumers(): Map<string, Consumer>;
|
|
3646
3653
|
getProducers(): Map<string, Producer>;
|
|
3647
|
-
|
|
3654
|
+
handoverPeerProducers(newPeerId: string, producerIds: string[]): Consumer[];
|
|
3648
3655
|
leaveRoom(): Promise<void>;
|
|
3649
3656
|
activatePeers(producers: ProducerState[]): Promise<void>;
|
|
3650
3657
|
createConsumers(producers: ProducerState[]): Promise<void>;
|
|
@@ -3970,8 +3977,14 @@ interface TypedEventEmitter<Events extends EventMap> {
|
|
|
3970
3977
|
setMaxListeners(maxListeners: number): this;
|
|
3971
3978
|
reset(): void;
|
|
3972
3979
|
}
|
|
3980
|
+
type ProducerHandoverPayload = {
|
|
3981
|
+
oldPeerId: string;
|
|
3982
|
+
newPeerId: string;
|
|
3983
|
+
producerIds: string[];
|
|
3984
|
+
};
|
|
3973
3985
|
declare enum SessionEvents {
|
|
3974
3986
|
NEW_PRODUCER = "NEW_PRODUCER",
|
|
3987
|
+
PRODUCER_HANDOVER = "PRODUCER_HANDOVER",
|
|
3975
3988
|
ROOM_NODE_CONNECTION_ERROR = "ROOM_NODE_CONNECTION_ERROR",
|
|
3976
3989
|
SOCKET_SERVICE_ROOM_JOINED = "SOCKET_SERVICE_ROOM_JOINED",
|
|
3977
3990
|
SOCKET_SERVICE_RECONNECTED = "SOCKET_SERVICE_RECONNECTED",
|
|
@@ -4026,6 +4039,7 @@ type AllEvents = {
|
|
|
4026
4039
|
[key in SessionEvents]: (payload?: any) => void;
|
|
4027
4040
|
};
|
|
4028
4041
|
type TypedEvents = {
|
|
4042
|
+
[SessionEvents.PRODUCER_HANDOVER]: (payload: ProducerHandoverPayload) => void;
|
|
4029
4043
|
[SessionEvents.TRANSPORT_STATE_UPDATE]: (payload: MediaConnectionUpdate) => void;
|
|
4030
4044
|
[SessionEvents.UPDATE_PERMISSIONS]: (p: PresetUpdates) => void;
|
|
4031
4045
|
[SessionEvents.MAX_SPATIAL_LAYER_CHANGE]: (p: {
|
|
@@ -4067,6 +4081,7 @@ declare class AudioPlayback {
|
|
|
4067
4081
|
declare class AudioPlaybackManager extends AudioPlayback {
|
|
4068
4082
|
constructor();
|
|
4069
4083
|
addParticipantTrack(participantId: string, track: MediaStreamTrack): void;
|
|
4084
|
+
reassignParticipantTrack(oldParticipantId: string, newParticipantId: string): void;
|
|
4070
4085
|
removeParticipantTrack(participantId: string): void;
|
|
4071
4086
|
}
|
|
4072
4087
|
declare const ENVIRONMENTS: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/realtimekit",
|
|
3
|
-
"version": "2.0.3-staging.
|
|
3
|
+
"version": "2.0.3-staging.9",
|
|
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",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@types/uuid": "^8.3.4",
|
|
98
98
|
"type-fest": "^2.12.1",
|
|
99
99
|
"@cloudflare/realtimekit-callstats": "8.0.0",
|
|
100
|
-
"@
|
|
100
|
+
"@cloudflare/realtimekit-proto-entities": "2.115.1",
|
|
101
101
|
"@cloudflare/realtimekit-sockrates": "0.2.0",
|
|
102
102
|
"@cloudflare/realtimekit-utils": "1.0.0"
|
|
103
103
|
},
|