@cloudflare/realtimekit 1.5.0-staging.1 → 1.5.0-staging.10
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/EncryptionManager.cjs.js +1 -1
- package/dist/EncryptionManager.d.ts +24 -16
- package/dist/EncryptionManager.es.js +199 -199
- package/dist/browser.js +13 -15
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +10 -12
- package/dist/index.d.ts +24 -16
- package/dist/index.es.js +6950 -7222
- package/dist/index.es5.js +7797 -8097
- package/dist/index.rn.js +10 -12
- package/dist/ts3.4/dist/EncryptionManager.d.ts +30 -19
- package/dist/ts3.4/dist/index.d.ts +30 -19
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
+
import { InhouseCallStats } from '@cloudflare/realtimekit-callstats';
|
|
2
3
|
import * as _cloudflare_realtimekit_utils from '@cloudflare/realtimekit-utils';
|
|
3
|
-
import { PresetTypeV2, MediaVideoQualityType, ViewType, LivestreamViewerMediaQualityType, MediaScreenShareQualityType, PluginAccessControls, WaitingRoomTypes, MediaProductionPermissionType, RecorderType as RecorderType$1, BorderRadius, BorderWidth, Theme
|
|
4
|
+
import { PresetTypeV2, MediaVideoQualityType, ViewType, LivestreamViewerMediaQualityType, MediaScreenShareQualityType, PluginAccessControls, WaitingRoomTypes, MediaProductionPermissionType, RecorderType as RecorderType$1, BorderRadius, BorderWidth, Theme } from '@cloudflare/realtimekit-utils';
|
|
4
5
|
import { MessageType as MessageType$1 } from '@protobuf-ts/runtime';
|
|
5
|
-
import { InhouseCallStats } from '@cloudflare/realtimekit-callstats';
|
|
6
|
-
import { ClientEnvTypeAll } from '@cloudflare/realtimekit-callstats/dist/types';
|
|
7
6
|
import { ProducerScoreStats, ConsumerScoreStats } from '@cloudflare/realtimekit-callstats/dist/measurements/types';
|
|
8
7
|
import * as WorkerTimers from 'worker-timers';
|
|
9
8
|
declare global {
|
|
@@ -3100,13 +3099,17 @@ declare class BrowserCapabilities extends BrowserDetection {
|
|
|
3100
3099
|
_getChromiumBasedVersion(): number;
|
|
3101
3100
|
isIOSMobile(): boolean;
|
|
3102
3101
|
}
|
|
3102
|
+
type FlagValues = boolean | string | number | null | undefined;
|
|
3103
|
+
type FlagsEntry = Record<'enabled' | 'value', boolean | FlagValues> & {
|
|
3104
|
+
enabled: boolean;
|
|
3105
|
+
value: FlagValues;
|
|
3106
|
+
};
|
|
3107
|
+
type FlagsMap = Record<string, FlagsEntry>;
|
|
3103
3108
|
declare class Features {
|
|
3104
3109
|
constructor(context: Context<ContextState>);
|
|
3105
3110
|
hasFeature(featureName: string): boolean;
|
|
3106
|
-
getFeatureValue(featureName: string):
|
|
3107
|
-
getAllFeatures():
|
|
3108
|
-
[x: string]: _cloudflare_realtimekit_utils.FlagsEntry;
|
|
3109
|
-
};
|
|
3111
|
+
getFeatureValue(featureName: string): FlagValues;
|
|
3112
|
+
getAllFeatures(): FlagsMap;
|
|
3110
3113
|
}
|
|
3111
3114
|
declare class Internals {
|
|
3112
3115
|
authToken: string;
|
|
@@ -3158,6 +3161,7 @@ declare const ERROR_CODES: {
|
|
|
3158
3161
|
'0011': string;
|
|
3159
3162
|
'0012': string;
|
|
3160
3163
|
'0013': string;
|
|
3164
|
+
'0014': string;
|
|
3161
3165
|
'0100': string;
|
|
3162
3166
|
'0101': string;
|
|
3163
3167
|
'0102': string;
|
|
@@ -4100,11 +4104,6 @@ interface MediaPermissions {
|
|
|
4100
4104
|
canProduceVideo?: MediaProductionPermissionType;
|
|
4101
4105
|
canProduceScreenshare?: MediaProductionPermissionType;
|
|
4102
4106
|
}
|
|
4103
|
-
declare const videoCodecPriority: readonly [
|
|
4104
|
-
"video/VP9",
|
|
4105
|
-
"video/VP8"
|
|
4106
|
-
];
|
|
4107
|
-
type VideoCodec = (typeof videoCodecPriority)[number];
|
|
4108
4107
|
interface MediaNodeClientOptions {
|
|
4109
4108
|
peerId: string;
|
|
4110
4109
|
socket: SocketService;
|
|
@@ -4134,7 +4133,7 @@ declare class MediaNodeClient {
|
|
|
4134
4133
|
originalSettings?: {
|
|
4135
4134
|
width: number;
|
|
4136
4135
|
};
|
|
4137
|
-
}
|
|
4136
|
+
}): Promise<MediaStreamTrack>;
|
|
4138
4137
|
shareWebcam(videoTrack: MediaStreamTrack): Promise<MediaStreamTrack | null>;
|
|
4139
4138
|
shareScreen(tracks: {
|
|
4140
4139
|
video?: MediaStreamTrack;
|
|
@@ -4145,7 +4144,7 @@ declare class MediaNodeClient {
|
|
|
4145
4144
|
pauseWebcam(): Promise<void>;
|
|
4146
4145
|
resumeMic(): Promise<void>;
|
|
4147
4146
|
resumeWebcam(producerType?: PRODUCERS_TYPE): Promise<void>;
|
|
4148
|
-
disableWebcam(
|
|
4147
|
+
disableWebcam(): Promise<void>;
|
|
4149
4148
|
disableMic(): Promise<void>;
|
|
4150
4149
|
disableScreenShare(): Promise<void>;
|
|
4151
4150
|
muteSelf(): Promise<void>;
|
|
@@ -4168,8 +4167,6 @@ declare class MediaNodeClient {
|
|
|
4168
4167
|
switchConsumersToLayer(consumerIds: string[], layer: number): Promise<void>;
|
|
4169
4168
|
handleSocketEvents(): Promise<void>;
|
|
4170
4169
|
handleCallstatsEvents(): void;
|
|
4171
|
-
handlePeerCapabilities(peerId: string, capabilities: PeerRtpCapabilitites): void;
|
|
4172
|
-
handlePeerLeaving(peerId: string): void;
|
|
4173
4170
|
}
|
|
4174
4171
|
interface Modules {
|
|
4175
4172
|
pip?: boolean;
|
|
@@ -4190,6 +4187,7 @@ interface Modules {
|
|
|
4190
4187
|
};
|
|
4191
4188
|
devTools?: {
|
|
4192
4189
|
logs: boolean;
|
|
4190
|
+
logLevel?: LogLevel[number];
|
|
4193
4191
|
plugins?: {
|
|
4194
4192
|
id: string;
|
|
4195
4193
|
name: string;
|
|
@@ -4335,6 +4333,10 @@ type TypedEvents = {
|
|
|
4335
4333
|
};
|
|
4336
4334
|
type UntypedEvents = Pick<AllEvents, Exclude<keyof AllEvents, keyof TypedEvents>>;
|
|
4337
4335
|
type SessionEventsType = TypedEvents & UntypedEvents;
|
|
4336
|
+
declare const ENVIRONMENTS: {
|
|
4337
|
+
readonly STAGING: "staging";
|
|
4338
|
+
readonly PROD: "prod";
|
|
4339
|
+
};
|
|
4338
4340
|
type ContextState = {
|
|
4339
4341
|
authToken?: string;
|
|
4340
4342
|
peerId?: string;
|
|
@@ -4357,14 +4359,13 @@ type ContextState = {
|
|
|
4357
4359
|
pip?: Pip;
|
|
4358
4360
|
roomNodeClient?: MediaNodeClient;
|
|
4359
4361
|
viewType?: ViewType;
|
|
4360
|
-
env?:
|
|
4362
|
+
env?: typeof ENVIRONMENTS[keyof typeof ENVIRONMENTS];
|
|
4361
4363
|
sdkVersion?: string;
|
|
4362
4364
|
sdkName?: 'web-core';
|
|
4363
4365
|
callstats?: InhouseCallStats;
|
|
4364
4366
|
connectionHandler?: ConnectionHandler;
|
|
4365
4367
|
cachedUserDetails?: CachedUserDetails;
|
|
4366
4368
|
peerSessionStore?: TypedEventEmitter$1<SessionEventsType>;
|
|
4367
|
-
flagsmith?: ReturnType<typeof createNewFlagsmithInstance>;
|
|
4368
4369
|
roomSocketHandler?: RoomSocketHandler;
|
|
4369
4370
|
connectedMeetingsSocketHandler?: ConnectedMeetingsSocketHandler;
|
|
4370
4371
|
audioPlayback?: AudioPlaybackManager;
|
|
@@ -4847,6 +4848,15 @@ type LogData$2 = {
|
|
|
4847
4848
|
execTime?: number;
|
|
4848
4849
|
};
|
|
4849
4850
|
};
|
|
4851
|
+
type LogLevel = readonly [
|
|
4852
|
+
'off',
|
|
4853
|
+
'all',
|
|
4854
|
+
'debug',
|
|
4855
|
+
'log',
|
|
4856
|
+
'info',
|
|
4857
|
+
'warn',
|
|
4858
|
+
'error'
|
|
4859
|
+
];
|
|
4850
4860
|
type EventSeverities = SupportedEventSeverities;
|
|
4851
4861
|
type LogData$1 = LogData$2;
|
|
4852
4862
|
interface MeetingMetadata {
|
|
@@ -4868,12 +4878,13 @@ declare class Telemetry {
|
|
|
4868
4878
|
readonly logsEndpoint: string;
|
|
4869
4879
|
tracingEnabled: boolean;
|
|
4870
4880
|
initialized: boolean;
|
|
4881
|
+
logLevel: LogLevel[number];
|
|
4871
4882
|
readonly logsProcessingInterval = 7000;
|
|
4872
4883
|
private readonly logsBatchSize: any;
|
|
4873
4884
|
logExclusionList: string[];
|
|
4874
4885
|
meetingMetadata: MeetingMetadata;
|
|
4875
4886
|
resetPeerId(peerId: string): void;
|
|
4876
|
-
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean): void;
|
|
4887
|
+
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean, logLevel: LogLevel[number]): void;
|
|
4877
4888
|
static trace(spanName: string, metadata?: LogData$1 | undefined): (_target: Object, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
4878
4889
|
injectContext(injectionReceiver: any): void;
|
|
4879
4890
|
addLogInCurrentSpan(eventSeverity: EventSeverities, eventName: string, metadata?: LogData$1, noCache?: boolean): void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as _cloudflare_realtimekit_utils from '@cloudflare/realtimekit-utils';
|
|
2
|
-
import { PresetTypeV2, MediaVideoQualityType, ViewType, MediaScreenShareQualityType, LivestreamViewerMediaQualityType, PluginAccessControls, WaitingRoomTypes, MediaProductionPermissionType, RecorderType as RecorderType$1, BorderRadius, BorderWidth, Theme
|
|
3
|
-
import { MessageType as MessageType$1 } from '@protobuf-ts/runtime';
|
|
2
|
+
import { PresetTypeV2, MediaVideoQualityType, ViewType, MediaScreenShareQualityType, LivestreamViewerMediaQualityType, PluginAccessControls, WaitingRoomTypes, MediaProductionPermissionType, RecorderType as RecorderType$1, BorderRadius, BorderWidth, Theme } from '@cloudflare/realtimekit-utils';
|
|
4
3
|
import { EventEmitter } from 'events';
|
|
5
4
|
import { InhouseCallStats } from '@cloudflare/realtimekit-callstats';
|
|
6
|
-
import {
|
|
5
|
+
import { MessageType as MessageType$1 } from '@protobuf-ts/runtime';
|
|
7
6
|
import { ConsumerScoreStats, ProducerScoreStats } from '@cloudflare/realtimekit-callstats/dist/measurements/types';
|
|
8
7
|
export { AudioConsumerScoreStats, AudioProducerScoreStats, ConsumerScoreStats, ProducerScoreStats, VideoConsumerScoreStats, VideoProducerScoreStats } from '@cloudflare/realtimekit-callstats/dist/measurements/types';
|
|
9
8
|
import * as WorkerTimers from 'worker-timers';
|
|
@@ -3739,13 +3738,17 @@ declare class BrowserCapabilities extends BrowserDetection {
|
|
|
3739
3738
|
_getChromiumBasedVersion(): number;
|
|
3740
3739
|
isIOSMobile(): boolean;
|
|
3741
3740
|
}
|
|
3741
|
+
type FlagValues = boolean | string | number | null | undefined;
|
|
3742
|
+
type FlagsEntry = Record<'enabled' | 'value', boolean | FlagValues> & {
|
|
3743
|
+
enabled: boolean;
|
|
3744
|
+
value: FlagValues;
|
|
3745
|
+
};
|
|
3746
|
+
type FlagsMap = Record<string, FlagsEntry>;
|
|
3742
3747
|
declare class Features {
|
|
3743
3748
|
constructor(context: Context<ContextState>);
|
|
3744
3749
|
hasFeature(featureName: string): boolean;
|
|
3745
|
-
getFeatureValue(featureName: string):
|
|
3746
|
-
getAllFeatures():
|
|
3747
|
-
[x: string]: _cloudflare_realtimekit_utils.FlagsEntry;
|
|
3748
|
-
};
|
|
3750
|
+
getFeatureValue(featureName: string): FlagValues;
|
|
3751
|
+
getAllFeatures(): FlagsMap;
|
|
3749
3752
|
}
|
|
3750
3753
|
declare class Internals {
|
|
3751
3754
|
authToken: string;
|
|
@@ -3823,11 +3826,6 @@ interface MediaPermissions {
|
|
|
3823
3826
|
canProduceVideo?: MediaProductionPermissionType;
|
|
3824
3827
|
canProduceScreenshare?: MediaProductionPermissionType;
|
|
3825
3828
|
}
|
|
3826
|
-
declare const videoCodecPriority: readonly [
|
|
3827
|
-
"video/VP9",
|
|
3828
|
-
"video/VP8"
|
|
3829
|
-
];
|
|
3830
|
-
type VideoCodec = (typeof videoCodecPriority)[number];
|
|
3831
3829
|
interface MediaNodeClientOptions {
|
|
3832
3830
|
peerId: string;
|
|
3833
3831
|
socket: SocketService;
|
|
@@ -3857,7 +3855,7 @@ declare class MediaNodeClient {
|
|
|
3857
3855
|
originalSettings?: {
|
|
3858
3856
|
width: number;
|
|
3859
3857
|
};
|
|
3860
|
-
}
|
|
3858
|
+
}): Promise<MediaStreamTrack>;
|
|
3861
3859
|
shareWebcam(videoTrack: MediaStreamTrack): Promise<MediaStreamTrack | null>;
|
|
3862
3860
|
shareScreen(tracks: {
|
|
3863
3861
|
video?: MediaStreamTrack;
|
|
@@ -3868,7 +3866,7 @@ declare class MediaNodeClient {
|
|
|
3868
3866
|
pauseWebcam(): Promise<void>;
|
|
3869
3867
|
resumeMic(): Promise<void>;
|
|
3870
3868
|
resumeWebcam(producerType?: PRODUCERS_TYPE): Promise<void>;
|
|
3871
|
-
disableWebcam(
|
|
3869
|
+
disableWebcam(): Promise<void>;
|
|
3872
3870
|
disableMic(): Promise<void>;
|
|
3873
3871
|
disableScreenShare(): Promise<void>;
|
|
3874
3872
|
muteSelf(): Promise<void>;
|
|
@@ -3891,8 +3889,6 @@ declare class MediaNodeClient {
|
|
|
3891
3889
|
switchConsumersToLayer(consumerIds: string[], layer: number): Promise<void>;
|
|
3892
3890
|
handleSocketEvents(): Promise<void>;
|
|
3893
3891
|
handleCallstatsEvents(): void;
|
|
3894
|
-
handlePeerCapabilities(peerId: string, capabilities: PeerRtpCapabilitites): void;
|
|
3895
|
-
handlePeerLeaving(peerId: string): void;
|
|
3896
3892
|
}
|
|
3897
3893
|
interface SocketServicePayload {
|
|
3898
3894
|
payload: any;
|
|
@@ -4022,6 +4018,7 @@ interface Modules {
|
|
|
4022
4018
|
};
|
|
4023
4019
|
devTools?: {
|
|
4024
4020
|
logs: boolean;
|
|
4021
|
+
logLevel?: LogLevel[number];
|
|
4025
4022
|
plugins?: {
|
|
4026
4023
|
id: string;
|
|
4027
4024
|
name: string;
|
|
@@ -4074,6 +4071,7 @@ declare const ERROR_CODES: {
|
|
|
4074
4071
|
'0011': string;
|
|
4075
4072
|
'0012': string;
|
|
4076
4073
|
'0013': string;
|
|
4074
|
+
'0014': string;
|
|
4077
4075
|
'0100': string;
|
|
4078
4076
|
'0101': string;
|
|
4079
4077
|
'0102': string;
|
|
@@ -4276,6 +4274,10 @@ declare class AudioPlaybackManager extends AudioPlayback {
|
|
|
4276
4274
|
addParticipantTrack(participantId: string, track: MediaStreamTrack): void;
|
|
4277
4275
|
removeParticipantTrack(participantId: string): void;
|
|
4278
4276
|
}
|
|
4277
|
+
declare const ENVIRONMENTS: {
|
|
4278
|
+
readonly STAGING: "staging";
|
|
4279
|
+
readonly PROD: "prod";
|
|
4280
|
+
};
|
|
4279
4281
|
type ContextState = {
|
|
4280
4282
|
authToken?: string;
|
|
4281
4283
|
peerId?: string;
|
|
@@ -4298,14 +4300,13 @@ type ContextState = {
|
|
|
4298
4300
|
pip?: Pip;
|
|
4299
4301
|
roomNodeClient?: MediaNodeClient;
|
|
4300
4302
|
viewType?: ViewType;
|
|
4301
|
-
env?:
|
|
4303
|
+
env?: typeof ENVIRONMENTS[keyof typeof ENVIRONMENTS];
|
|
4302
4304
|
sdkVersion?: string;
|
|
4303
4305
|
sdkName?: 'web-core';
|
|
4304
4306
|
callstats?: InhouseCallStats;
|
|
4305
4307
|
connectionHandler?: ConnectionHandler;
|
|
4306
4308
|
cachedUserDetails?: CachedUserDetails;
|
|
4307
4309
|
peerSessionStore?: TypedEventEmitter<SessionEventsType>;
|
|
4308
|
-
flagsmith?: ReturnType<typeof createNewFlagsmithInstance>;
|
|
4309
4310
|
roomSocketHandler?: RoomSocketHandler;
|
|
4310
4311
|
connectedMeetingsSocketHandler?: ConnectedMeetingsSocketHandler;
|
|
4311
4312
|
audioPlayback?: AudioPlaybackManager;
|
|
@@ -4788,6 +4789,15 @@ type LogData$2 = {
|
|
|
4788
4789
|
execTime?: number;
|
|
4789
4790
|
};
|
|
4790
4791
|
};
|
|
4792
|
+
type LogLevel = readonly [
|
|
4793
|
+
'off',
|
|
4794
|
+
'all',
|
|
4795
|
+
'debug',
|
|
4796
|
+
'log',
|
|
4797
|
+
'info',
|
|
4798
|
+
'warn',
|
|
4799
|
+
'error'
|
|
4800
|
+
];
|
|
4791
4801
|
type EventSeverities = SupportedEventSeverities;
|
|
4792
4802
|
type LogData$1 = LogData$2;
|
|
4793
4803
|
interface MeetingMetadata {
|
|
@@ -4809,12 +4819,13 @@ declare class Telemetry {
|
|
|
4809
4819
|
readonly logsEndpoint: string;
|
|
4810
4820
|
tracingEnabled: boolean;
|
|
4811
4821
|
initialized: boolean;
|
|
4822
|
+
logLevel: LogLevel[number];
|
|
4812
4823
|
readonly logsProcessingInterval = 7000;
|
|
4813
4824
|
private readonly logsBatchSize: any;
|
|
4814
4825
|
logExclusionList: string[];
|
|
4815
4826
|
meetingMetadata: MeetingMetadata;
|
|
4816
4827
|
resetPeerId(peerId: string): void;
|
|
4817
|
-
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean): void;
|
|
4828
|
+
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean, logLevel: LogLevel[number]): void;
|
|
4818
4829
|
static trace(spanName: string, metadata?: LogData$1 | undefined): (_target: Object, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
4819
4830
|
injectContext(injectionReceiver: any): void;
|
|
4820
4831
|
addLogInCurrentSpan(eventSeverity: EventSeverities, eventName: string, metadata?: LogData$1, noCache?: boolean): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/realtimekit",
|
|
3
|
-
"version": "1.5.0-staging.
|
|
3
|
+
"version": "1.5.0-staging.10",
|
|
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",
|