@cloudflare/realtimekit 1.5.0-staging.1 → 1.5.0-staging.3
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 +23 -16
- package/dist/EncryptionManager.es.js +189 -189
- package/dist/browser.js +13 -15
- package/dist/dependencies.txt +1 -1
- package/dist/index.cjs.js +10 -12
- package/dist/index.d.ts +23 -16
- package/dist/index.es.js +7325 -7632
- package/dist/index.es5.js +7597 -7975
- package/dist/index.rn.js +10 -12
- package/dist/ts3.4/dist/EncryptionManager.d.ts +29 -19
- package/dist/ts3.4/dist/index.d.ts +29 -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;
|
|
@@ -4100,11 +4103,6 @@ interface MediaPermissions {
|
|
|
4100
4103
|
canProduceVideo?: MediaProductionPermissionType;
|
|
4101
4104
|
canProduceScreenshare?: MediaProductionPermissionType;
|
|
4102
4105
|
}
|
|
4103
|
-
declare const videoCodecPriority: readonly [
|
|
4104
|
-
"video/VP9",
|
|
4105
|
-
"video/VP8"
|
|
4106
|
-
];
|
|
4107
|
-
type VideoCodec = (typeof videoCodecPriority)[number];
|
|
4108
4106
|
interface MediaNodeClientOptions {
|
|
4109
4107
|
peerId: string;
|
|
4110
4108
|
socket: SocketService;
|
|
@@ -4134,7 +4132,7 @@ declare class MediaNodeClient {
|
|
|
4134
4132
|
originalSettings?: {
|
|
4135
4133
|
width: number;
|
|
4136
4134
|
};
|
|
4137
|
-
}
|
|
4135
|
+
}): Promise<MediaStreamTrack>;
|
|
4138
4136
|
shareWebcam(videoTrack: MediaStreamTrack): Promise<MediaStreamTrack | null>;
|
|
4139
4137
|
shareScreen(tracks: {
|
|
4140
4138
|
video?: MediaStreamTrack;
|
|
@@ -4145,7 +4143,7 @@ declare class MediaNodeClient {
|
|
|
4145
4143
|
pauseWebcam(): Promise<void>;
|
|
4146
4144
|
resumeMic(): Promise<void>;
|
|
4147
4145
|
resumeWebcam(producerType?: PRODUCERS_TYPE): Promise<void>;
|
|
4148
|
-
disableWebcam(
|
|
4146
|
+
disableWebcam(): Promise<void>;
|
|
4149
4147
|
disableMic(): Promise<void>;
|
|
4150
4148
|
disableScreenShare(): Promise<void>;
|
|
4151
4149
|
muteSelf(): Promise<void>;
|
|
@@ -4168,8 +4166,6 @@ declare class MediaNodeClient {
|
|
|
4168
4166
|
switchConsumersToLayer(consumerIds: string[], layer: number): Promise<void>;
|
|
4169
4167
|
handleSocketEvents(): Promise<void>;
|
|
4170
4168
|
handleCallstatsEvents(): void;
|
|
4171
|
-
handlePeerCapabilities(peerId: string, capabilities: PeerRtpCapabilitites): void;
|
|
4172
|
-
handlePeerLeaving(peerId: string): void;
|
|
4173
4169
|
}
|
|
4174
4170
|
interface Modules {
|
|
4175
4171
|
pip?: boolean;
|
|
@@ -4190,6 +4186,7 @@ interface Modules {
|
|
|
4190
4186
|
};
|
|
4191
4187
|
devTools?: {
|
|
4192
4188
|
logs: boolean;
|
|
4189
|
+
logLevel?: LogLevel[number];
|
|
4193
4190
|
plugins?: {
|
|
4194
4191
|
id: string;
|
|
4195
4192
|
name: string;
|
|
@@ -4335,6 +4332,10 @@ type TypedEvents = {
|
|
|
4335
4332
|
};
|
|
4336
4333
|
type UntypedEvents = Pick<AllEvents, Exclude<keyof AllEvents, keyof TypedEvents>>;
|
|
4337
4334
|
type SessionEventsType = TypedEvents & UntypedEvents;
|
|
4335
|
+
declare const ENVIRONMENTS: {
|
|
4336
|
+
readonly STAGING: "staging";
|
|
4337
|
+
readonly PROD: "prod";
|
|
4338
|
+
};
|
|
4338
4339
|
type ContextState = {
|
|
4339
4340
|
authToken?: string;
|
|
4340
4341
|
peerId?: string;
|
|
@@ -4357,14 +4358,13 @@ type ContextState = {
|
|
|
4357
4358
|
pip?: Pip;
|
|
4358
4359
|
roomNodeClient?: MediaNodeClient;
|
|
4359
4360
|
viewType?: ViewType;
|
|
4360
|
-
env?:
|
|
4361
|
+
env?: typeof ENVIRONMENTS[keyof typeof ENVIRONMENTS];
|
|
4361
4362
|
sdkVersion?: string;
|
|
4362
4363
|
sdkName?: 'web-core';
|
|
4363
4364
|
callstats?: InhouseCallStats;
|
|
4364
4365
|
connectionHandler?: ConnectionHandler;
|
|
4365
4366
|
cachedUserDetails?: CachedUserDetails;
|
|
4366
4367
|
peerSessionStore?: TypedEventEmitter$1<SessionEventsType>;
|
|
4367
|
-
flagsmith?: ReturnType<typeof createNewFlagsmithInstance>;
|
|
4368
4368
|
roomSocketHandler?: RoomSocketHandler;
|
|
4369
4369
|
connectedMeetingsSocketHandler?: ConnectedMeetingsSocketHandler;
|
|
4370
4370
|
audioPlayback?: AudioPlaybackManager;
|
|
@@ -4847,6 +4847,15 @@ type LogData$2 = {
|
|
|
4847
4847
|
execTime?: number;
|
|
4848
4848
|
};
|
|
4849
4849
|
};
|
|
4850
|
+
type LogLevel = readonly [
|
|
4851
|
+
'off',
|
|
4852
|
+
'all',
|
|
4853
|
+
'debug',
|
|
4854
|
+
'log',
|
|
4855
|
+
'info',
|
|
4856
|
+
'warn',
|
|
4857
|
+
'error'
|
|
4858
|
+
];
|
|
4850
4859
|
type EventSeverities = SupportedEventSeverities;
|
|
4851
4860
|
type LogData$1 = LogData$2;
|
|
4852
4861
|
interface MeetingMetadata {
|
|
@@ -4868,12 +4877,13 @@ declare class Telemetry {
|
|
|
4868
4877
|
readonly logsEndpoint: string;
|
|
4869
4878
|
tracingEnabled: boolean;
|
|
4870
4879
|
initialized: boolean;
|
|
4880
|
+
logLevel: LogLevel[number];
|
|
4871
4881
|
readonly logsProcessingInterval = 7000;
|
|
4872
4882
|
private readonly logsBatchSize: any;
|
|
4873
4883
|
logExclusionList: string[];
|
|
4874
4884
|
meetingMetadata: MeetingMetadata;
|
|
4875
4885
|
resetPeerId(peerId: string): void;
|
|
4876
|
-
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean): void;
|
|
4886
|
+
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean, logLevel: LogLevel[number]): void;
|
|
4877
4887
|
static trace(spanName: string, metadata?: LogData$1 | undefined): (_target: Object, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
4878
4888
|
injectContext(injectionReceiver: any): void;
|
|
4879
4889
|
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;
|
|
@@ -4276,6 +4273,10 @@ declare class AudioPlaybackManager extends AudioPlayback {
|
|
|
4276
4273
|
addParticipantTrack(participantId: string, track: MediaStreamTrack): void;
|
|
4277
4274
|
removeParticipantTrack(participantId: string): void;
|
|
4278
4275
|
}
|
|
4276
|
+
declare const ENVIRONMENTS: {
|
|
4277
|
+
readonly STAGING: "staging";
|
|
4278
|
+
readonly PROD: "prod";
|
|
4279
|
+
};
|
|
4279
4280
|
type ContextState = {
|
|
4280
4281
|
authToken?: string;
|
|
4281
4282
|
peerId?: string;
|
|
@@ -4298,14 +4299,13 @@ type ContextState = {
|
|
|
4298
4299
|
pip?: Pip;
|
|
4299
4300
|
roomNodeClient?: MediaNodeClient;
|
|
4300
4301
|
viewType?: ViewType;
|
|
4301
|
-
env?:
|
|
4302
|
+
env?: typeof ENVIRONMENTS[keyof typeof ENVIRONMENTS];
|
|
4302
4303
|
sdkVersion?: string;
|
|
4303
4304
|
sdkName?: 'web-core';
|
|
4304
4305
|
callstats?: InhouseCallStats;
|
|
4305
4306
|
connectionHandler?: ConnectionHandler;
|
|
4306
4307
|
cachedUserDetails?: CachedUserDetails;
|
|
4307
4308
|
peerSessionStore?: TypedEventEmitter<SessionEventsType>;
|
|
4308
|
-
flagsmith?: ReturnType<typeof createNewFlagsmithInstance>;
|
|
4309
4309
|
roomSocketHandler?: RoomSocketHandler;
|
|
4310
4310
|
connectedMeetingsSocketHandler?: ConnectedMeetingsSocketHandler;
|
|
4311
4311
|
audioPlayback?: AudioPlaybackManager;
|
|
@@ -4788,6 +4788,15 @@ type LogData$2 = {
|
|
|
4788
4788
|
execTime?: number;
|
|
4789
4789
|
};
|
|
4790
4790
|
};
|
|
4791
|
+
type LogLevel = readonly [
|
|
4792
|
+
'off',
|
|
4793
|
+
'all',
|
|
4794
|
+
'debug',
|
|
4795
|
+
'log',
|
|
4796
|
+
'info',
|
|
4797
|
+
'warn',
|
|
4798
|
+
'error'
|
|
4799
|
+
];
|
|
4791
4800
|
type EventSeverities = SupportedEventSeverities;
|
|
4792
4801
|
type LogData$1 = LogData$2;
|
|
4793
4802
|
interface MeetingMetadata {
|
|
@@ -4809,12 +4818,13 @@ declare class Telemetry {
|
|
|
4809
4818
|
readonly logsEndpoint: string;
|
|
4810
4819
|
tracingEnabled: boolean;
|
|
4811
4820
|
initialized: boolean;
|
|
4821
|
+
logLevel: LogLevel[number];
|
|
4812
4822
|
readonly logsProcessingInterval = 7000;
|
|
4813
4823
|
private readonly logsBatchSize: any;
|
|
4814
4824
|
logExclusionList: string[];
|
|
4815
4825
|
meetingMetadata: MeetingMetadata;
|
|
4816
4826
|
resetPeerId(peerId: string): void;
|
|
4817
|
-
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean): void;
|
|
4827
|
+
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean, logLevel: LogLevel[number]): void;
|
|
4818
4828
|
static trace(spanName: string, metadata?: LogData$1 | undefined): (_target: Object, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
4819
4829
|
injectContext(injectionReceiver: any): void;
|
|
4820
4830
|
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.3",
|
|
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",
|