@cloudflare/realtimekit 1.2.0-staging.19 → 1.2.0-staging.20
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/build-types.sh +40 -0
- package/.config/vite.e2ee.es.ts +28 -0
- package/.config/vite.mock.es.ts +25 -3
- package/LICENSE.txt +201 -1
- package/README.md +1 -2
- package/dist/ClientMock.cjs.js +6 -0
- package/dist/ClientMock.d.ts +13 -0
- package/dist/{mock.es.js → ClientMock.es.js} +924 -2486
- package/dist/EncryptionManager.cjs.js +1 -0
- package/dist/EncryptionManager.d.ts +6050 -0
- package/dist/EncryptionManager.es.js +669 -0
- package/dist/dependencies.txt +772 -0
- package/dist/index.cjs.js +13 -21
- package/dist/index.d.ts +1576 -1451
- package/dist/index.es.js +7388 -9460
- package/dist/index.es5.js +29911 -0
- package/dist/index.iife.js +23 -0
- package/dist/index.rn.js +14 -21
- package/dist/ts3.4/dist/ClientMock.d.ts +11 -0
- package/dist/ts3.4/dist/EncryptionManager.d.ts +5994 -0
- package/dist/ts3.4/dist/index.d.ts +2269 -2145
- package/package.json +44 -8
- package/.config/rewrite-types.mjs +0 -30
- package/build-types.sh +0 -21
- package/dist/browser.js +0 -22
- package/dist/mock.cjs.js +0 -7
- package/dist/mock.d.ts +0 -1
- package/dist/ts3.4/dist/mock.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as _dyteinternals_utils from '@dyteinternals/utils';
|
|
3
|
-
import { MediaVideoQualityType, ViewType, LivestreamViewerMediaQualityType,
|
|
3
|
+
import { PresetTypeV2, MediaVideoQualityType, ViewType, MediaScreenShareQualityType, LivestreamViewerMediaQualityType, PluginAccessControls, WaitingRoomTypes, MediaProductionPermissionType, RecorderType as RecorderType$1, BorderRadius, BorderWidth, Theme, createNewFlagsmithInstance } from '@dyteinternals/utils';
|
|
4
4
|
import { MessageType as MessageType$1 } from '@protobuf-ts/runtime';
|
|
5
5
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
6
6
|
import * as WorkerTimers from 'worker-timers';
|
|
@@ -2237,7 +2237,7 @@ interface InhouseCallStatsInitializeParams {
|
|
|
2237
2237
|
iceServers: any[];
|
|
2238
2238
|
apiBase?: string;
|
|
2239
2239
|
flags: Record<string, Record<'enabled' | 'value', any>>;
|
|
2240
|
-
logger?:
|
|
2240
|
+
logger?: DyteLogger;
|
|
2241
2241
|
apiHostnames: ApiHostnames;
|
|
2242
2242
|
skipConnectivityChecks: boolean;
|
|
2243
2243
|
}
|
|
@@ -2248,7 +2248,7 @@ interface InhouseCallStatsInitializeParams {
|
|
|
2248
2248
|
declare type LogData$3 = {
|
|
2249
2249
|
[key: string]: string | number | boolean | null | undefined | LogData$3;
|
|
2250
2250
|
};
|
|
2251
|
-
declare interface
|
|
2251
|
+
declare interface DyteLogger {
|
|
2252
2252
|
info(humanReadableLogIdentifier: string, logData?: LogData$3, isCrucial?: boolean): void;
|
|
2253
2253
|
error(humanReadableLogIdentifier: string, logData?: LogData$3, isCrucial?: boolean): void;
|
|
2254
2254
|
debug(humanReadableLogIdentifier: string, logData?: LogData$3, isCrucial?: boolean): void;
|
|
@@ -2551,11 +2551,16 @@ interface IVSPlayerLiveLatencyEntry extends EventEntryBase {
|
|
|
2551
2551
|
type EventEntry = CallJoinBeginEntry | NetworkQualityTestBeginEntry | NetworkQualityTestEndEntry | BrowserForegroundedEntry | PingStatsEntry | PreCallTestBeginEntry | PreCallTestCompletedEntry | WebSocketConnectedEntry | TransportConnectedEntry | AudioToggleEntry | VideoToggleEntry | ScreenShareToggleEntry | DisconnectEntry | ReconnectEntry | ParticipantRoleToggleEntry | DominantSpeakerEntry | DevicesEntry | SelectedDeviceEntry | MediaPermissionEntry | MediaPlaybackFailureEntry | MediaTrackFailureEntry | ScreenShareRequestedEntry | ExpectedVideoResolutionEntry | ExpectedScreenshareResolutionEntry | TabChangeEntry | BrowserBackgroundedEntry | LegacySwitchEntry | IVSPlayerRebufferingEntry | IVSPlayerAudioBlockedEntry | IVSPlayerPlaybackBlockedEntry | IVSPlayerNetworkUnavailableEntry | IVSPlayerInitializedEntry | IVSPlayerErrorEntry | IVSPlayerRecoverableErrorEntry | IVSPlayerAnalyticsEventEntry | IVSPlayerLiveLatencyEntry | IVSPlayerPlaybackRateChangedEntry | IVSPlayerQualityChangedEntry | IVSPlayerWorkerErrorEntry;
|
|
2552
2552
|
|
|
2553
2553
|
declare class EventHandler extends EventEmitter {
|
|
2554
|
+
private logger;
|
|
2555
|
+
private peerId;
|
|
2556
|
+
private eventStore;
|
|
2557
|
+
private apiEndpoint;
|
|
2554
2558
|
constructor({ logger, peerId, apiHostnames, }: {
|
|
2555
|
-
logger:
|
|
2559
|
+
logger: DyteLogger;
|
|
2556
2560
|
peerId: string;
|
|
2557
2561
|
apiHostnames: ApiHostnames;
|
|
2558
2562
|
});
|
|
2563
|
+
private sendEventsChunkToServer;
|
|
2559
2564
|
callEvent(entry: EventEntry): void;
|
|
2560
2565
|
flush(): Promise<boolean>;
|
|
2561
2566
|
}
|
|
@@ -2657,11 +2662,19 @@ declare abstract class Measurements extends EventEmitter {
|
|
|
2657
2662
|
generateConsumerStreamMap(consumer: any, parse?: boolean): Promise<ConsumerStatistics>;
|
|
2658
2663
|
deregisterProducer(producer: any): void;
|
|
2659
2664
|
deregisterConsumer(consumer: any): void;
|
|
2665
|
+
protected getIceCandidateStats(stats: any): IceCandidateStats;
|
|
2660
2666
|
getWorkingSimulcastVideoStats(videoStatsList: OutboundVideoStreamStats[]): OutboundVideoStreamStats;
|
|
2667
|
+
protected parseRTCReport(report: RTCStatsReport, filters?: string[], onceOnly?: boolean, ownerId?: string, transportInfo?: {
|
|
2668
|
+
id: string;
|
|
2669
|
+
producing: boolean;
|
|
2670
|
+
consuming: boolean;
|
|
2671
|
+
}): ParsedRTCStats;
|
|
2661
2672
|
getProducersReport(producers: any[]): Promise<ProducerStatistics[]>;
|
|
2662
2673
|
getConsumersReport(consumers: any[]): Promise<ConsumerStatistics[]>;
|
|
2663
2674
|
getTransportReport(transport: any): Promise<any>;
|
|
2664
2675
|
getProcessedStats(transport: any, consuming: boolean, producing: boolean): Promise<ProcessedStatsReport>;
|
|
2676
|
+
protected getProducerStatsFromReport(report: ParsedRTCStats): ProducerStatistics[];
|
|
2677
|
+
protected getConsumerStatsFromReport(report: ParsedRTCStats): ConsumerStatistics[];
|
|
2665
2678
|
getUserLocation(): Promise<GeoLocation>;
|
|
2666
2679
|
getConnectivity(iceServers: IceServerInfo[]): Promise<{
|
|
2667
2680
|
host: boolean;
|
|
@@ -2677,8 +2690,15 @@ declare abstract class Measurements extends EventEmitter {
|
|
|
2677
2690
|
declare class CallStats extends EventEmitter {
|
|
2678
2691
|
observer: EventEmitter;
|
|
2679
2692
|
eventHandler: EventHandler;
|
|
2693
|
+
protected measurements: Measurements;
|
|
2694
|
+
protected producingTransport: any;
|
|
2695
|
+
protected consumingTransport: any;
|
|
2680
2696
|
producers: Map<string, any>;
|
|
2681
|
-
|
|
2697
|
+
protected consumers: Map<string, any>;
|
|
2698
|
+
protected iceServers: IceServerInfo[];
|
|
2699
|
+
protected connectionInfoPromise: Promise<NetworkInformation | NetworkInformationWithoutConnectivityData>;
|
|
2700
|
+
protected pingStatsTimeout: NodeJS.Timeout;
|
|
2701
|
+
logger: DyteLogger;
|
|
2682
2702
|
env: ClientEnvTypeAll;
|
|
2683
2703
|
apiHostnames: ApiHostnames;
|
|
2684
2704
|
peerId: string;
|
|
@@ -2692,8 +2712,10 @@ declare class CallStats extends EventEmitter {
|
|
|
2692
2712
|
video?: boolean;
|
|
2693
2713
|
screen?: boolean;
|
|
2694
2714
|
};
|
|
2695
|
-
constructor(backendUrl: string, engineName: string, env: ClientEnvTypeAll, flags: InhouseCallStatsInitializeParams['flags'], logger:
|
|
2715
|
+
constructor(backendUrl: string, engineName: string, env: ClientEnvTypeAll, flags: InhouseCallStatsInitializeParams['flags'], logger: DyteLogger, peerId: string, apiHostnames: ApiHostnames);
|
|
2696
2716
|
registerIceServers(servers: IceServerInfo[]): void;
|
|
2717
|
+
protected registerConsumer(consumer: any): void;
|
|
2718
|
+
protected registerProducer(producer: any): void;
|
|
2697
2719
|
sendConsumerSharedMediaStateEvent(consumerId: string, statusObj: {
|
|
2698
2720
|
audio?: boolean;
|
|
2699
2721
|
video?: boolean;
|
|
@@ -2701,8 +2723,11 @@ declare class CallStats extends EventEmitter {
|
|
|
2701
2723
|
}): void;
|
|
2702
2724
|
registerProducingTransport(transport: any): void;
|
|
2703
2725
|
registerConsumingTransport(transport: any): void;
|
|
2726
|
+
protected deRegisterConsumer(consumer: any): void;
|
|
2727
|
+
protected deRegisterProducer(producer: any): void;
|
|
2704
2728
|
disconnectConsumingTransport(): void;
|
|
2705
2729
|
disconnectProducingTransport(): void;
|
|
2730
|
+
protected callEvent(entry: EventEntry): void;
|
|
2706
2731
|
sendPreCallTestBeginEvent(skipConnectivityChecks: boolean, timestamp: Date): void;
|
|
2707
2732
|
sendScreenShareToggleEvent(on: boolean, ssrc: number, timestamp: Date): void;
|
|
2708
2733
|
sendScreenShareRequestedEvent(timestamp: Date): void;
|
|
@@ -2753,7 +2778,7 @@ declare class InhouseCallStats extends EventEmitter {
|
|
|
2753
2778
|
initialized: boolean;
|
|
2754
2779
|
stalled: boolean;
|
|
2755
2780
|
ipInformation: Object;
|
|
2756
|
-
logger:
|
|
2781
|
+
logger: DyteLogger;
|
|
2757
2782
|
initialize({ peerId, engineName, env, iceServers, apiBase, flags, logger, apiHostnames, skipConnectivityChecks, }: InhouseCallStatsInitializeParams): Promise<void>;
|
|
2758
2783
|
configureSendTransport(sendTransport: any): void;
|
|
2759
2784
|
configureRecvTransport(recvTransport: any): void;
|
|
@@ -2792,6 +2817,7 @@ declare class InhouseCallStats extends EventEmitter {
|
|
|
2792
2817
|
onReceivingConsumingTransportStatus(fx: any): void;
|
|
2793
2818
|
onProducerScore(fx: any): void;
|
|
2794
2819
|
onConsumerScore(fx: any): void;
|
|
2820
|
+
private onSafeInitialization;
|
|
2795
2821
|
removeInitializationListener(fx: Function): void;
|
|
2796
2822
|
stallCallStats(): void;
|
|
2797
2823
|
ivsPlayerEvent(type: String, payload: any): void;
|
|
@@ -2800,6 +2826,64 @@ declare class InhouseCallStats extends EventEmitter {
|
|
|
2800
2826
|
expectedScreenshareResolution(frameWidth: number, frameHeight: number): void;
|
|
2801
2827
|
}
|
|
2802
2828
|
|
|
2829
|
+
type SocketServiceCapability = keyof typeof Capabilities;
|
|
2830
|
+
type SocketStateEvent = 'connected' | 'disconnected' | 'reconnected' | 'errored' | 'reconnecting' | 'reconnectAttempt' | 'reconnectFailure' | 'failed';
|
|
2831
|
+
type SocketServiceCapabilities = SocketServiceCapability[];
|
|
2832
|
+
interface SocketConnectionState {
|
|
2833
|
+
state: Extract<SocketStateEvent, 'connected' | 'disconnected' | 'reconnecting' | 'failed'>;
|
|
2834
|
+
reconnected: boolean;
|
|
2835
|
+
reconnectionAttempt: number;
|
|
2836
|
+
}
|
|
2837
|
+
declare class SocketService {
|
|
2838
|
+
readonly roomName: string;
|
|
2839
|
+
readonly authToken: string;
|
|
2840
|
+
readonly capabilities: SocketServiceCapabilities;
|
|
2841
|
+
get joinAttempted(): boolean;
|
|
2842
|
+
set joinAttempted(value: boolean);
|
|
2843
|
+
get telemetry(): Telemetry;
|
|
2844
|
+
get logger(): Logger;
|
|
2845
|
+
get peerId(): string;
|
|
2846
|
+
constructor(context: Context<ContextState>, { peerId, meetingId, authToken, capabilities, }: {
|
|
2847
|
+
peerId: string;
|
|
2848
|
+
meetingId: string;
|
|
2849
|
+
authToken: string;
|
|
2850
|
+
capabilities: SocketServiceCapabilities;
|
|
2851
|
+
});
|
|
2852
|
+
updateURL(peerID: string): void;
|
|
2853
|
+
private static getSocketEdgeDomain;
|
|
2854
|
+
get url(): string;
|
|
2855
|
+
connect(): Promise<void>;
|
|
2856
|
+
disconnect(): void;
|
|
2857
|
+
get isConnected(): boolean;
|
|
2858
|
+
sendMessage(event: number, protobuf?: Uint8Array, messageId?: string): boolean;
|
|
2859
|
+
sendMessagePromise(event: number, protobuf?: Uint8Array, messageId?: string, resp?: number): Promise<{
|
|
2860
|
+
id: string;
|
|
2861
|
+
payload: Uint8Array;
|
|
2862
|
+
}>;
|
|
2863
|
+
sendMessagePromiseWithTimeout({ event, timeout, protobuf, messageId, resp, }: {
|
|
2864
|
+
timeout: number;
|
|
2865
|
+
event: number;
|
|
2866
|
+
protobuf?: Uint8Array;
|
|
2867
|
+
messageId?: string;
|
|
2868
|
+
resp?: number;
|
|
2869
|
+
}): Promise<{
|
|
2870
|
+
id: string;
|
|
2871
|
+
payload: Uint8Array;
|
|
2872
|
+
}>;
|
|
2873
|
+
on(event: number, listener: (message: {
|
|
2874
|
+
id?: string;
|
|
2875
|
+
payload?: Uint8Array;
|
|
2876
|
+
}) => void): void;
|
|
2877
|
+
onStateEvent(event: SocketStateEvent, listener: (...args: any) => void): void;
|
|
2878
|
+
removeListener(event: number, listener: (message: {
|
|
2879
|
+
id?: string;
|
|
2880
|
+
payload?: Uint8Array;
|
|
2881
|
+
}) => void): void;
|
|
2882
|
+
removeListeners(event: number): void;
|
|
2883
|
+
flush(): any;
|
|
2884
|
+
handleSocketConnectionEvents(): void;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2803
2887
|
declare global {
|
|
2804
2888
|
interface SymbolConstructor {
|
|
2805
2889
|
readonly observable: symbol;
|
|
@@ -2832,9 +2916,9 @@ type StringKeysOfFoo = StringKeyOf<Foo>;
|
|
|
2832
2916
|
*/
|
|
2833
2917
|
type StringKeyOf<BaseType> = `${Extract<keyof BaseType, string | number>}`;
|
|
2834
2918
|
|
|
2835
|
-
declare class
|
|
2836
|
-
logger:
|
|
2837
|
-
constructor(logger:
|
|
2919
|
+
declare class CustomEventEmitter<T extends string | symbol> extends EventEmitter$1 {
|
|
2920
|
+
logger: Logger | undefined;
|
|
2921
|
+
constructor(logger: Logger);
|
|
2838
2922
|
emit(event: T, ...args: any[]): boolean;
|
|
2839
2923
|
on(event: T, callback: (...args: any[]) => void): this;
|
|
2840
2924
|
addListener(event: T, callback: (...args: any[]) => any): this;
|
|
@@ -2853,9 +2937,9 @@ type EventMap$1 = {
|
|
|
2853
2937
|
type WildCardEvent<T> = {
|
|
2854
2938
|
['*']: (event: StringKeyOf<T>, ...args: any) => void;
|
|
2855
2939
|
};
|
|
2856
|
-
declare class
|
|
2857
|
-
logger:
|
|
2858
|
-
constructor(logger:
|
|
2940
|
+
declare class TypedEventEmitter$1<Events extends EventMap$1 & WildCardEvent<Events>> extends EventEmitter$1 {
|
|
2941
|
+
logger: Logger | undefined;
|
|
2942
|
+
constructor(logger: Logger);
|
|
2859
2943
|
emit<E extends StringKeyOf<Events>>(event: E, ...args: Parameters<Events[E]>): boolean;
|
|
2860
2944
|
on<E extends StringKeyOf<Events>>(event: E, callback: Events[E]): this;
|
|
2861
2945
|
addListener<E extends StringKeyOf<Events>>(event: E, callback: Events[E]): this;
|
|
@@ -2869,1308 +2953,1234 @@ declare class RTKTypedEventEmitter<Events extends EventMap$1 & WildCardEvent<Eve
|
|
|
2869
2953
|
listenerCount<T extends StringKeyOf<Events>>(event: T): number;
|
|
2870
2954
|
}
|
|
2871
2955
|
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2956
|
+
interface BasicParticipant {
|
|
2957
|
+
userId: string;
|
|
2958
|
+
name?: string;
|
|
2959
|
+
picture?: string;
|
|
2960
|
+
customParticipantId: string;
|
|
2961
|
+
}
|
|
2962
|
+
declare class BasicParticipantsMap extends CustomEventEmitter<'participantsUpdate'> {
|
|
2963
|
+
constructor(logger: Logger);
|
|
2964
|
+
__set(objId: string, obj: BasicParticipant): Map<string, BasicParticipant>;
|
|
2965
|
+
__clear(): void;
|
|
2966
|
+
get(objId: string): BasicParticipant;
|
|
2967
|
+
toArray(): BasicParticipant[];
|
|
2878
2968
|
}
|
|
2879
2969
|
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2970
|
+
type ChatChannelSocketMessage = GetChatChannelResponse;
|
|
2971
|
+
interface ChatChannel {
|
|
2972
|
+
id: string;
|
|
2973
|
+
displayName: string;
|
|
2974
|
+
memberIds: string[];
|
|
2975
|
+
displayPictureUrl?: string;
|
|
2976
|
+
visibility?: string;
|
|
2977
|
+
isDirectMessage?: boolean;
|
|
2978
|
+
latestMessage?: Message;
|
|
2979
|
+
unreadCount: number;
|
|
2884
2980
|
}
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
proprietaryConstraints?: any;
|
|
2891
|
-
onTrackHandler?: (event: RTCTrackEvent) => void;
|
|
2892
|
-
};
|
|
2893
|
-
type CodecOption = {
|
|
2894
|
-
name: string;
|
|
2895
|
-
parameters?: string[];
|
|
2896
|
-
};
|
|
2897
|
-
type HandlerSendOptions = {
|
|
2898
|
-
track: MediaStreamTrack | 'audio' | 'video';
|
|
2899
|
-
screenShare?: boolean;
|
|
2900
|
-
encodings?: RTCRtpEncodingParameters[];
|
|
2901
|
-
codecs?: RTCRtpCodecCapability[];
|
|
2902
|
-
codecOptions?: CodecOption[];
|
|
2903
|
-
};
|
|
2904
|
-
interface HandlerSendResult extends GenericHandlerResult {
|
|
2905
|
-
mid: string;
|
|
2981
|
+
interface UpdateChannelRequestPayload {
|
|
2982
|
+
memberIds?: string[];
|
|
2983
|
+
displayName?: string;
|
|
2984
|
+
displayPictureUrl?: string;
|
|
2985
|
+
visibility?: string;
|
|
2906
2986
|
}
|
|
2907
|
-
declare
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
init({ direction, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, onTrackHandler, }: HandlerRunOptions): void;
|
|
2917
|
-
connect(): Promise<GenericHandlerResult>;
|
|
2918
|
-
getTransportStats(): Promise<RTCStatsReport>;
|
|
2919
|
-
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
2920
|
-
stopSending(localId: string): Promise<GenericHandlerResult>;
|
|
2921
|
-
abstract send(options: HandlerSendOptions): Promise<HandlerSendResult>;
|
|
2922
|
-
replaceTrack(localId: string, track: MediaStreamTrack | null): Promise<void>;
|
|
2923
|
-
setMaxSpatialLayer(localId: string, spatialLayer: number): Promise<void>;
|
|
2924
|
-
setRtpEncodingParameters(localId: string, params: any): Promise<void>;
|
|
2925
|
-
getSenderStats(localId: string): Promise<RTCStatsReport>;
|
|
2926
|
-
_addEventListeners(): void;
|
|
2927
|
-
addCustomEventListeners(): void;
|
|
2987
|
+
declare class ChatChannelSocketHandler {
|
|
2988
|
+
get telemetry(): Telemetry;
|
|
2989
|
+
get logger(): Logger;
|
|
2990
|
+
constructor(context: Context<ContextState>, socketService: SocketService);
|
|
2991
|
+
createChannel(displayName: string, memberIds: string[], displayPictureUrl?: string, visibility?: string, isDirectMessage?: boolean): Promise<ChatChannel>;
|
|
2992
|
+
updateChannel(channelId: string, payload: UpdateChannelRequestPayload): Promise<ChatChannel>;
|
|
2993
|
+
static formatChannel(socketChannel: ChatChannel$1): ChatChannel;
|
|
2994
|
+
getChannelMembers(channelId: string): Promise<BasicParticipant[]>;
|
|
2995
|
+
on(event: number, handler: (socketMessage: ChatChannelSocketMessage) => void): void;
|
|
2928
2996
|
}
|
|
2929
2997
|
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
kind?: 'audio' | 'video';
|
|
2936
|
-
paused?: boolean;
|
|
2937
|
-
appData?: Record<string, unknown>;
|
|
2938
|
-
mimeType?: string;
|
|
2939
|
-
localId: string;
|
|
2940
|
-
handler: HandlerInterface<TransportPromiseEvents>;
|
|
2941
|
-
track?: MediaStreamTrack;
|
|
2942
|
-
rtpReceiver?: RTCRtpReceiver;
|
|
2943
|
-
transceiver: RTCRtpTransceiver;
|
|
2944
|
-
closeTranscieverOnClose?: boolean;
|
|
2945
|
-
};
|
|
2946
|
-
type MediaKind$1 = 'audio' | 'video';
|
|
2947
|
-
declare class Consumer extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
2948
|
-
readonly rtpReceiver: RTCRtpReceiver;
|
|
2949
|
-
readonly id: string;
|
|
2950
|
-
readonly localId: string;
|
|
2951
|
-
readonly producerId: string;
|
|
2952
|
-
readonly producingTransportId: string;
|
|
2953
|
-
readonly mimeType: string;
|
|
2954
|
-
readonly track: MediaStreamTrack;
|
|
2955
|
-
readonly peerId: string;
|
|
2956
|
-
readonly appData: Record<string, unknown>;
|
|
2957
|
-
readonly transceiver: RTCRtpTransceiver;
|
|
2958
|
-
constructor(context: Context<RTKContextState>, opts: ConsumerOptions);
|
|
2959
|
-
get closed(): boolean;
|
|
2960
|
-
get kind(): MediaKind$1;
|
|
2961
|
-
get paused(): boolean;
|
|
2962
|
-
close(reason?: string, closeTranscieverOnClose?: boolean): void;
|
|
2963
|
-
getStats(): Promise<RTCStatsReport>;
|
|
2964
|
-
pause(): void;
|
|
2965
|
-
resume(): void;
|
|
2998
|
+
declare enum ChatMessageType {
|
|
2999
|
+
TEXT = 0,
|
|
3000
|
+
IMAGE = 1,
|
|
3001
|
+
FILE = 2,
|
|
3002
|
+
CUSTOM = 3
|
|
2966
3003
|
}
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
type TransportPromiseEvents = {
|
|
2974
|
-
'close': {
|
|
2975
|
-
answer: RTCSessionDescriptionInit;
|
|
2976
|
-
};
|
|
2977
|
-
'negotiate': {
|
|
2978
|
-
description: RTCSessionDescriptionInit;
|
|
2979
|
-
};
|
|
2980
|
-
};
|
|
2981
|
-
|
|
2982
|
-
type MediaKind = 'audio' | 'video';
|
|
2983
|
-
type ProducerConstructorOptions = {
|
|
2984
|
-
id: string;
|
|
2985
|
-
localId: string;
|
|
2986
|
-
track?: MediaStreamTrack;
|
|
2987
|
-
stopTracks: boolean;
|
|
2988
|
-
disableTrackOnPause: boolean;
|
|
2989
|
-
zeroRtpOnPause: boolean;
|
|
2990
|
-
handler: HandlerInterface<TransportPromiseEvents>;
|
|
2991
|
-
appData?: Record<string, unknown>;
|
|
2992
|
-
rtpSender?: RTCRtpSender;
|
|
2993
|
-
};
|
|
2994
|
-
declare class Producer extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
2995
|
-
readonly id: string;
|
|
2996
|
-
readonly localId: string;
|
|
2997
|
-
readonly kind: MediaKind;
|
|
2998
|
-
readonly appData: Record<string, unknown>;
|
|
2999
|
-
readonly rtpSender: RTCRtpSender;
|
|
3000
|
-
constructor(context: Context<RTKContextState>, opt: ProducerConstructorOptions);
|
|
3001
|
-
get closed(): boolean;
|
|
3002
|
-
get track(): MediaStreamTrack | null;
|
|
3003
|
-
get paused(): boolean;
|
|
3004
|
-
get maxSpatialLayer(): number | undefined;
|
|
3005
|
-
close(reason?: string): Promise<void>;
|
|
3006
|
-
getStats(): Promise<RTCStatsReport>;
|
|
3007
|
-
pause(): void;
|
|
3008
|
-
resume(): void;
|
|
3009
|
-
replaceTrack({ track, }: {
|
|
3010
|
-
track: MediaStreamTrack | null;
|
|
3011
|
-
}): Promise<void>;
|
|
3012
|
-
setMaxSpatialLayer(spatialLayer: number): Promise<void>;
|
|
3013
|
-
setRtpEncodingParameters(params: RTCRtpEncodingParameters): Promise<void>;
|
|
3004
|
+
type ChatSocketMessage = SendChatMessageToRoomResponse | SendChatMessageToPeersResponse | EditChatMessageResponse | DeleteChatMessageResponse;
|
|
3005
|
+
interface SearchFilters {
|
|
3006
|
+
channelId?: string;
|
|
3007
|
+
timestamp?: number;
|
|
3008
|
+
size?: number;
|
|
3009
|
+
reversed?: boolean;
|
|
3014
3010
|
}
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
constructor(socketService: SocketService);
|
|
3019
|
-
|
|
3020
|
-
requestAccess(): void;
|
|
3021
|
-
cancelRequestAccess(): void;
|
|
3022
|
-
grantAccess(userIds: string[]): Promise<void>;
|
|
3023
|
-
denyAccess(userIds: string[]): Promise<void>;
|
|
3024
|
-
joinStage(): Promise<{
|
|
3025
|
-
id: string;
|
|
3026
|
-
payload: Uint8Array;
|
|
3027
|
-
}>;
|
|
3028
|
-
leaveStage(userId: string): Promise<{
|
|
3011
|
+
declare class ChatSocketHandler {
|
|
3012
|
+
get telemetry(): Telemetry;
|
|
3013
|
+
get logger(): Logger;
|
|
3014
|
+
constructor(context: Context<ContextState>, socketService: SocketService);
|
|
3015
|
+
getChatMessages(): Promise<{
|
|
3029
3016
|
id: string;
|
|
3030
3017
|
payload: Uint8Array;
|
|
3031
3018
|
}>;
|
|
3032
|
-
|
|
3019
|
+
getChatMessagesPaginated(timeStamp: number, size: number, reversed: boolean, offset?: number, channelId?: string): Promise<GetPaginatedChatMessageRoomResponse>;
|
|
3020
|
+
sendMessageToRoom(message: string, messageType: ChatMessageType): void;
|
|
3021
|
+
sendMessageToPeers(message: string, messageType: ChatMessageType, peerIds: string[]): void;
|
|
3022
|
+
sendMessageToChannel(message: string, messageType: ChatMessageType, channelId: string): void;
|
|
3023
|
+
sendMessage(message: string, messageType: ChatMessageType, peerIds?: string[], channelId?: string): void;
|
|
3024
|
+
editMessage(chatId: string, message: string, payloadType: ChatMessageType, channelId?: string, pinned?: boolean): Promise<ChatMessage>;
|
|
3025
|
+
deleteMessage(chatId: string, channelId?: string): Promise<{
|
|
3026
|
+
channelId?: string;
|
|
3033
3027
|
id: string;
|
|
3034
|
-
payload: Uint8Array;
|
|
3035
3028
|
}>;
|
|
3036
|
-
|
|
3037
|
-
|
|
3029
|
+
searchMessages(query: string, filters: SearchFilters): Promise<ChatMessage[]>;
|
|
3030
|
+
getAllChannels(): Promise<ChatChannel[]>;
|
|
3031
|
+
markLastReadMessage(channelId: string, message: Message): Promise<string>;
|
|
3032
|
+
setPinState(message: Message, pin: boolean): Promise<PinChatMessageResponse>;
|
|
3033
|
+
on(event: number, handler: (socketMessage: ChatSocketMessage) => void): void;
|
|
3038
3034
|
}
|
|
3039
3035
|
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
peerId: string;
|
|
3036
|
+
declare class SelectedPeers {
|
|
3037
|
+
private readonly _activeSpeakerPeers;
|
|
3038
|
+
private readonly _compulsoryPeers;
|
|
3039
|
+
constructor();
|
|
3040
|
+
add(peerId: string, priority: number, context: Context<ContextState>): number;
|
|
3041
|
+
delete(peerId: string, context: Context<ContextState>): void;
|
|
3042
|
+
index(peerId: string): number;
|
|
3043
|
+
get peers(): string[];
|
|
3044
|
+
get compulsoryPeers(): string[];
|
|
3045
|
+
get activeSpeakerPeers(): string[];
|
|
3046
|
+
private _removeFromCompulsoryPeer;
|
|
3045
3047
|
}
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
['
|
|
3049
|
-
['
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
['
|
|
3053
|
-
['stageRequestRejected']: () => void;
|
|
3048
|
+
|
|
3049
|
+
type PipEvents = {
|
|
3050
|
+
['cameraToggled']: () => void;
|
|
3051
|
+
['micToggled']: () => void;
|
|
3052
|
+
['hangup']: () => void;
|
|
3053
|
+
['pipStarted']: () => void;
|
|
3054
|
+
['pipEnded']: () => void;
|
|
3054
3055
|
['*']: (eventName: string, ...args: any[]) => void;
|
|
3055
3056
|
};
|
|
3056
|
-
declare class
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3057
|
+
declare class Pip extends TypedEventEmitter$1<PipEvents> {
|
|
3058
|
+
private constructor();
|
|
3059
|
+
static _init(context: Context<ContextState>, self: Self): Promise<Pip>;
|
|
3060
|
+
private setupIcon;
|
|
3061
|
+
overrideIcon(icon: 'handRaise' | 'pin', value: string): Promise<void>;
|
|
3062
|
+
private constructImage;
|
|
3063
|
+
private createVideoContainer;
|
|
3064
|
+
private setupEventListeners;
|
|
3065
|
+
private cleanupEventListeners;
|
|
3066
|
+
private enablePipMediaControls;
|
|
3067
|
+
private onSelfVideoUpdateListener;
|
|
3068
|
+
private onSelfAudioUpdateListener;
|
|
3069
|
+
private handlePipMediaControls;
|
|
3070
|
+
private createCanvas;
|
|
3071
|
+
private eventCallback;
|
|
3072
|
+
private setupMediaSessionEvents;
|
|
3073
|
+
private mountAudioEvents;
|
|
3074
|
+
private mountVideoEvents;
|
|
3075
|
+
private unmountEvents;
|
|
3076
|
+
private getSources;
|
|
3077
|
+
private drawEmptyTile;
|
|
3078
|
+
private drawIcons;
|
|
3079
|
+
private drawTile;
|
|
3080
|
+
private calcGridElemSize;
|
|
3081
|
+
private paintCanvas;
|
|
3082
|
+
private animate;
|
|
3083
|
+
isSupported(): boolean;
|
|
3084
|
+
get isActive(): boolean;
|
|
3085
|
+
private cleanup;
|
|
3086
|
+
init({ height, width }?: {
|
|
3087
|
+
height?: number;
|
|
3088
|
+
width?: number;
|
|
3089
|
+
}): void;
|
|
3090
|
+
private updateMediaSession;
|
|
3091
|
+
enableSource(source: string): void;
|
|
3092
|
+
disableSource(source: string): void;
|
|
3093
|
+
private generateAvatar;
|
|
3094
|
+
addSource(id: string, element: HTMLVideoElement, enabled: boolean, pinned?: boolean, displayText?: string, imageUrl?: string, handRaised?: boolean): void;
|
|
3095
|
+
updateSource(id: string, source: any): void;
|
|
3096
|
+
removeSource(id: string): void;
|
|
3097
|
+
removePinnedSource(): void;
|
|
3098
|
+
removeAllSources(): void;
|
|
3099
|
+
enable(): void;
|
|
3100
|
+
disable: (partial?: boolean) => void;
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
declare enum TransportState {
|
|
3104
|
+
NEW = "new",
|
|
3105
|
+
CONNECTING = "connecting",
|
|
3106
|
+
RECONNECTING = "reconnecting",
|
|
3107
|
+
DISCONNECTED = "disconnected",
|
|
3108
|
+
CONNECTED = "connected",
|
|
3109
|
+
FAILED = "failed",
|
|
3110
|
+
CLOSED = "closed"
|
|
3111
|
+
}
|
|
3112
|
+
type MediaConnectionState = {
|
|
3113
|
+
recv: {
|
|
3114
|
+
state: `${TransportState}`;
|
|
3062
3115
|
};
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3116
|
+
send: {
|
|
3117
|
+
state: `${TransportState}`;
|
|
3118
|
+
};
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3121
|
+
type EventHandlerTypes = PeerInfoResponse | GetWaitingRoomRequests | RecordingEvent | UpdatePeersPresetResponse | PeerJoinBroadcastResponse | PeerJoinCompleteResponse | GlobalPeerPinningBroadcastResponse | PeerLeaveResponse | SelectedPeersResponse | SelectedPeersDiffResponse;
|
|
3122
|
+
declare class RoomSocketHandler {
|
|
3123
|
+
socket: SocketService;
|
|
3124
|
+
get telemetry(): Telemetry;
|
|
3125
|
+
get logger(): Logger;
|
|
3126
|
+
cleanup(): void;
|
|
3127
|
+
constructor(context: Context<ContextState>, socketService: SocketService);
|
|
3128
|
+
joinRoom(opts: {
|
|
3129
|
+
name: string;
|
|
3130
|
+
id: string;
|
|
3131
|
+
userId: string;
|
|
3132
|
+
customParticipantId: string;
|
|
3133
|
+
picture?: string;
|
|
3134
|
+
}): Promise<{
|
|
3135
|
+
peer: Peer;
|
|
3136
|
+
}>;
|
|
3137
|
+
getAllAddedParticipants(): Promise<BasicParticipant[]>;
|
|
3138
|
+
getRoomPeers(searchQuery: string, limit: number, offset: number): Promise<RoomPeersInfoResponse>;
|
|
3139
|
+
getRoomPeersNonPaginated(): Promise<RoomPeersInfoResponse>;
|
|
3140
|
+
getStagePeers(): Promise<RoomPeersInfoResponse>;
|
|
3141
|
+
getPeerInfo(peerId: string): Promise<PeerInfoResponse>;
|
|
3142
|
+
getRoomState(): Promise<RoomInfoResponse>;
|
|
3143
|
+
getRoomStageState(): Promise<GetRoomStageStateResponse>;
|
|
3144
|
+
broadcastMessage(type: string, payload: BroadcastMessagePayload): Promise<{
|
|
3145
|
+
id: string;
|
|
3146
|
+
payload: Uint8Array;
|
|
3147
|
+
}>;
|
|
3148
|
+
broadcastToMeetings(type: string, meetingIds: string[], payload: BroadcastMessagePayload): Promise<{
|
|
3149
|
+
id: string;
|
|
3150
|
+
payload: Uint8Array;
|
|
3151
|
+
}>;
|
|
3152
|
+
broadcastToPeers(type: string, peerIds: string[], payload: BroadcastMessagePayload): Promise<boolean>;
|
|
3153
|
+
leaveRoom(): Promise<void>;
|
|
3154
|
+
kick(peerId: string): Promise<void>;
|
|
3155
|
+
kickAll(propagateKickAll?: boolean): Promise<void>;
|
|
3156
|
+
getWaitingRoomRequests(): void;
|
|
3157
|
+
acceptWaitingRoomRequest(userIds: string[]): void;
|
|
3158
|
+
rejectWaitingRoomRequest(userIds: string[]): void;
|
|
3159
|
+
updatePermissions(userIds: string[], patch: PresetUpdates): Promise<{
|
|
3071
3160
|
id: string;
|
|
3072
3161
|
payload: Uint8Array;
|
|
3073
3162
|
}>;
|
|
3163
|
+
private handleSocketEvents;
|
|
3164
|
+
on(event: number, handler: (message: EventHandlerTypes) => void): void;
|
|
3165
|
+
getUserPermissions(userId: string): Promise<Pick<PresetTypeV2['permissions'], 'chat' | 'polls' | 'plugins'>>;
|
|
3074
3166
|
}
|
|
3075
3167
|
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3168
|
+
type TranscriptionData = {
|
|
3169
|
+
id: string;
|
|
3170
|
+
name: string;
|
|
3171
|
+
peerId: string;
|
|
3172
|
+
userId: string;
|
|
3173
|
+
customParticipantId: string;
|
|
3174
|
+
transcript: string;
|
|
3175
|
+
isPartialTranscript: boolean;
|
|
3176
|
+
date: Date;
|
|
3177
|
+
};
|
|
3178
|
+
type AiEvents = {
|
|
3179
|
+
['transcript']: (t: TranscriptionData) => void;
|
|
3180
|
+
['*']: (event: string, ...args: any[]) => void;
|
|
3181
|
+
};
|
|
3182
|
+
declare class Ai extends TypedEventEmitter$1<AiEvents> {
|
|
3183
|
+
transcripts: TranscriptionData[];
|
|
3184
|
+
get telemetry(): Telemetry;
|
|
3185
|
+
constructor(context: Context<ContextState>);
|
|
3186
|
+
static init(context: Context<ContextState>, transcriptionEnabled: boolean): Promise<Ai>;
|
|
3187
|
+
static parseTranscript(transcriptData: string, isPartialTranscript?: boolean): TranscriptionData | undefined;
|
|
3188
|
+
static parseTranscripts(transcriptData: string): TranscriptionData[];
|
|
3189
|
+
getActiveTranscript(): Promise<void>;
|
|
3190
|
+
onTranscript(transcript: TranscriptionData): Promise<void>;
|
|
3079
3191
|
}
|
|
3080
3192
|
|
|
3081
|
-
type
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
video: MediaStreamTrack;
|
|
3099
|
-
};
|
|
3100
|
-
}) => void;
|
|
3101
|
-
['pinned']: (payload: RTKParticipant) => void;
|
|
3102
|
-
['unpinned']: (payload: RTKParticipant) => void;
|
|
3193
|
+
type ActiveTabType = 'screenshare' | 'plugin';
|
|
3194
|
+
interface ActiveTab {
|
|
3195
|
+
type: ActiveTabType;
|
|
3196
|
+
id: string;
|
|
3197
|
+
}
|
|
3198
|
+
declare enum TabChangeSource {
|
|
3199
|
+
User = 0,
|
|
3200
|
+
Meeting = 1
|
|
3201
|
+
}
|
|
3202
|
+
interface MediaConnectionUpdate {
|
|
3203
|
+
transport: 'consuming' | 'producing';
|
|
3204
|
+
state: `${TransportState}`;
|
|
3205
|
+
reconnected: boolean;
|
|
3206
|
+
}
|
|
3207
|
+
type MetaEvents = {
|
|
3208
|
+
['mediaConnectionUpdate']: (payload: MediaConnectionUpdate) => void;
|
|
3209
|
+
['socketConnectionUpdate']: (state: SocketConnectionState) => void;
|
|
3103
3210
|
['poorConnection']: (payload: {
|
|
3104
3211
|
score: number;
|
|
3105
|
-
kind: string;
|
|
3106
|
-
}) => void;
|
|
3107
|
-
['stageStatusUpdate']: (payload: RTKParticipant) => void;
|
|
3108
|
-
['mediaScoreUpdate']: (payload: {
|
|
3109
|
-
kind: MediaKind$1;
|
|
3110
|
-
isScreenshare: boolean;
|
|
3111
|
-
score: number;
|
|
3112
|
-
participantId: string;
|
|
3113
|
-
scoreStats: ConsumerScoreStats;
|
|
3114
|
-
}) => void;
|
|
3115
|
-
['kicked']: () => void;
|
|
3116
|
-
['*']: (event: string, ...args: any[]) => void;
|
|
3117
|
-
};
|
|
3118
|
-
type SelfEvents = {
|
|
3119
|
-
['toggleTile']: (payload: {
|
|
3120
|
-
hidden: boolean;
|
|
3121
|
-
}) => void;
|
|
3122
|
-
['videoUpdate']: (payload: {
|
|
3123
|
-
videoEnabled: boolean;
|
|
3124
|
-
videoTrack: MediaStreamTrack;
|
|
3125
|
-
}) => void;
|
|
3126
|
-
['audioUpdate']: (payload: {
|
|
3127
|
-
audioEnabled: boolean;
|
|
3128
|
-
audioTrack: MediaStreamTrack;
|
|
3129
|
-
}) => void;
|
|
3130
|
-
['screenShareUpdate']: (payload: {
|
|
3131
|
-
screenShareEnabled: boolean;
|
|
3132
|
-
screenShareTracks: {
|
|
3133
|
-
audio?: MediaStreamTrack;
|
|
3134
|
-
video?: MediaStreamTrack;
|
|
3135
|
-
};
|
|
3136
|
-
}) => void;
|
|
3137
|
-
['deviceUpdate']: ({ device }: {
|
|
3138
|
-
device: MediaDeviceInfo;
|
|
3139
|
-
}) => void;
|
|
3140
|
-
['deviceListUpdate']: (changedDevices: {
|
|
3141
|
-
added: MediaDeviceInfo[];
|
|
3142
|
-
removed: MediaDeviceInfo[];
|
|
3143
|
-
devices: MediaDeviceInfo[];
|
|
3144
|
-
}) => void;
|
|
3145
|
-
['pinned']: (payload: RTKSelf) => void;
|
|
3146
|
-
['unpinned']: (payload: RTKSelf) => void;
|
|
3147
|
-
['mediaPermissionUpdate']: (payload: {
|
|
3148
|
-
message: keyof typeof MediaPermission;
|
|
3149
|
-
kind: 'audio' | 'video' | 'screenshare';
|
|
3150
|
-
}) => void;
|
|
3151
|
-
['mediaPermissionError']: (payload: {
|
|
3152
|
-
message: keyof typeof MediaPermission;
|
|
3153
|
-
constraints: any;
|
|
3154
|
-
kind: 'audio' | 'video' | 'screenshare';
|
|
3155
|
-
}) => void;
|
|
3156
|
-
['mediaScoreUpdate']: (payload: {
|
|
3157
|
-
kind: MediaKind$1;
|
|
3158
|
-
isScreenshare: boolean;
|
|
3159
|
-
score: number;
|
|
3160
|
-
participantId: string;
|
|
3161
|
-
scoreStats: ProducerScoreStats;
|
|
3162
|
-
}) => void;
|
|
3163
|
-
['waitlisted']: () => void;
|
|
3164
|
-
['roomLeft']: (payload: {
|
|
3165
|
-
state: LeaveRoomState;
|
|
3166
3212
|
}) => void;
|
|
3167
|
-
['
|
|
3168
|
-
|
|
3213
|
+
['meetingStartTimeUpdate']: (payload: {
|
|
3214
|
+
meetingStartedTimestamp: Date;
|
|
3169
3215
|
}) => void;
|
|
3170
|
-
['
|
|
3216
|
+
['transcript']: (t: TranscriptionData) => void;
|
|
3217
|
+
['activeTabUpdate']: (tab: ActiveTab) => void;
|
|
3218
|
+
['selfTabUpdate']: (tab: ActiveTab) => void;
|
|
3219
|
+
['broadcastTabChangesUpdate']: (broadcastTabChanges: boolean) => void;
|
|
3171
3220
|
['*']: (event: string, ...args: any[]) => void;
|
|
3172
3221
|
};
|
|
3222
|
+
declare class Meta extends TypedEventEmitter$1<MetaEvents> {
|
|
3223
|
+
selfActiveTab: ActiveTab | undefined;
|
|
3224
|
+
get socketState(): SocketConnectionState;
|
|
3225
|
+
get mediaState(): MediaConnectionState;
|
|
3226
|
+
broadcastTabChanges: boolean;
|
|
3227
|
+
viewType: string;
|
|
3228
|
+
meetingStartedTimestamp: Date;
|
|
3229
|
+
meetingTitle: string;
|
|
3230
|
+
sessionId: string;
|
|
3231
|
+
constructor(context: Context<ContextState>, self: Self, viewType: string, roomSocketHandler: RoomSocketHandler, meetingTitle: string);
|
|
3232
|
+
get meetingId(): string;
|
|
3233
|
+
setBroadcastTabChanges(broadcastTabChanges: boolean): void;
|
|
3234
|
+
setSelfActiveTab(spotlightTab: ActiveTab, tabChangeSource: TabChangeSource): void;
|
|
3235
|
+
private assertActiveTabToRoom;
|
|
3236
|
+
}
|
|
3173
3237
|
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
constructor(context: Context<RTKContextState>, mediaConstraints: MediaConstraints, isNonPreferredDevice?: (media: MediaDeviceInfo) => boolean, autoSwitchDevice?: boolean);
|
|
3179
|
-
set context(context: Context<RTKContextState>);
|
|
3180
|
-
repopulateAvailableDevices(): Promise<boolean>;
|
|
3181
|
-
setupStreams({ audio, video, }: {
|
|
3182
|
-
audio: boolean;
|
|
3183
|
-
video: boolean;
|
|
3184
|
-
}): Promise<void>;
|
|
3185
|
-
getCurrentDevices(): {
|
|
3186
|
-
audio: MediaDeviceInfo;
|
|
3187
|
-
video: MediaDeviceInfo;
|
|
3188
|
-
speaker: MediaDeviceInfo;
|
|
3189
|
-
};
|
|
3190
|
-
get permissions(): {
|
|
3191
|
-
audio?: MediaPermission$1;
|
|
3192
|
-
video?: MediaPermission$1;
|
|
3193
|
-
screenshare?: MediaPermission$1;
|
|
3194
|
-
};
|
|
3195
|
-
getAllDevices(): Promise<InputDeviceInfo[]>;
|
|
3196
|
-
getDeviceById(deviceId: string, kind?: 'audioinput' | 'audiooutput' | 'videoinput'): Promise<MediaDeviceInfo>;
|
|
3197
|
-
get rawAudioTrack(): MediaStreamTrack;
|
|
3198
|
-
get audioTrack(): MediaStreamTrack;
|
|
3199
|
-
get audioEnabled(): boolean;
|
|
3200
|
-
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
3201
|
-
disableAudio(): void;
|
|
3202
|
-
getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
3203
|
-
setAudioDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3204
|
-
setupSpeaker(): Promise<void>;
|
|
3205
|
-
setSpeakerDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3206
|
-
get rawVideoTrack(): MediaStreamTrack;
|
|
3207
|
-
get videoTrack(): MediaStreamTrack;
|
|
3208
|
-
get videoEnabled(): boolean;
|
|
3209
|
-
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
3210
|
-
disableVideo(): void;
|
|
3211
|
-
getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
3212
|
-
setVideoDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3213
|
-
updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
3214
|
-
get screenShareTracks(): {
|
|
3215
|
-
audio: MediaStreamTrack;
|
|
3216
|
-
video: MediaStreamTrack;
|
|
3217
|
-
};
|
|
3218
|
-
get screenShareEnabled(): boolean;
|
|
3219
|
-
enableScreenShare(): Promise<void>;
|
|
3220
|
-
disableScreenShare(): Promise<void>;
|
|
3221
|
-
updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
3222
|
-
getSpeakerDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
3223
|
-
addAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<ResponseStatus>;
|
|
3224
|
-
removeAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<ResponseStatus>;
|
|
3225
|
-
removeAllAudioMiddlewares(): Promise<ResponseStatus>;
|
|
3226
|
-
addVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<ResponseStatus>;
|
|
3227
|
-
removeVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<ResponseStatus>;
|
|
3228
|
-
removeAllVideoMiddlewares(): Promise<ResponseStatus>;
|
|
3229
|
-
setVideoMiddlewareGlobalConfig(config: VideoMiddlewareGlobalConfig): Promise<void>;
|
|
3230
|
-
destruct(): void;
|
|
3231
|
-
onDeviceChange(changedDevices: {
|
|
3232
|
-
added: MediaDeviceInfo[];
|
|
3233
|
-
removed: MediaDeviceInfo[];
|
|
3234
|
-
devices: MediaDeviceInfo[];
|
|
3235
|
-
}, skipDeviceChange: boolean): Promise<void>;
|
|
3236
|
-
removeAllTracks(): void;
|
|
3237
|
-
removeAudioTrack(): void;
|
|
3238
|
-
removeVideoTrack(): void;
|
|
3239
|
-
removeDocumentEventListeners(): Promise<void>;
|
|
3238
|
+
interface MapEvents<T extends EventMap$1> {
|
|
3239
|
+
onAddEvent?: keyof T;
|
|
3240
|
+
onDeleteEvent?: keyof T;
|
|
3241
|
+
onClearEvent?: keyof T;
|
|
3240
3242
|
}
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3243
|
+
type ModifyPrependObject<T extends EventMap$1, U> = {
|
|
3244
|
+
[K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>;
|
|
3245
|
+
} & {
|
|
3246
|
+
['*']: (event: String, ...args: any[]) => void;
|
|
3247
|
+
};
|
|
3248
|
+
declare class ClientMap<T extends (EventMap$1 & WildCardEvent<T>), U extends {
|
|
3249
|
+
id: string;
|
|
3250
|
+
} & TypedEventEmitter$1<T>, V extends EventMap$1> extends Map<string, U> {
|
|
3251
|
+
readonly onAddEvent: keyof V;
|
|
3252
|
+
readonly onDeleteEvent: keyof V;
|
|
3253
|
+
readonly onClearEvent: keyof V;
|
|
3254
|
+
constructor(options: MapEvents<V>, logger?: Logger);
|
|
3255
|
+
emit<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, ...args: Parameters<(V | ModifyPrependObject<T, U>)[E]>): boolean;
|
|
3256
|
+
on<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3257
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3258
|
+
} & V>;
|
|
3259
|
+
addListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3260
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3261
|
+
} & V>;
|
|
3262
|
+
off<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3263
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3264
|
+
} & V>;
|
|
3265
|
+
once<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3266
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3267
|
+
} & V>;
|
|
3268
|
+
prependListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3269
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3270
|
+
} & V>;
|
|
3271
|
+
prependOnceListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3272
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3273
|
+
} & V>;
|
|
3274
|
+
removeListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3275
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3276
|
+
} & V>;
|
|
3277
|
+
removeAllListeners<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event?: E): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3278
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3279
|
+
} & V>;
|
|
3280
|
+
listeners<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E): Function[];
|
|
3281
|
+
listenerCount<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E): number;
|
|
3282
|
+
getMaxListeners(): number;
|
|
3283
|
+
setMaxListeners(n: number): TypedEventEmitter$1<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3284
|
+
"*": (event: String, ...args: any[]) => void;
|
|
3285
|
+
} & V>;
|
|
3286
|
+
eventNames(): (string | symbol)[];
|
|
3287
|
+
add(obj: U, emitEvent?: boolean): this;
|
|
3288
|
+
set(objId: string, obj: U, emitEvent?: boolean): this;
|
|
3289
|
+
delete(objId: string, emitEvent?: boolean, removeListeners?: boolean): boolean;
|
|
3290
|
+
clear(emitEvent?: boolean, removeListeners?: boolean): void;
|
|
3291
|
+
toArray(): U[];
|
|
3250
3292
|
}
|
|
3251
3293
|
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3294
|
+
interface GenericHandlerResult {
|
|
3295
|
+
offerSdp: RTCSessionDescriptionInit;
|
|
3296
|
+
callback: (answer: RTCSessionDescriptionInit) => Promise<any>;
|
|
3297
|
+
sender?: RTCRtpSender;
|
|
3298
|
+
}
|
|
3299
|
+
type HandlerRunOptions = {
|
|
3300
|
+
direction: 'send' | 'recv';
|
|
3301
|
+
iceServers?: RTCIceServer[];
|
|
3302
|
+
iceTransportPolicy?: RTCIceTransportPolicy;
|
|
3303
|
+
additionalSettings?: any;
|
|
3304
|
+
proprietaryConstraints?: any;
|
|
3305
|
+
onTrackHandler?: (event: RTCTrackEvent) => void;
|
|
3306
|
+
};
|
|
3307
|
+
type CodecOption = {
|
|
3308
|
+
name: string;
|
|
3309
|
+
parameters?: string[];
|
|
3310
|
+
};
|
|
3311
|
+
type HandlerSendOptions = {
|
|
3312
|
+
track: MediaStreamTrack | 'audio' | 'video';
|
|
3313
|
+
screenShare?: boolean;
|
|
3314
|
+
encodings?: RTCRtpEncodingParameters[];
|
|
3315
|
+
codecs?: RTCRtpCodecCapability[];
|
|
3316
|
+
codecOptions?: CodecOption[];
|
|
3260
3317
|
};
|
|
3318
|
+
interface HandlerSendResult extends GenericHandlerResult {
|
|
3319
|
+
mid: string;
|
|
3320
|
+
}
|
|
3321
|
+
declare abstract class HandlerInterface<TransportPromiseEvents> extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
3322
|
+
protected _sendWebStream: MediaStream;
|
|
3323
|
+
protected _sendScreenShareStream: MediaStream;
|
|
3324
|
+
protected _direction?: 'send' | 'recv';
|
|
3325
|
+
pc: RTCPeerConnection;
|
|
3326
|
+
protected _transportReady: boolean;
|
|
3327
|
+
private readonly _mapMidTransceiver;
|
|
3328
|
+
enableHighBitrate: boolean;
|
|
3329
|
+
enableStereo: boolean;
|
|
3330
|
+
enableDtx: boolean;
|
|
3331
|
+
get midTransceiverMap(): Map<string, RTCRtpTransceiver>;
|
|
3332
|
+
abstract get name(): string;
|
|
3333
|
+
close(): void;
|
|
3334
|
+
restartIce(): Promise<GenericHandlerResult>;
|
|
3335
|
+
init({ direction, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, onTrackHandler, }: HandlerRunOptions): void;
|
|
3336
|
+
connect(): Promise<GenericHandlerResult>;
|
|
3337
|
+
getTransportStats(): Promise<RTCStatsReport>;
|
|
3338
|
+
protected _assertSendDirection(): void;
|
|
3339
|
+
protected _assertRecvDirection(): void;
|
|
3340
|
+
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
3341
|
+
stopSending(localId: string): Promise<GenericHandlerResult>;
|
|
3342
|
+
abstract send(options: HandlerSendOptions): Promise<HandlerSendResult>;
|
|
3343
|
+
replaceTrack(localId: string, track: MediaStreamTrack | null): Promise<void>;
|
|
3344
|
+
setMaxSpatialLayer(localId: string, spatialLayer: number): Promise<void>;
|
|
3345
|
+
setRtpEncodingParameters(localId: string, params: any): Promise<void>;
|
|
3346
|
+
getSenderStats(localId: string): Promise<RTCStatsReport>;
|
|
3347
|
+
_addEventListeners(): void;
|
|
3348
|
+
addCustomEventListeners(): void;
|
|
3349
|
+
}
|
|
3261
3350
|
|
|
3262
|
-
type
|
|
3263
|
-
type
|
|
3264
|
-
|
|
3265
|
-
noiseSupression?: boolean;
|
|
3266
|
-
autoGainControl?: boolean;
|
|
3267
|
-
enableStereo?: boolean;
|
|
3268
|
-
enableHighBitrate?: boolean;
|
|
3351
|
+
type DCMessage = {
|
|
3352
|
+
type: string;
|
|
3353
|
+
payload: Record<string, unknown>;
|
|
3269
3354
|
};
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
height: {
|
|
3275
|
-
ideal: number;
|
|
3355
|
+
|
|
3356
|
+
type TransportPromiseEvents = {
|
|
3357
|
+
'close': {
|
|
3358
|
+
answer: RTCSessionDescriptionInit;
|
|
3276
3359
|
};
|
|
3277
|
-
|
|
3278
|
-
|
|
3360
|
+
'negotiate': {
|
|
3361
|
+
description: RTCSessionDescriptionInit;
|
|
3279
3362
|
};
|
|
3280
3363
|
};
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3364
|
+
|
|
3365
|
+
type ConsumerOptions = {
|
|
3366
|
+
id?: string;
|
|
3367
|
+
producerId: string;
|
|
3368
|
+
producingPeerId: string;
|
|
3369
|
+
producingTransportId: string;
|
|
3370
|
+
kind?: 'audio' | 'video';
|
|
3371
|
+
paused?: boolean;
|
|
3372
|
+
appData?: Record<string, unknown>;
|
|
3373
|
+
mimeType?: string;
|
|
3374
|
+
localId: string;
|
|
3375
|
+
handler: HandlerInterface<TransportPromiseEvents>;
|
|
3376
|
+
track?: MediaStreamTrack;
|
|
3377
|
+
rtpReceiver?: RTCRtpReceiver;
|
|
3378
|
+
transceiver: RTCRtpTransceiver;
|
|
3379
|
+
closeTranscieverOnClose?: boolean;
|
|
3294
3380
|
};
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3381
|
+
type MediaKind$1 = 'audio' | 'video';
|
|
3382
|
+
declare class Consumer extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
3383
|
+
readonly rtpReceiver: RTCRtpReceiver;
|
|
3384
|
+
readonly id: string;
|
|
3385
|
+
readonly localId: string;
|
|
3386
|
+
readonly producerId: string;
|
|
3387
|
+
readonly producingTransportId: string;
|
|
3388
|
+
readonly mimeType: string;
|
|
3389
|
+
readonly track: MediaStreamTrack;
|
|
3390
|
+
readonly peerId: string;
|
|
3391
|
+
readonly appData: Record<string, unknown>;
|
|
3392
|
+
readonly transceiver: RTCRtpTransceiver;
|
|
3393
|
+
constructor(context: Context<ContextState>, opts: ConsumerOptions);
|
|
3394
|
+
get closed(): boolean;
|
|
3395
|
+
get kind(): MediaKind$1;
|
|
3396
|
+
get paused(): boolean;
|
|
3397
|
+
close(reason?: string, closeTranscieverOnClose?: boolean): void;
|
|
3398
|
+
getStats(): Promise<RTCStatsReport>;
|
|
3399
|
+
pause(): void;
|
|
3400
|
+
resume(): void;
|
|
3300
3401
|
}
|
|
3301
|
-
type MediaConstraints = {
|
|
3302
|
-
audio?: AudioQualityConstraints;
|
|
3303
|
-
video?: MediaVideoQualityType | VideoQualityConstraints;
|
|
3304
|
-
screenshare?: ScreenshareQualityConstraints;
|
|
3305
|
-
};
|
|
3306
3402
|
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
};
|
|
3324
|
-
livestreamViewerQualities: LivestreamViewerMediaQualityType[];
|
|
3325
|
-
maxVideoStreams: {
|
|
3326
|
-
mobile: number;
|
|
3327
|
-
desktop: number;
|
|
3403
|
+
declare const localMediaEvents: readonly ["AUDIO_TRACK_CHANGE", "VIDEO_TRACK_CHANGE", "SCREENSHARE_TRACK_CHANGE", "SCREENSHARE_ENDED", "AUDIO_TRACK_SILENT", "FORCE_MUTE_AUDIO", "FORCE_MUTE_VIDEO", "DEVICE_CHANGE", "DEVICE_LIST_UPDATED"];
|
|
3404
|
+
type LocalMediaEvents = (typeof localMediaEvents)[number];
|
|
3405
|
+
type ParticipantEvents = {
|
|
3406
|
+
['videoUpdate']: (payload: {
|
|
3407
|
+
videoEnabled: boolean;
|
|
3408
|
+
videoTrack: MediaStreamTrack;
|
|
3409
|
+
}) => void;
|
|
3410
|
+
['audioUpdate']: (payload: {
|
|
3411
|
+
audioEnabled: boolean;
|
|
3412
|
+
audioTrack: MediaStreamTrack;
|
|
3413
|
+
}) => void;
|
|
3414
|
+
['screenShareUpdate']: (payload: {
|
|
3415
|
+
screenShareEnabled: boolean;
|
|
3416
|
+
screenShareTracks: {
|
|
3417
|
+
audio: MediaStreamTrack;
|
|
3418
|
+
video: MediaStreamTrack;
|
|
3328
3419
|
};
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
canEditConfig?: boolean;
|
|
3347
|
-
config: {
|
|
3348
|
-
[pluginId: string]: Partial<{
|
|
3349
|
-
accessControl: PluginAccessControls.FULL_ACCESS | PluginAccessControls.VIEW_ONLY;
|
|
3350
|
-
disabled: boolean;
|
|
3351
|
-
handlesViewOnly: boolean;
|
|
3352
|
-
}>;
|
|
3353
|
-
};
|
|
3354
|
-
};
|
|
3355
|
-
waitingRoomType: WaitingRoomTypes;
|
|
3356
|
-
polls: {
|
|
3357
|
-
canCreate: boolean;
|
|
3358
|
-
canVote: boolean;
|
|
3359
|
-
canView: boolean;
|
|
3360
|
-
};
|
|
3361
|
-
media: {
|
|
3362
|
-
video: {
|
|
3363
|
-
canProduce: MediaProductionPermissionType;
|
|
3364
|
-
};
|
|
3365
|
-
audio: {
|
|
3366
|
-
canProduce: MediaProductionPermissionType;
|
|
3367
|
-
};
|
|
3368
|
-
screenshare: {
|
|
3369
|
-
canProduce: MediaProductionPermissionType;
|
|
3370
|
-
};
|
|
3371
|
-
};
|
|
3372
|
-
chat: {
|
|
3373
|
-
public: {
|
|
3374
|
-
canSend: boolean;
|
|
3375
|
-
text: boolean;
|
|
3376
|
-
files: boolean;
|
|
3377
|
-
};
|
|
3378
|
-
private?: {
|
|
3379
|
-
canSend: boolean;
|
|
3380
|
-
canReceive: boolean;
|
|
3381
|
-
text: boolean;
|
|
3382
|
-
files: boolean;
|
|
3383
|
-
};
|
|
3384
|
-
channel?: {
|
|
3385
|
-
canCreate: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
|
|
3386
|
-
canDelete: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
|
|
3387
|
-
canUpdate: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
|
|
3388
|
-
canReadAll: boolean;
|
|
3389
|
-
};
|
|
3390
|
-
message?: {
|
|
3391
|
-
canDelete: 'NONE' | 'SELF' | 'ALL';
|
|
3392
|
-
canEdit: 'NONE' | 'SELF' | 'ALL';
|
|
3393
|
-
deleteCutoffTimeSeconds: number;
|
|
3394
|
-
editCutoffTimeSeconds: number;
|
|
3395
|
-
};
|
|
3396
|
-
};
|
|
3397
|
-
isRecorder?: boolean;
|
|
3398
|
-
recorderType: RecorderType$1;
|
|
3399
|
-
hiddenParticipant: boolean;
|
|
3400
|
-
showParticipantList: boolean;
|
|
3401
|
-
canChangeParticipantPermissions: boolean;
|
|
3402
|
-
connectedMeetings: {
|
|
3403
|
-
canAlterConnectedMeetings: boolean;
|
|
3404
|
-
canSwitchConnectedMeetings: boolean;
|
|
3405
|
-
canSwitchToParentMeeting: boolean;
|
|
3406
|
-
};
|
|
3407
|
-
acceptStageRequests?: boolean;
|
|
3408
|
-
stageEnabled?: boolean;
|
|
3409
|
-
stageAccess?: MediaProductionPermissionType;
|
|
3410
|
-
transcriptionEnabled: boolean;
|
|
3411
|
-
};
|
|
3412
|
-
ui: {
|
|
3413
|
-
designTokens: {
|
|
3414
|
-
borderRadius: BorderRadius;
|
|
3415
|
-
borderWidth: BorderWidth;
|
|
3416
|
-
colors: {
|
|
3417
|
-
brand: {
|
|
3418
|
-
300: string;
|
|
3419
|
-
400: string;
|
|
3420
|
-
500: string;
|
|
3421
|
-
600: string;
|
|
3422
|
-
700: string;
|
|
3423
|
-
};
|
|
3424
|
-
background: {
|
|
3425
|
-
600: string;
|
|
3426
|
-
700: string;
|
|
3427
|
-
800: string;
|
|
3428
|
-
900: string;
|
|
3429
|
-
1000: string;
|
|
3430
|
-
};
|
|
3431
|
-
danger: string;
|
|
3432
|
-
success: string;
|
|
3433
|
-
textOnBrand: string;
|
|
3434
|
-
text: string;
|
|
3435
|
-
videoBg: string;
|
|
3436
|
-
warning: string;
|
|
3437
|
-
};
|
|
3438
|
-
fontFamily?: string;
|
|
3439
|
-
googleFont?: string;
|
|
3440
|
-
logo?: string;
|
|
3441
|
-
spacingBase: number;
|
|
3442
|
-
theme: Theme;
|
|
3443
|
-
};
|
|
3444
|
-
configDiff: any;
|
|
3445
|
-
};
|
|
3446
|
-
version?: string;
|
|
3447
|
-
id?: string;
|
|
3448
|
-
name?: string;
|
|
3420
|
+
}) => void;
|
|
3421
|
+
['pinned']: (payload: Participant) => void;
|
|
3422
|
+
['unpinned']: (payload: Participant) => void;
|
|
3423
|
+
['poorConnection']: (payload: {
|
|
3424
|
+
score: number;
|
|
3425
|
+
kind: string;
|
|
3426
|
+
}) => void;
|
|
3427
|
+
['stageStatusUpdate']: (payload: Participant) => void;
|
|
3428
|
+
['mediaScoreUpdate']: (payload: {
|
|
3429
|
+
kind: MediaKind$1;
|
|
3430
|
+
isScreenshare: boolean;
|
|
3431
|
+
score: number;
|
|
3432
|
+
participantId: string;
|
|
3433
|
+
scoreStats: ConsumerScoreStats;
|
|
3434
|
+
}) => void;
|
|
3435
|
+
['kicked']: () => void;
|
|
3436
|
+
['*']: (event: string, ...args: any[]) => void;
|
|
3449
3437
|
};
|
|
3450
|
-
type
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
}
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
invite?: boolean;
|
|
3468
|
-
layout?: boolean;
|
|
3469
|
-
participants?: boolean;
|
|
3470
|
-
plugins?: boolean;
|
|
3471
|
-
polls?: boolean;
|
|
3472
|
-
reactions?: boolean;
|
|
3473
|
-
screenshare?: boolean;
|
|
3474
|
-
};
|
|
3475
|
-
}>;
|
|
3476
|
-
get header(): Readonly<{
|
|
3477
|
-
isEnabled: boolean;
|
|
3478
|
-
elements: {
|
|
3479
|
-
logo: string;
|
|
3480
|
-
timer: boolean;
|
|
3481
|
-
title: boolean;
|
|
3482
|
-
participantCount: boolean;
|
|
3483
|
-
changeLayout: boolean;
|
|
3438
|
+
type SelfEvents = {
|
|
3439
|
+
['toggleTile']: (payload: {
|
|
3440
|
+
hidden: boolean;
|
|
3441
|
+
}) => void;
|
|
3442
|
+
['videoUpdate']: (payload: {
|
|
3443
|
+
videoEnabled: boolean;
|
|
3444
|
+
videoTrack: MediaStreamTrack;
|
|
3445
|
+
}) => void;
|
|
3446
|
+
['audioUpdate']: (payload: {
|
|
3447
|
+
audioEnabled: boolean;
|
|
3448
|
+
audioTrack: MediaStreamTrack;
|
|
3449
|
+
}) => void;
|
|
3450
|
+
['screenShareUpdate']: (payload: {
|
|
3451
|
+
screenShareEnabled: boolean;
|
|
3452
|
+
screenShareTracks: {
|
|
3453
|
+
audio?: MediaStreamTrack;
|
|
3454
|
+
video?: MediaStreamTrack;
|
|
3484
3455
|
};
|
|
3485
|
-
}
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
['
|
|
3456
|
+
}) => void;
|
|
3457
|
+
['deviceUpdate']: ({ device }: {
|
|
3458
|
+
device: MediaDeviceInfo;
|
|
3459
|
+
}) => void;
|
|
3460
|
+
['deviceListUpdate']: (changedDevices: {
|
|
3461
|
+
added: MediaDeviceInfo[];
|
|
3462
|
+
removed: MediaDeviceInfo[];
|
|
3463
|
+
devices: MediaDeviceInfo[];
|
|
3464
|
+
}) => void;
|
|
3465
|
+
['pinned']: (payload: Self) => void;
|
|
3466
|
+
['unpinned']: (payload: Self) => void;
|
|
3467
|
+
['mediaPermissionUpdate']: (payload: {
|
|
3468
|
+
message: keyof typeof MediaPermission;
|
|
3469
|
+
kind: 'audio' | 'video' | 'screenshare';
|
|
3470
|
+
}) => void;
|
|
3471
|
+
['mediaPermissionError']: (payload: {
|
|
3472
|
+
message: keyof typeof MediaPermission;
|
|
3473
|
+
constraints: any;
|
|
3474
|
+
kind: 'audio' | 'video' | 'screenshare';
|
|
3475
|
+
}) => void;
|
|
3476
|
+
['mediaScoreUpdate']: (payload: {
|
|
3477
|
+
kind: MediaKind$1;
|
|
3478
|
+
isScreenshare: boolean;
|
|
3479
|
+
score: number;
|
|
3480
|
+
participantId: string;
|
|
3481
|
+
scoreStats: ProducerScoreStats;
|
|
3482
|
+
}) => void;
|
|
3483
|
+
['waitlisted']: () => void;
|
|
3484
|
+
['roomLeft']: (payload: {
|
|
3485
|
+
state: LeaveRoomState;
|
|
3486
|
+
}) => void;
|
|
3487
|
+
['roomJoined']: (payload: {
|
|
3488
|
+
reconnected: boolean;
|
|
3489
|
+
}) => void;
|
|
3490
|
+
['autoplayError']: (error: Error) => void;
|
|
3491
|
+
['*']: (event: string, ...args: any[]) => void;
|
|
3506
3492
|
};
|
|
3507
|
-
declare class RTKPermissionsPreset$1 extends RTKTypedEventEmitter<PermissionEvents> {
|
|
3508
|
-
private constructor();
|
|
3509
|
-
static fromResponse(response: PresetPermissions, viewType: ViewType, context: Context<RTKContextState>): RTKPermissionsPreset$1;
|
|
3510
|
-
static default(context: Context<RTKContextState>, viewType: ViewType): RTKPermissionsPreset$1;
|
|
3511
|
-
static init(context: Context<RTKContextState>, viewType: ViewType, response?: PresetPermissions): RTKPermissionsPreset$1;
|
|
3512
|
-
get mediaRoomType(): string;
|
|
3513
|
-
get stageEnabled(): Readonly<boolean>;
|
|
3514
|
-
get acceptStageRequests(): Readonly<boolean>;
|
|
3515
|
-
get stageAccess(): Readonly<MediaProductionPermissionType>;
|
|
3516
|
-
get acceptWaitingRequests(): Readonly<boolean>;
|
|
3517
|
-
get requestProduceVideo(): Readonly<boolean>;
|
|
3518
|
-
get requestProduceAudio(): Readonly<boolean>;
|
|
3519
|
-
get requestProduceScreenshare(): Readonly<boolean>;
|
|
3520
|
-
get canAllowParticipantAudio(): Readonly<boolean>;
|
|
3521
|
-
get canAllowParticipantScreensharing(): Readonly<boolean>;
|
|
3522
|
-
get canAllowParticipantVideo(): Readonly<boolean>;
|
|
3523
|
-
get canDisableParticipantAudio(): Readonly<boolean>;
|
|
3524
|
-
get canDisableParticipantVideo(): Readonly<boolean>;
|
|
3525
|
-
get kickParticipant(): Readonly<boolean>;
|
|
3526
|
-
get pinParticipant(): Readonly<boolean>;
|
|
3527
|
-
get canRecord(): Readonly<boolean>;
|
|
3528
|
-
get waitingRoomType(): Readonly<WaitingRoomTypes>;
|
|
3529
|
-
get waitingRoomBehaviour(): Readonly<WaitingRoomTypes>;
|
|
3530
|
-
get plugins(): Readonly<PresetPermissions['plugins']>;
|
|
3531
|
-
get polls(): Readonly<PresetPermissions['polls']>;
|
|
3532
|
-
get produceVideo(): Readonly<MediaProductionPermissionType>;
|
|
3533
|
-
get requestProduce(): Readonly<boolean>;
|
|
3534
|
-
get canProduceVideo(): Readonly<MediaProductionPermissionType>;
|
|
3535
|
-
get produceScreenshare(): Readonly<MediaProductionPermissionType>;
|
|
3536
|
-
get canProduceScreenshare(): Readonly<MediaProductionPermissionType>;
|
|
3537
|
-
get produceAudio(): Readonly<MediaProductionPermissionType>;
|
|
3538
|
-
get canProduceAudio(): Readonly<MediaProductionPermissionType>;
|
|
3539
|
-
get chatPublic(): Readonly<PresetPermissions['chat']['public']>;
|
|
3540
|
-
get chatPrivate(): Readonly<PresetPermissions['chat']['private']>;
|
|
3541
|
-
get chatChannel(): Readonly<PresetPermissions['chat']['channel']>;
|
|
3542
|
-
get chatMessage(): Readonly<PresetPermissions['chat']['message']>;
|
|
3543
|
-
get connectedMeetings(): Readonly<PresetPermissions['connectedMeetings']>;
|
|
3544
|
-
get hiddenParticipant(): Readonly<boolean>;
|
|
3545
|
-
get showParticipantList(): Readonly<boolean>;
|
|
3546
|
-
get canChangeParticipantRole(): Readonly<boolean>;
|
|
3547
|
-
get canChangeParticipantPermissions(): Readonly<boolean>;
|
|
3548
|
-
get canChangeTheme(): Readonly<boolean>;
|
|
3549
|
-
get canPresent(): Readonly<boolean>;
|
|
3550
|
-
get acceptPresentRequests(): Readonly<boolean>;
|
|
3551
|
-
get canEditDisplayName(): Readonly<boolean>;
|
|
3552
|
-
get maxScreenShareCount(): Readonly<number>;
|
|
3553
|
-
get isRecorder(): Readonly<boolean>;
|
|
3554
|
-
get canSpotlight(): Readonly<boolean>;
|
|
3555
|
-
get canLivestream(): Readonly<boolean>;
|
|
3556
|
-
get transcriptionEnabled(): Readonly<boolean>;
|
|
3557
|
-
}
|
|
3558
3493
|
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
static init(context: Context<RTKContextState>, roomSocketHandler: RoomSocketHandler, participant: UserDetailsResponseV2['participant'], permissions: RTKPermissionsPreset$1, theme: RTKThemePreset$1): Promise<SelfController>;
|
|
3574
|
-
shareMediaTracks(): Promise<void>;
|
|
3575
|
-
resetSelf(shouldAutoJoin: boolean): Promise<void>;
|
|
3576
|
-
joinRoom(reconnected?: boolean): Promise<void>;
|
|
3577
|
-
leaveRoom(state?: LeaveRoomState): Promise<void>;
|
|
3494
|
+
type ParticipantMapEvents = {
|
|
3495
|
+
['participantJoined']: (payload: Participant) => void;
|
|
3496
|
+
['participantLeft']: (payload: Participant) => void;
|
|
3497
|
+
['participantsCleared']: () => void;
|
|
3498
|
+
['participantsUpdate']: () => void;
|
|
3499
|
+
['kicked']: (payload: {
|
|
3500
|
+
id: string;
|
|
3501
|
+
}) => void;
|
|
3502
|
+
};
|
|
3503
|
+
declare class ParticipantMap<T extends Pick<Participant, 'id' | keyof TypedEventEmitter$1<ParticipantEvents>> = Participant> extends ClientMap<ParticipantEvents, T, ParticipantMapEvents> {
|
|
3504
|
+
constructor(logger: Logger, options?: MapEvents<ParticipantMapEvents>);
|
|
3505
|
+
add(participant: T, emitEvent?: boolean): this;
|
|
3506
|
+
clear(emitEvent?: boolean, removeListeners?: boolean): void;
|
|
3507
|
+
delete(participantId: string, emitEvent?: boolean, removeListeners?: boolean): boolean;
|
|
3578
3508
|
}
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
audio?: MediaPermission$1;
|
|
3592
|
-
video?: MediaPermission$1;
|
|
3593
|
-
screenshare?: MediaPermission$1;
|
|
3594
|
-
};
|
|
3595
|
-
addAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<{
|
|
3596
|
-
success: boolean;
|
|
3597
|
-
message: string;
|
|
3598
|
-
}>;
|
|
3599
|
-
removeAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<{
|
|
3600
|
-
success: boolean;
|
|
3601
|
-
message: string;
|
|
3602
|
-
}>;
|
|
3603
|
-
removeAllAudioMiddlewares(): Promise<{
|
|
3604
|
-
success: boolean;
|
|
3605
|
-
message: string;
|
|
3606
|
-
}>;
|
|
3607
|
-
get videoTrack(): MediaStreamTrack;
|
|
3608
|
-
get rawVideoTrack(): MediaStreamTrack;
|
|
3609
|
-
addVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<{
|
|
3610
|
-
success: boolean;
|
|
3611
|
-
message: string;
|
|
3509
|
+
|
|
3510
|
+
type StageSocketMessage = GetStageRequestsResponse | GetStagePeersResponse | DenyStageAccessRequest | PeerStatusUpdate;
|
|
3511
|
+
declare class StageSocketHandler {
|
|
3512
|
+
constructor(socketService: SocketService);
|
|
3513
|
+
getStageRequests(): Promise<GetStageRequestsResponse>;
|
|
3514
|
+
requestAccess(): void;
|
|
3515
|
+
cancelRequestAccess(): void;
|
|
3516
|
+
grantAccess(userIds: string[]): Promise<void>;
|
|
3517
|
+
denyAccess(userIds: string[]): Promise<void>;
|
|
3518
|
+
joinStage(): Promise<{
|
|
3519
|
+
id: string;
|
|
3520
|
+
payload: Uint8Array;
|
|
3612
3521
|
}>;
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
message: string;
|
|
3522
|
+
leaveStage(userId: string): Promise<{
|
|
3523
|
+
id: string;
|
|
3524
|
+
payload: Uint8Array;
|
|
3617
3525
|
}>;
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3526
|
+
kick(userIds: string[]): Promise<{
|
|
3527
|
+
id: string;
|
|
3528
|
+
payload: Uint8Array;
|
|
3621
3529
|
}>;
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
video: MediaStreamTrack;
|
|
3625
|
-
};
|
|
3626
|
-
get audioEnabled(): boolean;
|
|
3627
|
-
get videoEnabled(): boolean;
|
|
3628
|
-
get screenShareEnabled(): boolean;
|
|
3629
|
-
enableAudio(): Promise<void>;
|
|
3630
|
-
enableVideo(): Promise<void>;
|
|
3631
|
-
disableAudio(): Promise<void>;
|
|
3632
|
-
enableScreenShare(): Promise<void>;
|
|
3633
|
-
disableScreenShare(): Promise<void>;
|
|
3634
|
-
disableVideo(): Promise<void>;
|
|
3635
|
-
getCurrentDevices(): {
|
|
3636
|
-
audio: MediaDeviceInfo;
|
|
3637
|
-
video: MediaDeviceInfo;
|
|
3638
|
-
speaker: MediaDeviceInfo;
|
|
3639
|
-
};
|
|
3640
|
-
getAudioDevices(): Promise<MediaDeviceInfo[]>;
|
|
3641
|
-
getVideoDevices(): Promise<MediaDeviceInfo[]>;
|
|
3642
|
-
getSpeakerDevices(): Promise<MediaDeviceInfo[]>;
|
|
3643
|
-
getDeviceById(deviceId: string, kind: 'audio' | 'video' | 'speaker'): Promise<MediaDeviceInfo>;
|
|
3644
|
-
setDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3530
|
+
on(event: number, handler: (socketMessage: StageSocketMessage, messageId?: string) => void): void;
|
|
3531
|
+
getPeerInfo(peerId: string): Promise<PeerInfoResponse>;
|
|
3645
3532
|
}
|
|
3646
3533
|
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
email: string;
|
|
3651
|
-
picture?: string;
|
|
3652
|
-
loggedIn?: boolean;
|
|
3653
|
-
scope?: string[];
|
|
3654
|
-
clientSpecificId?: string;
|
|
3655
|
-
customParticipantId?: string;
|
|
3656
|
-
organizationId?: string;
|
|
3657
|
-
}
|
|
3658
|
-
declare class RTKSelf$1 extends RTKSelfMedia$1 {
|
|
3659
|
-
name: string;
|
|
3660
|
-
picture: string;
|
|
3661
|
-
customParticipantId: string;
|
|
3662
|
-
waitlistStatus: 'accepted' | 'waiting' | 'rejected' | 'none';
|
|
3663
|
-
role: any;
|
|
3534
|
+
type StageStatus = 'OFF_STAGE' | 'REQUESTED_TO_JOIN_STAGE' | 'ACCEPTED_TO_JOIN_STAGE' | 'ON_STAGE';
|
|
3535
|
+
interface StageRequestPayload {
|
|
3536
|
+
displayName: string;
|
|
3664
3537
|
userId: string;
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3538
|
+
peerId: string;
|
|
3539
|
+
}
|
|
3540
|
+
type StageEvents = {
|
|
3541
|
+
['stageAccessRequestUpdate']: (requests?: StageRequestPayload[]) => void;
|
|
3542
|
+
['stageStatusUpdate']: (status: StageStatus) => void;
|
|
3543
|
+
['newStageRequest']: (payload: {
|
|
3544
|
+
count: number;
|
|
3545
|
+
}) => void;
|
|
3546
|
+
['stageRequestApproved']: () => void;
|
|
3547
|
+
['stageRequestRejected']: () => void;
|
|
3548
|
+
['*']: (eventName: string, ...args: any[]) => void;
|
|
3549
|
+
};
|
|
3550
|
+
declare class Stage extends TypedEventEmitter$1<StageEvents> {
|
|
3551
|
+
get telemetry(): Telemetry;
|
|
3552
|
+
constructor(context: Context<ContextState>, self: Self, participants: Participants, stageSocketHandler: StageSocketHandler, roomSocketHandler: RoomSocketHandler);
|
|
3553
|
+
get status(): StageStatus;
|
|
3554
|
+
private setupEvents;
|
|
3555
|
+
getAccessRequests(): {
|
|
3556
|
+
stageRequests: StageRequestPayload[];
|
|
3557
|
+
};
|
|
3558
|
+
requestAccess(): Promise<void>;
|
|
3559
|
+
cancelRequestAccess(): Promise<void>;
|
|
3560
|
+
grantAccess(userIds: string[]): Promise<void>;
|
|
3561
|
+
denyAccess(userIds: string[]): Promise<void>;
|
|
3673
3562
|
get peerId(): string;
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
get config(): RTKThemePreset$1;
|
|
3681
|
-
get roomJoined(): boolean;
|
|
3682
|
-
setName(name: string): void;
|
|
3683
|
-
setupTracks(options?: {
|
|
3684
|
-
video?: boolean;
|
|
3685
|
-
audio?: boolean;
|
|
3686
|
-
forceReset?: boolean;
|
|
3687
|
-
}): Promise<void>;
|
|
3688
|
-
destructMediaHandler(): Promise<void>;
|
|
3689
|
-
removeDocumentEventListeners(): Promise<void>;
|
|
3690
|
-
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
3691
|
-
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
3692
|
-
updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
3693
|
-
enableScreenShare(): Promise<void>;
|
|
3694
|
-
updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
3695
|
-
disableAudio(): Promise<void>;
|
|
3696
|
-
disableVideo(): Promise<void>;
|
|
3697
|
-
disableScreenShare(): Promise<void>;
|
|
3698
|
-
getAllDevices(): Promise<InputDeviceInfo[]>;
|
|
3699
|
-
setIsPinned(isPinned: boolean, emitEvent?: boolean): void;
|
|
3700
|
-
get isPinned(): boolean;
|
|
3701
|
-
pin(): Promise<void>;
|
|
3702
|
-
unpin(): Promise<void>;
|
|
3703
|
-
hide(): Promise<void>;
|
|
3704
|
-
show(): void;
|
|
3705
|
-
setDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3706
|
-
cleanUpTracks(): void;
|
|
3707
|
-
playAudio(): Promise<void>;
|
|
3708
|
-
registerVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
|
|
3709
|
-
deregisterVideoElement(videoElem?: HTMLVideoElement, isPreview?: boolean): void;
|
|
3563
|
+
join(): Promise<void>;
|
|
3564
|
+
leave(): Promise<void>;
|
|
3565
|
+
kick(userIds: string[]): Promise<{
|
|
3566
|
+
id: string;
|
|
3567
|
+
payload: Uint8Array;
|
|
3568
|
+
}>;
|
|
3710
3569
|
}
|
|
3711
3570
|
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
customParticipantId: string;
|
|
3571
|
+
declare const modes: readonly ["ACTIVE_GRID", "PAGINATED", "MANUAL"];
|
|
3572
|
+
type ViewMode = (typeof modes)[number];
|
|
3573
|
+
interface BroadcastMessagePayload {
|
|
3574
|
+
[key: string]: boolean | number | string | Date | ActiveTab;
|
|
3717
3575
|
}
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
toArray(): RTKBasicParticipant[];
|
|
3576
|
+
interface PeerProducerConfig {
|
|
3577
|
+
audio: boolean;
|
|
3578
|
+
video: boolean;
|
|
3579
|
+
screenshareAudio: boolean;
|
|
3580
|
+
screenshareVideo: boolean;
|
|
3724
3581
|
}
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3582
|
+
type BroadcastMessageTarget = {
|
|
3583
|
+
participantIds: string[];
|
|
3584
|
+
} | {
|
|
3585
|
+
presetNames: string[];
|
|
3586
|
+
} | {
|
|
3587
|
+
meetingIds: string[];
|
|
3588
|
+
};
|
|
3589
|
+
type JoinedPeer = {
|
|
3728
3590
|
id: string;
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3591
|
+
userId: string;
|
|
3592
|
+
name: string;
|
|
3593
|
+
stageType?: StageStatus;
|
|
3594
|
+
customParticipantId?: string;
|
|
3595
|
+
presetId?: string;
|
|
3596
|
+
picture?: string;
|
|
3597
|
+
waitlisted: boolean;
|
|
3598
|
+
recorderType?: string;
|
|
3599
|
+
stageStatus?: StageStatus;
|
|
3600
|
+
metadata?: {
|
|
3601
|
+
preset_name?: string;
|
|
3602
|
+
};
|
|
3603
|
+
flags?: {
|
|
3604
|
+
hiddenParticipant?: boolean;
|
|
3605
|
+
recorder?: boolean;
|
|
3606
|
+
};
|
|
3607
|
+
};
|
|
3608
|
+
type ParticipantsEvents = {
|
|
3609
|
+
['viewModeChanged']: (payload: {
|
|
3610
|
+
viewMode: string;
|
|
3611
|
+
currentPage: number;
|
|
3612
|
+
pageCount: number;
|
|
3613
|
+
}) => void;
|
|
3614
|
+
['activeSpeaker']: (payload: {
|
|
3615
|
+
peerId: string;
|
|
3616
|
+
volume: number;
|
|
3617
|
+
}) => void;
|
|
3618
|
+
['broadcastedMessage']: (payload: {
|
|
3619
|
+
type: string;
|
|
3620
|
+
payload: BroadcastMessagePayload;
|
|
3621
|
+
timestamp: number;
|
|
3622
|
+
}) => void;
|
|
3623
|
+
['poorConnection']: (payload: {
|
|
3624
|
+
participantId: string;
|
|
3625
|
+
score: number;
|
|
3626
|
+
kind: string;
|
|
3627
|
+
}) => void;
|
|
3628
|
+
['pageChanged']: (payload: {
|
|
3629
|
+
viewMode: string;
|
|
3630
|
+
currentPage: number;
|
|
3631
|
+
pageCount: number;
|
|
3632
|
+
}) => void;
|
|
3633
|
+
['mediaScoreUpdate']: (payload: {
|
|
3634
|
+
kind: string;
|
|
3635
|
+
isScreenshare: boolean;
|
|
3636
|
+
score: number;
|
|
3637
|
+
participantId: string;
|
|
3638
|
+
scoreStats: ConsumerScoreStats;
|
|
3639
|
+
}) => void;
|
|
3640
|
+
['media_decode_error']: (payload: {
|
|
3641
|
+
reason: string;
|
|
3642
|
+
code: '1702' | '1703';
|
|
3643
|
+
}) => void;
|
|
3644
|
+
['*']: (event: string, ...args: any[]) => void;
|
|
3645
|
+
};
|
|
3646
|
+
declare class Participants extends TypedEventEmitter$1<ParticipantsEvents> {
|
|
3647
|
+
readonly waitlisted: Readonly<ParticipantMap<Omit<Participant, 'audioTrack' | 'videoTrack' | 'screenShareTracks'>>>;
|
|
3648
|
+
readonly joined: Readonly<ParticipantMap>;
|
|
3649
|
+
readonly active: Readonly<ParticipantMap>;
|
|
3650
|
+
readonly videoSubscribed: Readonly<ParticipantMap>;
|
|
3651
|
+
readonly audioSubscribed: Readonly<ParticipantMap>;
|
|
3652
|
+
readonly pinned: Readonly<ParticipantMap>;
|
|
3653
|
+
readonly all: Readonly<BasicParticipantsMap>;
|
|
3654
|
+
get pip(): Pip;
|
|
3655
|
+
rateLimitConfig: {
|
|
3656
|
+
maxInvocations: number;
|
|
3657
|
+
period: number;
|
|
3658
|
+
};
|
|
3659
|
+
get rateLimits(): {
|
|
3660
|
+
maxInvocations: number;
|
|
3661
|
+
period: number;
|
|
3662
|
+
};
|
|
3663
|
+
updateRateLimits(num: number, period: number): void;
|
|
3664
|
+
get telemetry(): Telemetry;
|
|
3665
|
+
viewMode: ViewMode;
|
|
3666
|
+
currentPage: number;
|
|
3667
|
+
lastActiveSpeaker: string;
|
|
3668
|
+
selectedPeers: SelectedPeers;
|
|
3669
|
+
constructor(context: Context<ContextState>, self: Self, roomSocketHandler: RoomSocketHandler);
|
|
3670
|
+
setupEvents(): void;
|
|
3671
|
+
get count(): number;
|
|
3672
|
+
get maxActiveParticipantsCount(): number;
|
|
3673
|
+
setMaxActiveParticipantsCount(limit: number): void;
|
|
3674
|
+
get pageCount(): number;
|
|
3675
|
+
acceptWaitingRoomRequest(id: string): void;
|
|
3676
|
+
acceptAllWaitingRoomRequest(userIds: string[]): Promise<void>;
|
|
3677
|
+
rejectWaitingRoomRequest(id: string): Promise<void>;
|
|
3678
|
+
setViewMode(viewMode: ViewMode): Promise<void>;
|
|
3679
|
+
subscribe(peerIds: string[], kinds?: ('audio' | 'video' | 'screenshareAudio' | 'screenshareVideo')[]): Promise<void>;
|
|
3680
|
+
unsubscribe(peerIds: string[], kinds?: ('audio' | 'video' | 'screenshareAudio' | 'screenshareVideo')[]): Promise<void>;
|
|
3681
|
+
getPeerIdsForCurrentPage(): string[];
|
|
3682
|
+
setPage(page: number): Promise<void>;
|
|
3683
|
+
disableAllAudio(allowUnmute: boolean): Promise<void>;
|
|
3684
|
+
disableAllVideo(): Promise<void>;
|
|
3685
|
+
disableAudio(participantId: string): Promise<void>;
|
|
3686
|
+
disableVideo(participantId: string): Promise<void>;
|
|
3687
|
+
kick(participantId: string): Promise<void>;
|
|
3688
|
+
kickAll(): Promise<void>;
|
|
3689
|
+
broadcastMessage(type: Exclude<string, 'spotlight'>, payload: BroadcastMessagePayload, target?: BroadcastMessageTarget): Promise<void>;
|
|
3690
|
+
getAllJoinedPeers(searchQuery: string, limit: number, offset: number): Promise<{
|
|
3691
|
+
id: string;
|
|
3692
|
+
userId: string;
|
|
3693
|
+
name: string;
|
|
3694
|
+
displayName: string;
|
|
3695
|
+
stageType: StageStatus;
|
|
3696
|
+
customParticipantId: string;
|
|
3697
|
+
presetId: string;
|
|
3698
|
+
picture: string;
|
|
3699
|
+
waitlisted: boolean;
|
|
3700
|
+
stageStatus: StageStatus;
|
|
3701
|
+
metadata: {
|
|
3702
|
+
preset_name: string;
|
|
3703
|
+
};
|
|
3704
|
+
recorderType: string;
|
|
3705
|
+
flags: {
|
|
3706
|
+
hiddenParticipant: boolean;
|
|
3707
|
+
hidden_participant: boolean;
|
|
3708
|
+
recorder: boolean;
|
|
3709
|
+
};
|
|
3710
|
+
}[]>;
|
|
3711
|
+
updatePermissions(participantIds: string[], permissions: PresetUpdates): Promise<void>;
|
|
3712
|
+
getParticipantsInMeetingPreJoin(): Promise<RoomPeersInfoResponse>;
|
|
3752
3713
|
}
|
|
3753
3714
|
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
reversed?: boolean;
|
|
3715
|
+
interface FetchRequestConfig {
|
|
3716
|
+
baseURL?: string;
|
|
3717
|
+
url?: string;
|
|
3718
|
+
method?: string;
|
|
3719
|
+
headers?: Record<string, string>;
|
|
3720
|
+
timeout?: number;
|
|
3721
|
+
retry?: number;
|
|
3722
|
+
retryDelay?: number;
|
|
3723
|
+
responseType?: string;
|
|
3724
|
+
data?: any;
|
|
3725
|
+
params?: Record<string, string>;
|
|
3766
3726
|
}
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
payload: Uint8Array;
|
|
3774
|
-
}>;
|
|
3775
|
-
getChatMessagesPaginated(timeStamp: number, size: number, reversed: boolean, offset?: number, channelId?: string): Promise<GetPaginatedChatMessageRoomResponse>;
|
|
3776
|
-
sendMessageToRoom(message: string, messageType: ChatMessageType): void;
|
|
3777
|
-
sendMessageToPeers(message: string, messageType: ChatMessageType, peerIds: string[]): void;
|
|
3778
|
-
sendMessageToChannel(message: string, messageType: ChatMessageType, channelId: string): void;
|
|
3779
|
-
sendMessage(message: string, messageType: ChatMessageType, peerIds?: string[], channelId?: string): void;
|
|
3780
|
-
editMessage(chatId: string, message: string, payloadType: ChatMessageType, channelId?: string, pinned?: boolean): Promise<ChatMessage>;
|
|
3781
|
-
deleteMessage(chatId: string, channelId?: string): Promise<{
|
|
3782
|
-
channelId?: string;
|
|
3783
|
-
id: string;
|
|
3784
|
-
}>;
|
|
3785
|
-
searchMessages(query: string, filters: SearchFilters): Promise<ChatMessage[]>;
|
|
3786
|
-
getAllChannels(): Promise<ChatChannel[]>;
|
|
3787
|
-
markLastReadMessage(channelId: string, message: Message): Promise<string>;
|
|
3788
|
-
setPinState(message: Message, pin: boolean): Promise<PinChatMessageResponse>;
|
|
3789
|
-
on(event: number, handler: (socketMessage: ChatSocketMessage) => void): void;
|
|
3727
|
+
interface FetchResponse<T = any> {
|
|
3728
|
+
data: T;
|
|
3729
|
+
status: number;
|
|
3730
|
+
statusText: string;
|
|
3731
|
+
headers: Record<string, string>;
|
|
3732
|
+
config: FetchRequestConfig;
|
|
3790
3733
|
}
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3734
|
+
declare class FetchClient {
|
|
3735
|
+
defaults: {
|
|
3736
|
+
baseURL: string;
|
|
3737
|
+
headers: {
|
|
3738
|
+
common: Record<string, string>;
|
|
3739
|
+
};
|
|
3740
|
+
timeout: number;
|
|
3741
|
+
retry: number;
|
|
3742
|
+
retryDelay: number;
|
|
3743
|
+
};
|
|
3744
|
+
constructor(options: {
|
|
3745
|
+
baseURL: string;
|
|
3746
|
+
timeout: number;
|
|
3747
|
+
retry: number;
|
|
3748
|
+
retryDelay: number;
|
|
3749
|
+
responseType?: string;
|
|
3750
|
+
});
|
|
3751
|
+
private buildURL;
|
|
3752
|
+
request<T = any>(config: FetchRequestConfig): Promise<FetchResponse<T>>;
|
|
3753
|
+
get<T = any>(url: string, config?: FetchRequestConfig): Promise<FetchResponse<T>>;
|
|
3754
|
+
post<T = any>(url: string, data?: any, config?: FetchRequestConfig): Promise<FetchResponse<T>>;
|
|
3755
|
+
put<T = any>(url: string, data?: any, config?: FetchRequestConfig): Promise<FetchResponse<T>>;
|
|
3800
3756
|
}
|
|
3801
3757
|
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
['hangup']: () => void;
|
|
3806
|
-
['pipStarted']: () => void;
|
|
3807
|
-
['pipEnded']: () => void;
|
|
3808
|
-
['*']: (eventName: string, ...args: any[]) => void;
|
|
3809
|
-
};
|
|
3810
|
-
declare class RTKPip extends RTKTypedEventEmitter<PipEvents> {
|
|
3811
|
-
private constructor();
|
|
3812
|
-
static _init(context: Context<RTKContextState>, self: RTKSelf$1): Promise<RTKPip>;
|
|
3813
|
-
overrideIcon(icon: 'handRaise' | 'pin', value: string): Promise<void>;
|
|
3814
|
-
isSupported(): boolean;
|
|
3815
|
-
get isActive(): boolean;
|
|
3816
|
-
init({ height, width }?: {
|
|
3817
|
-
height?: number;
|
|
3818
|
-
width?: number;
|
|
3819
|
-
}): void;
|
|
3820
|
-
enableSource(source: string): void;
|
|
3821
|
-
disableSource(source: string): void;
|
|
3822
|
-
addSource(id: string, element: HTMLVideoElement, enabled: boolean, pinned?: boolean, displayText?: string, imageUrl?: string, handRaised?: boolean): void;
|
|
3823
|
-
updateSource(id: string, source: any): void;
|
|
3824
|
-
removeSource(id: string): void;
|
|
3825
|
-
removePinnedSource(): void;
|
|
3826
|
-
removeAllSources(): void;
|
|
3827
|
-
enable(): void;
|
|
3828
|
-
disable: (partial?: boolean) => void;
|
|
3758
|
+
interface ResponseStatus {
|
|
3759
|
+
success: boolean;
|
|
3760
|
+
message: string;
|
|
3829
3761
|
}
|
|
3830
3762
|
|
|
3831
|
-
type
|
|
3832
|
-
id: string;
|
|
3833
|
-
name: string;
|
|
3834
|
-
peerId: string;
|
|
3835
|
-
userId: string;
|
|
3836
|
-
customParticipantId: string;
|
|
3837
|
-
transcript: string;
|
|
3838
|
-
isPartialTranscript: boolean;
|
|
3839
|
-
date: Date;
|
|
3840
|
-
};
|
|
3841
|
-
type AiEvents = {
|
|
3842
|
-
['transcript']: (t: TranscriptionData) => void;
|
|
3843
|
-
['*']: (event: string, ...args: any[]) => void;
|
|
3844
|
-
};
|
|
3845
|
-
declare class RTKAi extends RTKTypedEventEmitter<AiEvents> {
|
|
3846
|
-
transcripts: TranscriptionData[];
|
|
3847
|
-
get telemetry(): RTKTelemetry;
|
|
3848
|
-
constructor(context: Context<RTKContextState>);
|
|
3849
|
-
static init(context: Context<RTKContextState>, transcriptionEnabled: boolean): Promise<RTKAi>;
|
|
3850
|
-
static parseTranscript(transcriptData: string, isPartialTranscript?: boolean): TranscriptionData | undefined;
|
|
3851
|
-
static parseTranscripts(transcriptData: string): TranscriptionData[];
|
|
3852
|
-
getActiveTranscript(): Promise<void>;
|
|
3853
|
-
onTranscript(transcript: TranscriptionData): Promise<void>;
|
|
3854
|
-
}
|
|
3763
|
+
type MediaPermission$1 = 'NOT_REQUESTED' | 'ACCEPTED' | 'DENIED' | 'SYSTEM_DENIED' | 'COULD_NOT_START' | 'NO_DEVICES_AVAILABLE' | 'CANCELED';
|
|
3855
3764
|
|
|
3856
|
-
declare
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
}
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3765
|
+
declare class LocalMediaHandler extends CustomEventEmitter<LocalMediaEvents> {
|
|
3766
|
+
get telemetry(): Telemetry;
|
|
3767
|
+
audioUpdateInProgress: boolean;
|
|
3768
|
+
videoUpdateInProgress: boolean;
|
|
3769
|
+
constructor(context: Context<ContextState>, mediaConstraints: MediaConstraints, isNonPreferredDevice?: (media: MediaDeviceInfo) => boolean, autoSwitchDevice?: boolean);
|
|
3770
|
+
set context(context: Context<ContextState>);
|
|
3771
|
+
private onVisibilityChange;
|
|
3772
|
+
repopulateAvailableDevices(): Promise<boolean>;
|
|
3773
|
+
setupStreams({ audio, video, }: {
|
|
3774
|
+
audio: boolean;
|
|
3775
|
+
video: boolean;
|
|
3776
|
+
}): Promise<void>;
|
|
3777
|
+
getCurrentDevices(): {
|
|
3778
|
+
audio: MediaDeviceInfo;
|
|
3779
|
+
video: MediaDeviceInfo;
|
|
3780
|
+
speaker: MediaDeviceInfo;
|
|
3868
3781
|
};
|
|
3869
|
-
|
|
3870
|
-
|
|
3782
|
+
get permissions(): {
|
|
3783
|
+
audio?: MediaPermission$1;
|
|
3784
|
+
video?: MediaPermission$1;
|
|
3785
|
+
screenshare?: MediaPermission$1;
|
|
3871
3786
|
};
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3787
|
+
getAllDevices(): Promise<InputDeviceInfo[]>;
|
|
3788
|
+
getDeviceById(deviceId: string, kind?: 'audioinput' | 'audiooutput' | 'videoinput'): Promise<MediaDeviceInfo>;
|
|
3789
|
+
private onAudioTrackMuted;
|
|
3790
|
+
private onAudioTrackChanged;
|
|
3791
|
+
get rawAudioTrack(): MediaStreamTrack;
|
|
3792
|
+
get audioTrack(): MediaStreamTrack;
|
|
3793
|
+
get audioEnabled(): boolean;
|
|
3794
|
+
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
3795
|
+
disableAudio(): void;
|
|
3796
|
+
getAudioDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
3797
|
+
setAudioDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3798
|
+
setupSpeaker(): Promise<void>;
|
|
3799
|
+
setSpeakerDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3800
|
+
private onVideoTrackChanged;
|
|
3801
|
+
private onVideoTrackEnded;
|
|
3802
|
+
get rawVideoTrack(): MediaStreamTrack;
|
|
3803
|
+
get videoTrack(): MediaStreamTrack;
|
|
3804
|
+
get videoEnabled(): boolean;
|
|
3805
|
+
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
3806
|
+
disableVideo(): void;
|
|
3807
|
+
getVideoDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
3808
|
+
setVideoDevice(device: MediaDeviceInfo): Promise<void>;
|
|
3809
|
+
updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
3810
|
+
private onScreenShareEnded;
|
|
3811
|
+
get screenShareTracks(): {
|
|
3812
|
+
audio: MediaStreamTrack;
|
|
3813
|
+
video: MediaStreamTrack;
|
|
3814
|
+
};
|
|
3815
|
+
get screenShareEnabled(): boolean;
|
|
3816
|
+
enableScreenShare(): Promise<void>;
|
|
3817
|
+
disableScreenShare(): Promise<void>;
|
|
3818
|
+
updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
3819
|
+
getSpeakerDevices(devices?: MediaDeviceInfo[]): Promise<MediaDeviceInfo[]>;
|
|
3820
|
+
addAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<ResponseStatus>;
|
|
3821
|
+
removeAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<ResponseStatus>;
|
|
3822
|
+
removeAllAudioMiddlewares(): Promise<ResponseStatus>;
|
|
3823
|
+
addVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<ResponseStatus>;
|
|
3824
|
+
removeVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<ResponseStatus>;
|
|
3825
|
+
removeAllVideoMiddlewares(): Promise<ResponseStatus>;
|
|
3826
|
+
setVideoMiddlewareGlobalConfig(config: VideoMiddlewareGlobalConfig): Promise<void>;
|
|
3827
|
+
destruct(): void;
|
|
3828
|
+
onDeviceChange(changedDevices: {
|
|
3829
|
+
added: MediaDeviceInfo[];
|
|
3830
|
+
removed: MediaDeviceInfo[];
|
|
3831
|
+
devices: MediaDeviceInfo[];
|
|
3832
|
+
}, skipDeviceChange: boolean): Promise<void>;
|
|
3833
|
+
removeAllTracks(): void;
|
|
3834
|
+
removeAudioTrack(): void;
|
|
3835
|
+
removeVideoTrack(): void;
|
|
3836
|
+
removeDocumentEventListeners(): Promise<void>;
|
|
3916
3837
|
}
|
|
3917
3838
|
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
['*']: (event: String, ...args: any[]) => void;
|
|
3927
|
-
};
|
|
3928
|
-
declare class RTKMap<T extends (EventMap$1 & WildCardEvent<T>), U extends {
|
|
3929
|
-
id: string;
|
|
3930
|
-
} & RTKTypedEventEmitter<T>, V extends EventMap$1> extends Map<string, U> {
|
|
3931
|
-
readonly onAddEvent: keyof V;
|
|
3932
|
-
readonly onDeleteEvent: keyof V;
|
|
3933
|
-
readonly onClearEvent: keyof V;
|
|
3934
|
-
constructor(options: RTKMapEvents<V>, logger?: RTKLogger$1);
|
|
3935
|
-
emit<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, ...args: Parameters<(V | ModifyPrependObject<T, U>)[E]>): boolean;
|
|
3936
|
-
on<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3937
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3938
|
-
} & V>;
|
|
3939
|
-
addListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3940
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3941
|
-
} & V>;
|
|
3942
|
-
off<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3943
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3944
|
-
} & V>;
|
|
3945
|
-
once<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3946
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3947
|
-
} & V>;
|
|
3948
|
-
prependListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3949
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3950
|
-
} & V>;
|
|
3951
|
-
prependOnceListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3952
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3953
|
-
} & V>;
|
|
3954
|
-
removeListener<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E, callback: (ModifyPrependObject<T, U> & V)[E]): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3955
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3956
|
-
} & V>;
|
|
3957
|
-
removeAllListeners<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event?: E): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3958
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3959
|
-
} & V>;
|
|
3960
|
-
listeners<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E): Function[];
|
|
3961
|
-
listenerCount<E extends StringKeyOf<ModifyPrependObject<T, U> & V>>(event: E): number;
|
|
3962
|
-
getMaxListeners(): number;
|
|
3963
|
-
setMaxListeners(n: number): RTKTypedEventEmitter<{ [K in keyof T]: (obj: U, ...args: Parameters<T[K]>) => ReturnType<T[K]>; } & {
|
|
3964
|
-
"*": (event: String, ...args: any[]) => void;
|
|
3965
|
-
} & V>;
|
|
3966
|
-
eventNames(): (string | symbol)[];
|
|
3967
|
-
add(obj: U, emitEvent?: boolean): this;
|
|
3968
|
-
set(objId: string, obj: U, emitEvent?: boolean): this;
|
|
3969
|
-
delete(objId: string, emitEvent?: boolean, removeListeners?: boolean): boolean;
|
|
3970
|
-
clear(emitEvent?: boolean, removeListeners?: boolean): void;
|
|
3971
|
-
toArray(): U[];
|
|
3839
|
+
declare enum MediaPermission {
|
|
3840
|
+
NOT_REQUESTED = 0,
|
|
3841
|
+
ACCEPTED = 1,
|
|
3842
|
+
DENIED = 2,
|
|
3843
|
+
CANCELED = 3,
|
|
3844
|
+
SYSTEM_DENIED = 4,
|
|
3845
|
+
COULD_NOT_START = 5,
|
|
3846
|
+
NO_DEVICES_AVAILABLE = 6
|
|
3972
3847
|
}
|
|
3973
3848
|
|
|
3974
|
-
type
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3849
|
+
type AudioMiddleware = (audioContext: AudioContext) => Promise<ScriptProcessorNode | AudioWorkletNode>;
|
|
3850
|
+
|
|
3851
|
+
type VideoMiddleware = (() => Promise<(canvas: HTMLCanvasElement, ctx: CanvasRenderingContext2D) => Promise<void>>) | ((helpers: {
|
|
3852
|
+
canvas: HTMLCanvasElement;
|
|
3853
|
+
WorkerTimers: typeof WorkerTimers;
|
|
3854
|
+
}) => Promise<void>);
|
|
3855
|
+
type VideoMiddlewareGlobalConfig = {
|
|
3856
|
+
disablePerFrameCanvasRendering: boolean;
|
|
3982
3857
|
};
|
|
3983
|
-
declare class RTKParticipantMap$1<T extends Pick<RTKParticipant$1, 'id' | keyof RTKTypedEventEmitter<ParticipantEvents>> = RTKParticipant$1> extends RTKMap<ParticipantEvents, T, ParticipantMapEvents> {
|
|
3984
|
-
constructor(logger: RTKLogger, options?: RTKMapEvents<ParticipantMapEvents>);
|
|
3985
|
-
add(participant: T, emitEvent?: boolean): this;
|
|
3986
|
-
clear(emitEvent?: boolean, removeListeners?: boolean): void;
|
|
3987
|
-
delete(participantId: string, emitEvent?: boolean, removeListeners?: boolean): boolean;
|
|
3988
|
-
}
|
|
3989
3858
|
|
|
3990
|
-
|
|
3991
|
-
type
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
video: boolean;
|
|
3998
|
-
screenshareAudio: boolean;
|
|
3999
|
-
screenshareVideo: boolean;
|
|
4000
|
-
}
|
|
4001
|
-
type BroadcastMessageTarget = {
|
|
4002
|
-
participantIds: string[];
|
|
4003
|
-
} | {
|
|
4004
|
-
presetNames: string[];
|
|
4005
|
-
} | {
|
|
4006
|
-
meetingIds: string[];
|
|
3859
|
+
type PresetMediaConstraints = PresetV2CamelCased['config']['media'];
|
|
3860
|
+
type AudioQualityConstraints = {
|
|
3861
|
+
echoCancellation?: boolean;
|
|
3862
|
+
noiseSupression?: boolean;
|
|
3863
|
+
autoGainControl?: boolean;
|
|
3864
|
+
enableStereo?: boolean;
|
|
3865
|
+
enableHighBitrate?: boolean;
|
|
4007
3866
|
};
|
|
4008
|
-
type
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
name: string;
|
|
4012
|
-
stageType?: StageStatus;
|
|
4013
|
-
customParticipantId?: string;
|
|
4014
|
-
presetId?: string;
|
|
4015
|
-
picture?: string;
|
|
4016
|
-
waitlisted: boolean;
|
|
4017
|
-
recorderType?: string;
|
|
4018
|
-
stageStatus?: StageStatus;
|
|
4019
|
-
metadata?: {
|
|
4020
|
-
preset_name?: string;
|
|
3867
|
+
type VideoQualityConstraints = {
|
|
3868
|
+
width: {
|
|
3869
|
+
ideal: number;
|
|
4021
3870
|
};
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
3871
|
+
height: {
|
|
3872
|
+
ideal: number;
|
|
3873
|
+
};
|
|
3874
|
+
frameRate?: {
|
|
3875
|
+
ideal: number;
|
|
4025
3876
|
};
|
|
4026
3877
|
};
|
|
4027
|
-
type
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
timestamp: number;
|
|
4041
|
-
}) => void;
|
|
4042
|
-
['poorConnection']: (payload: {
|
|
4043
|
-
participantId: string;
|
|
4044
|
-
score: number;
|
|
4045
|
-
kind: string;
|
|
4046
|
-
}) => void;
|
|
4047
|
-
['pageChanged']: (payload: {
|
|
4048
|
-
viewMode: string;
|
|
4049
|
-
currentPage: number;
|
|
4050
|
-
pageCount: number;
|
|
4051
|
-
}) => void;
|
|
4052
|
-
['mediaScoreUpdate']: (payload: {
|
|
4053
|
-
kind: string;
|
|
4054
|
-
isScreenshare: boolean;
|
|
4055
|
-
score: number;
|
|
4056
|
-
participantId: string;
|
|
4057
|
-
scoreStats: ConsumerScoreStats;
|
|
4058
|
-
}) => void;
|
|
4059
|
-
['media_decode_error']: (payload: {
|
|
4060
|
-
reason: string;
|
|
4061
|
-
code: '1702' | '1703';
|
|
4062
|
-
}) => void;
|
|
4063
|
-
['*']: (event: string, ...args: any[]) => void;
|
|
3878
|
+
type ScreenshareQualityConstraints = {
|
|
3879
|
+
width?: {
|
|
3880
|
+
max: number;
|
|
3881
|
+
};
|
|
3882
|
+
height?: {
|
|
3883
|
+
max: number;
|
|
3884
|
+
};
|
|
3885
|
+
frameRate?: {
|
|
3886
|
+
ideal: number;
|
|
3887
|
+
max: number;
|
|
3888
|
+
};
|
|
3889
|
+
displaySurface?: 'window' | 'monitor' | 'browser';
|
|
3890
|
+
selfBrowserSurface?: 'include' | 'exclude';
|
|
4064
3891
|
};
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
3892
|
+
interface ClientMediaTrackConstraints extends MediaTrackConstraints {
|
|
3893
|
+
optional?: Array<object>;
|
|
3894
|
+
}
|
|
3895
|
+
interface ClientMediaStreamConstraints extends MediaStreamConstraints {
|
|
3896
|
+
audio?: boolean | ClientMediaTrackConstraints;
|
|
3897
|
+
}
|
|
3898
|
+
type MediaConstraints = {
|
|
3899
|
+
audio?: AudioQualityConstraints;
|
|
3900
|
+
video?: MediaVideoQualityType | VideoQualityConstraints;
|
|
3901
|
+
screenshare?: ScreenshareQualityConstraints;
|
|
3902
|
+
};
|
|
3903
|
+
|
|
3904
|
+
type PresetV2CamelCased = {
|
|
3905
|
+
config: {
|
|
3906
|
+
viewType: ViewType;
|
|
3907
|
+
media: {
|
|
3908
|
+
audio: {
|
|
3909
|
+
enableStereo: boolean;
|
|
3910
|
+
enableHighBitrate: boolean;
|
|
3911
|
+
};
|
|
3912
|
+
video: {
|
|
3913
|
+
quality: MediaVideoQualityType;
|
|
3914
|
+
frameRate: number;
|
|
3915
|
+
};
|
|
3916
|
+
screenshare: {
|
|
3917
|
+
quality: MediaScreenShareQualityType;
|
|
3918
|
+
frameRate: number;
|
|
3919
|
+
};
|
|
3920
|
+
};
|
|
3921
|
+
livestreamViewerQualities: LivestreamViewerMediaQualityType[];
|
|
3922
|
+
maxVideoStreams: {
|
|
3923
|
+
mobile: number;
|
|
3924
|
+
desktop: number;
|
|
3925
|
+
};
|
|
3926
|
+
maxScreenshareCount: number;
|
|
3927
|
+
};
|
|
3928
|
+
permissions: {
|
|
3929
|
+
acceptWaitingRequests: boolean;
|
|
3930
|
+
canAcceptProductionRequests: boolean;
|
|
3931
|
+
canEditDisplayName: boolean;
|
|
3932
|
+
canRecord: boolean;
|
|
3933
|
+
canLivestream: boolean;
|
|
3934
|
+
canSpotlight?: boolean;
|
|
3935
|
+
disableParticipantAudio: boolean;
|
|
3936
|
+
disableParticipantScreensharing: boolean;
|
|
3937
|
+
disableParticipantVideo: boolean;
|
|
3938
|
+
kickParticipant: boolean;
|
|
3939
|
+
pinParticipant: boolean;
|
|
3940
|
+
plugins: {
|
|
3941
|
+
canClose: boolean;
|
|
3942
|
+
canStart: boolean;
|
|
3943
|
+
canEditConfig?: boolean;
|
|
3944
|
+
config: {
|
|
3945
|
+
[pluginId: string]: Partial<{
|
|
3946
|
+
accessControl: PluginAccessControls.FULL_ACCESS | PluginAccessControls.VIEW_ONLY;
|
|
3947
|
+
disabled: boolean;
|
|
3948
|
+
handlesViewOnly: boolean;
|
|
3949
|
+
}>;
|
|
3950
|
+
};
|
|
3951
|
+
};
|
|
3952
|
+
waitingRoomType: WaitingRoomTypes;
|
|
3953
|
+
polls: {
|
|
3954
|
+
canCreate: boolean;
|
|
3955
|
+
canVote: boolean;
|
|
3956
|
+
canView: boolean;
|
|
3957
|
+
};
|
|
3958
|
+
media: {
|
|
3959
|
+
video: {
|
|
3960
|
+
canProduce: MediaProductionPermissionType;
|
|
3961
|
+
};
|
|
3962
|
+
audio: {
|
|
3963
|
+
canProduce: MediaProductionPermissionType;
|
|
3964
|
+
};
|
|
3965
|
+
screenshare: {
|
|
3966
|
+
canProduce: MediaProductionPermissionType;
|
|
3967
|
+
};
|
|
3968
|
+
};
|
|
3969
|
+
chat: {
|
|
3970
|
+
public: {
|
|
3971
|
+
canSend: boolean;
|
|
3972
|
+
text: boolean;
|
|
3973
|
+
files: boolean;
|
|
3974
|
+
};
|
|
3975
|
+
private?: {
|
|
3976
|
+
canSend: boolean;
|
|
3977
|
+
canReceive: boolean;
|
|
3978
|
+
text: boolean;
|
|
3979
|
+
files: boolean;
|
|
3980
|
+
};
|
|
3981
|
+
channel?: {
|
|
3982
|
+
canCreate: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
|
|
3983
|
+
canDelete: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
|
|
3984
|
+
canUpdate: 'NONE' | 'PRIVATE' | 'PUBLIC' | 'ALL';
|
|
3985
|
+
canReadAll: boolean;
|
|
3986
|
+
};
|
|
3987
|
+
message?: {
|
|
3988
|
+
canDelete: 'NONE' | 'SELF' | 'ALL';
|
|
3989
|
+
canEdit: 'NONE' | 'SELF' | 'ALL';
|
|
3990
|
+
deleteCutoffTimeSeconds: number;
|
|
3991
|
+
editCutoffTimeSeconds: number;
|
|
3992
|
+
};
|
|
3993
|
+
};
|
|
3994
|
+
isRecorder?: boolean;
|
|
3995
|
+
recorderType: RecorderType$1;
|
|
3996
|
+
hiddenParticipant: boolean;
|
|
3997
|
+
showParticipantList: boolean;
|
|
3998
|
+
canChangeParticipantPermissions: boolean;
|
|
3999
|
+
connectedMeetings: {
|
|
4000
|
+
canAlterConnectedMeetings: boolean;
|
|
4001
|
+
canSwitchConnectedMeetings: boolean;
|
|
4002
|
+
canSwitchToParentMeeting: boolean;
|
|
4003
|
+
};
|
|
4004
|
+
acceptStageRequests?: boolean;
|
|
4005
|
+
stageEnabled?: boolean;
|
|
4006
|
+
stageAccess?: MediaProductionPermissionType;
|
|
4007
|
+
transcriptionEnabled: boolean;
|
|
4077
4008
|
};
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4009
|
+
ui: {
|
|
4010
|
+
designTokens: {
|
|
4011
|
+
borderRadius: BorderRadius;
|
|
4012
|
+
borderWidth: BorderWidth;
|
|
4013
|
+
colors: {
|
|
4014
|
+
brand: {
|
|
4015
|
+
300: string;
|
|
4016
|
+
400: string;
|
|
4017
|
+
500: string;
|
|
4018
|
+
600: string;
|
|
4019
|
+
700: string;
|
|
4020
|
+
};
|
|
4021
|
+
background: {
|
|
4022
|
+
600: string;
|
|
4023
|
+
700: string;
|
|
4024
|
+
800: string;
|
|
4025
|
+
900: string;
|
|
4026
|
+
1000: string;
|
|
4027
|
+
};
|
|
4028
|
+
danger: string;
|
|
4029
|
+
success: string;
|
|
4030
|
+
textOnBrand: string;
|
|
4031
|
+
text: string;
|
|
4032
|
+
videoBg: string;
|
|
4033
|
+
warning: string;
|
|
4034
|
+
};
|
|
4035
|
+
fontFamily?: string;
|
|
4036
|
+
googleFont?: string;
|
|
4037
|
+
logo?: string;
|
|
4038
|
+
spacingBase: number;
|
|
4039
|
+
theme: Theme;
|
|
4040
|
+
};
|
|
4041
|
+
configDiff: any;
|
|
4081
4042
|
};
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
constructor(
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
id: string;
|
|
4111
|
-
userId: string;
|
|
4112
|
-
name: string;
|
|
4113
|
-
displayName: string;
|
|
4114
|
-
stageType: StageStatus;
|
|
4115
|
-
customParticipantId: string;
|
|
4116
|
-
presetId: string;
|
|
4117
|
-
picture: string;
|
|
4118
|
-
waitlisted: boolean;
|
|
4119
|
-
stageStatus: StageStatus;
|
|
4120
|
-
metadata: {
|
|
4121
|
-
preset_name: string;
|
|
4043
|
+
version?: string;
|
|
4044
|
+
id?: string;
|
|
4045
|
+
name?: string;
|
|
4046
|
+
};
|
|
4047
|
+
type MaxVideoStreams = PresetV2CamelCased['config']['maxVideoStreams'];
|
|
4048
|
+
declare class ThemePreset {
|
|
4049
|
+
private constructor();
|
|
4050
|
+
static fromResponse(preset: PresetV2CamelCased): ThemePreset;
|
|
4051
|
+
static default(): ThemePreset;
|
|
4052
|
+
static init(preset?: PresetV2CamelCased, useDefault?: boolean): ThemePreset;
|
|
4053
|
+
get setupScreen(): Readonly<{
|
|
4054
|
+
isEnabled: boolean;
|
|
4055
|
+
}>;
|
|
4056
|
+
get waitingRoom(): Readonly<{
|
|
4057
|
+
isEnabled: boolean;
|
|
4058
|
+
}>;
|
|
4059
|
+
get controlBar(): Readonly<{
|
|
4060
|
+
isEnabled: boolean;
|
|
4061
|
+
elements?: {
|
|
4062
|
+
chat?: boolean;
|
|
4063
|
+
fullscreen?: boolean;
|
|
4064
|
+
invite?: boolean;
|
|
4065
|
+
layout?: boolean;
|
|
4066
|
+
participants?: boolean;
|
|
4067
|
+
plugins?: boolean;
|
|
4068
|
+
polls?: boolean;
|
|
4069
|
+
reactions?: boolean;
|
|
4070
|
+
screenshare?: boolean;
|
|
4122
4071
|
};
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4072
|
+
}>;
|
|
4073
|
+
get header(): Readonly<{
|
|
4074
|
+
isEnabled: boolean;
|
|
4075
|
+
elements: {
|
|
4076
|
+
logo: string;
|
|
4077
|
+
timer: boolean;
|
|
4078
|
+
title: boolean;
|
|
4079
|
+
participantCount: boolean;
|
|
4080
|
+
changeLayout: boolean;
|
|
4128
4081
|
};
|
|
4129
|
-
}
|
|
4130
|
-
|
|
4131
|
-
|
|
4082
|
+
}>;
|
|
4083
|
+
get pipMode(): Readonly<boolean>;
|
|
4084
|
+
get viewType(): Readonly<ViewType>;
|
|
4085
|
+
get livestreamViewerQualities(): Readonly<LivestreamViewerMediaQualityType[]>;
|
|
4086
|
+
get maxVideoStreams(): Readonly<MaxVideoStreams>;
|
|
4087
|
+
get maxScreenShareCount(): Readonly<number>;
|
|
4088
|
+
get plugins(): Readonly<string[]>;
|
|
4089
|
+
get disabledPlugins(): Readonly<string[]>;
|
|
4090
|
+
get designTokens(): Readonly<PresetV2CamelCased['ui']['designTokens']>;
|
|
4091
|
+
get configDiff(): Readonly<PresetV2CamelCased['ui']['configDiff']>;
|
|
4092
|
+
get mediaConstraints(): Readonly<PresetMediaConstraints>;
|
|
4093
|
+
get name(): string;
|
|
4132
4094
|
}
|
|
4133
4095
|
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4096
|
+
type PresetPermissions = PresetV2CamelCased['permissions'];
|
|
4097
|
+
type PermissionEvents = {
|
|
4098
|
+
['chatUpdate']: () => void;
|
|
4099
|
+
['pollsUpdate']: () => void;
|
|
4100
|
+
['pluginsUpdate']: () => void;
|
|
4101
|
+
['permissionsUpdate']: (patch: PresetUpdates) => void;
|
|
4102
|
+
['*']: () => void;
|
|
4103
|
+
};
|
|
4104
|
+
declare class PermissionPreset extends TypedEventEmitter$1<PermissionEvents> {
|
|
4105
|
+
private constructor();
|
|
4106
|
+
private setupEvents;
|
|
4107
|
+
static fromResponse(response: PresetPermissions, viewType: ViewType, context: Context<ContextState>): PermissionPreset;
|
|
4108
|
+
static default(context: Context<ContextState>, viewType: ViewType): PermissionPreset;
|
|
4109
|
+
static init(context: Context<ContextState>, viewType: ViewType, response?: PresetPermissions): PermissionPreset;
|
|
4110
|
+
get mediaRoomType(): string;
|
|
4111
|
+
get stageEnabled(): Readonly<boolean>;
|
|
4112
|
+
get acceptStageRequests(): Readonly<boolean>;
|
|
4113
|
+
get stageAccess(): Readonly<MediaProductionPermissionType>;
|
|
4114
|
+
get acceptWaitingRequests(): Readonly<boolean>;
|
|
4115
|
+
get requestProduceVideo(): Readonly<boolean>;
|
|
4116
|
+
get requestProduceAudio(): Readonly<boolean>;
|
|
4117
|
+
get requestProduceScreenshare(): Readonly<boolean>;
|
|
4118
|
+
get canAllowParticipantAudio(): Readonly<boolean>;
|
|
4119
|
+
get canAllowParticipantScreensharing(): Readonly<boolean>;
|
|
4120
|
+
get canAllowParticipantVideo(): Readonly<boolean>;
|
|
4121
|
+
get canDisableParticipantAudio(): Readonly<boolean>;
|
|
4122
|
+
get canDisableParticipantVideo(): Readonly<boolean>;
|
|
4123
|
+
get kickParticipant(): Readonly<boolean>;
|
|
4124
|
+
get pinParticipant(): Readonly<boolean>;
|
|
4125
|
+
get canRecord(): Readonly<boolean>;
|
|
4126
|
+
get waitingRoomType(): Readonly<WaitingRoomTypes>;
|
|
4127
|
+
get waitingRoomBehaviour(): Readonly<WaitingRoomTypes>;
|
|
4128
|
+
get plugins(): Readonly<PresetPermissions['plugins']>;
|
|
4129
|
+
get polls(): Readonly<PresetPermissions['polls']>;
|
|
4130
|
+
get produceVideo(): Readonly<MediaProductionPermissionType>;
|
|
4131
|
+
get requestProduce(): Readonly<boolean>;
|
|
4132
|
+
get canProduceVideo(): Readonly<MediaProductionPermissionType>;
|
|
4133
|
+
get produceScreenshare(): Readonly<MediaProductionPermissionType>;
|
|
4134
|
+
get canProduceScreenshare(): Readonly<MediaProductionPermissionType>;
|
|
4135
|
+
get produceAudio(): Readonly<MediaProductionPermissionType>;
|
|
4136
|
+
get canProduceAudio(): Readonly<MediaProductionPermissionType>;
|
|
4137
|
+
get chatPublic(): Readonly<PresetPermissions['chat']['public']>;
|
|
4138
|
+
get chatPrivate(): Readonly<PresetPermissions['chat']['private']>;
|
|
4139
|
+
get chatChannel(): Readonly<PresetPermissions['chat']['channel']>;
|
|
4140
|
+
get chatMessage(): Readonly<PresetPermissions['chat']['message']>;
|
|
4141
|
+
get connectedMeetings(): Readonly<PresetPermissions['connectedMeetings']>;
|
|
4142
|
+
get hiddenParticipant(): Readonly<boolean>;
|
|
4143
|
+
get showParticipantList(): Readonly<boolean>;
|
|
4144
|
+
get canChangeParticipantRole(): Readonly<boolean>;
|
|
4145
|
+
get canChangeParticipantPermissions(): Readonly<boolean>;
|
|
4146
|
+
get canChangeTheme(): Readonly<boolean>;
|
|
4147
|
+
get canPresent(): Readonly<boolean>;
|
|
4148
|
+
get acceptPresentRequests(): Readonly<boolean>;
|
|
4149
|
+
get canEditDisplayName(): Readonly<boolean>;
|
|
4150
|
+
get maxScreenShareCount(): Readonly<number>;
|
|
4151
|
+
get isRecorder(): Readonly<boolean>;
|
|
4152
|
+
get canSpotlight(): Readonly<boolean>;
|
|
4153
|
+
get canLivestream(): Readonly<boolean>;
|
|
4154
|
+
get transcriptionEnabled(): Readonly<boolean>;
|
|
4145
4155
|
}
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
headers: Record<string, string>;
|
|
4151
|
-
config: FetchRequestConfig;
|
|
4156
|
+
|
|
4157
|
+
interface UserDetailsResponseV2 {
|
|
4158
|
+
participant: UserDetailsResponse;
|
|
4159
|
+
preset: PresetV2CamelCased;
|
|
4152
4160
|
}
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4161
|
+
type LeaveRoomState = 'kicked' | 'ended' | 'left' | 'rejected' | 'connected-meeting' | 'disconnected' | 'failed' | 'stageLeft';
|
|
4162
|
+
declare class SelfController {
|
|
4163
|
+
readonly self: Self;
|
|
4164
|
+
readonly authToken: string;
|
|
4165
|
+
get peerId(): string;
|
|
4166
|
+
viewType: ViewType;
|
|
4167
|
+
get telemetry(): Telemetry;
|
|
4168
|
+
get logger(): Logger;
|
|
4169
|
+
get mediaJoined(): boolean;
|
|
4170
|
+
private constructor();
|
|
4171
|
+
static init(context: Context<ContextState>, roomSocketHandler: RoomSocketHandler, participant: UserDetailsResponseV2['participant'], permissions: PermissionPreset, theme: ThemePreset): Promise<SelfController>;
|
|
4172
|
+
shareMediaTracks(): Promise<void>;
|
|
4173
|
+
private kickHandler;
|
|
4174
|
+
private waitlistedHandler;
|
|
4175
|
+
private waitlistAcceptHandler;
|
|
4176
|
+
private waitlistRejectedHandler;
|
|
4177
|
+
resetSelf(shouldAutoJoin: boolean): Promise<void>;
|
|
4178
|
+
private setupEvents;
|
|
4179
|
+
joinRoom(reconnected?: boolean): Promise<void>;
|
|
4180
|
+
leaveRoom(state?: LeaveRoomState): Promise<void>;
|
|
4181
|
+
private joinMediaRoom;
|
|
4182
|
+
private leaveMediaRoom;
|
|
4183
|
+
private cleanupSelf;
|
|
4174
4184
|
}
|
|
4175
4185
|
|
|
4176
4186
|
type LivestreamState = 'IDLE' | 'STARTING' | 'WAITING_ON_MANUAL_INGESTION' | 'LIVESTREAMING' | 'STOPPING';
|
|
@@ -4192,22 +4202,23 @@ type LivestreamResponse = {
|
|
|
4192
4202
|
manualIngest: boolean;
|
|
4193
4203
|
ingestionCredentials?: LivestreamIngestionCredentials;
|
|
4194
4204
|
};
|
|
4195
|
-
declare class
|
|
4205
|
+
declare class Livestream extends TypedEventEmitter$1<LivestreamEvents> {
|
|
4196
4206
|
state: LivestreamState;
|
|
4197
4207
|
playbackUrl: string | undefined;
|
|
4198
4208
|
ingestionCredentials: LivestreamIngestionCredentials;
|
|
4199
4209
|
viewerCount: number;
|
|
4200
|
-
get telemetry():
|
|
4201
|
-
constructor(context: Context<
|
|
4210
|
+
get telemetry(): Telemetry;
|
|
4211
|
+
constructor(context: Context<ContextState>, self: Self);
|
|
4202
4212
|
setLivestreamState(livestreamState: LivestreamState): void;
|
|
4213
|
+
private emitCurrentLivestreamState;
|
|
4203
4214
|
start(livestreamConfig?: StartLivestreamConfig): Promise<void>;
|
|
4204
4215
|
stop(): Promise<void>;
|
|
4205
4216
|
}
|
|
4206
4217
|
|
|
4207
4218
|
type PluginSocketMessage = DisablePluginResponse | EnablePluginResponse | PluginEventResponse | PluginStoreResponse | SendChatMessageToPeersResponse | SendChatMessageToRoomResponse;
|
|
4208
4219
|
declare class PluginSocketHandler {
|
|
4209
|
-
constructor(context: Context<
|
|
4210
|
-
get logger():
|
|
4220
|
+
constructor(context: Context<ContextState>, socketService: SocketService);
|
|
4221
|
+
get logger(): Logger;
|
|
4211
4222
|
addPlugin(pluginId: string, staggered: boolean): void;
|
|
4212
4223
|
removePlugin(pluginId: string): void;
|
|
4213
4224
|
getActivePlugins(): Promise<EnablePluginsResponse>;
|
|
@@ -4233,7 +4244,7 @@ declare class PluginSocketHandler {
|
|
|
4233
4244
|
on(event: number, handler: (socketMessage: PluginSocketMessage, messageId?: string) => void): void;
|
|
4234
4245
|
}
|
|
4235
4246
|
|
|
4236
|
-
interface
|
|
4247
|
+
interface PluginResponse {
|
|
4237
4248
|
baseURL: string;
|
|
4238
4249
|
createdAt: string;
|
|
4239
4250
|
description: string;
|
|
@@ -4315,7 +4326,7 @@ type _string = string & {
|
|
|
4315
4326
|
_?: any;
|
|
4316
4327
|
};
|
|
4317
4328
|
type PluginEvents$1 = keyof typeof PluginEventKeys | _string;
|
|
4318
|
-
declare class
|
|
4329
|
+
declare class Plugin extends CustomEventEmitter<PluginEvents$1> {
|
|
4319
4330
|
readonly baseURL: string;
|
|
4320
4331
|
readonly createdAt: Date;
|
|
4321
4332
|
readonly description: string;
|
|
@@ -4336,12 +4347,14 @@ declare class RTKPlugin$1 extends RTKEventEmitter<PluginEvents$1> {
|
|
|
4336
4347
|
listener?: (message: MessageEvent) => void;
|
|
4337
4348
|
}>;
|
|
4338
4349
|
enabledBy: string;
|
|
4339
|
-
get telemetry():
|
|
4340
|
-
constructor(context: Context<
|
|
4350
|
+
get telemetry(): Telemetry;
|
|
4351
|
+
constructor(context: Context<ContextState>, { baseURL, createdAt, description, id, name, organizationId, picture, private: isPrivate, published, staggered, tags, type, updatedAt, }: PluginResponse, pluginSocketHandler: PluginSocketHandler, self: Self, participants: Participants, chat: Readonly<Chat>, meetingTitle: string);
|
|
4341
4352
|
sendIframeEvent(message: PluginIframeMessage): void;
|
|
4353
|
+
private handleIframeMessage;
|
|
4342
4354
|
sendData(payload: SendDataOptions): void;
|
|
4343
4355
|
removePluginView(viewId?: string): void;
|
|
4344
4356
|
addPluginView(iframe: HTMLIFrameElement | ReactNativeWebView, viewId?: string): void;
|
|
4357
|
+
private setActive;
|
|
4345
4358
|
activateForSelf(): Promise<void>;
|
|
4346
4359
|
deactivateForSelf(): void;
|
|
4347
4360
|
enable(): Promise<void>;
|
|
@@ -4364,12 +4377,12 @@ interface ReactNativeFile {
|
|
|
4364
4377
|
type: string;
|
|
4365
4378
|
}
|
|
4366
4379
|
declare class APIClient extends API {
|
|
4367
|
-
telemetry:
|
|
4368
|
-
constructor(context: Context<
|
|
4380
|
+
telemetry: Telemetry;
|
|
4381
|
+
constructor(context: Context<ContextState>, options?: APIOptions);
|
|
4369
4382
|
getIPDetails(): Promise<any>;
|
|
4370
4383
|
getICEServers(): Promise<any>;
|
|
4371
4384
|
getPlugins(): Promise<any[]>;
|
|
4372
|
-
getPluginDetails(pluginId: string): Promise<
|
|
4385
|
+
getPluginDetails(pluginId: string): Promise<PluginResponse>;
|
|
4373
4386
|
getPluginConfig(pluginBaseUrl: string): Promise<PluginConfig>;
|
|
4374
4387
|
authorizePlugin(pluginId: string): Promise<string>;
|
|
4375
4388
|
getPresignedUrls(filename: string, viewType: string): Promise<{
|
|
@@ -4489,13 +4502,17 @@ type ChatEvents = {
|
|
|
4489
4502
|
['channelUpdate']: (channel?: ChatChannel) => void;
|
|
4490
4503
|
['*']: (event: string, ...args: any[]) => void;
|
|
4491
4504
|
};
|
|
4492
|
-
declare class
|
|
4505
|
+
declare class Chat extends TypedEventEmitter$1<ChatEvents> {
|
|
4493
4506
|
messages: Message[];
|
|
4494
4507
|
channels: ChatChannel[];
|
|
4495
4508
|
maxTextLimit: number;
|
|
4496
|
-
get telemetry():
|
|
4509
|
+
get telemetry(): Telemetry;
|
|
4497
4510
|
setMaxTextLimit(limit: number): void;
|
|
4498
|
-
constructor(context: Context<
|
|
4511
|
+
constructor(context: Context<ContextState>, chatSocketHandler: ChatSocketHandler, chatChannelSocketHandler: ChatChannelSocketHandler, self: Self, participants: Participants);
|
|
4512
|
+
private sendMessageInternal;
|
|
4513
|
+
private sendTextMessageInternal;
|
|
4514
|
+
private sendImageMessageInternal;
|
|
4515
|
+
private sendFileMessageInternal;
|
|
4499
4516
|
get rateLimits(): {
|
|
4500
4517
|
maxInvocations: number;
|
|
4501
4518
|
period: number;
|
|
@@ -4528,16 +4545,16 @@ declare class RTKChat$1 extends RTKTypedEventEmitter<ChatEvents> {
|
|
|
4528
4545
|
sendMessageToChannel(message: MessagePayload, channelId: string, options?: {
|
|
4529
4546
|
replyTo?: Message;
|
|
4530
4547
|
}): Promise<void>;
|
|
4531
|
-
getChannelMembers(channelId: string): Promise<
|
|
4548
|
+
getChannelMembers(channelId: string): Promise<BasicParticipant[]>;
|
|
4532
4549
|
searchMessages(query: string, filters?: SearchFilters): Promise<Message[]>;
|
|
4533
4550
|
markLastReadMessage(channelId: string, message: Message): Promise<void>;
|
|
4534
4551
|
get pinned(): Message[];
|
|
4535
4552
|
}
|
|
4536
4553
|
|
|
4537
4554
|
declare class PollSocketHandler {
|
|
4538
|
-
get logger():
|
|
4539
|
-
get telemetry():
|
|
4540
|
-
constructor(context: Context<
|
|
4555
|
+
get logger(): Logger;
|
|
4556
|
+
get telemetry(): Telemetry;
|
|
4557
|
+
constructor(context: Context<ContextState>, socketService: SocketService);
|
|
4541
4558
|
getPolls(): Promise<{
|
|
4542
4559
|
id: string;
|
|
4543
4560
|
payload: Uint8Array;
|
|
@@ -4573,16 +4590,16 @@ type PollsEvents = {
|
|
|
4573
4590
|
}) => void;
|
|
4574
4591
|
['*']: (eventName: string, ...args: any[]) => void;
|
|
4575
4592
|
};
|
|
4576
|
-
declare class
|
|
4593
|
+
declare class Polls extends TypedEventEmitter$1<PollsEvents> {
|
|
4577
4594
|
items: Poll[];
|
|
4578
|
-
constructor(context: Context<
|
|
4595
|
+
constructor(context: Context<ContextState>, self: Self, pollSocketHandler: PollSocketHandler);
|
|
4579
4596
|
create(question: string, options: string[], anonymous?: boolean, hideVotes?: boolean): Promise<void>;
|
|
4580
4597
|
vote(id: string, index: number): Promise<void>;
|
|
4581
4598
|
}
|
|
4582
4599
|
|
|
4583
4600
|
type PluginMapEvents = {
|
|
4584
|
-
['pluginAdded']: (plugin:
|
|
4585
|
-
['pluginDeleted']: (plugin:
|
|
4601
|
+
['pluginAdded']: (plugin: Plugin) => void;
|
|
4602
|
+
['pluginDeleted']: (plugin: Plugin) => void;
|
|
4586
4603
|
};
|
|
4587
4604
|
type PluginEvents = {
|
|
4588
4605
|
['stateUpdate']: (payload: {
|
|
@@ -4597,16 +4614,89 @@ type PluginEvents = {
|
|
|
4597
4614
|
['enabled']: () => void;
|
|
4598
4615
|
['*']: (eventName: string, ...args: any[]) => void;
|
|
4599
4616
|
};
|
|
4600
|
-
declare class
|
|
4601
|
-
constructor(logger:
|
|
4617
|
+
declare class PluginMap<T extends Plugin = Plugin> extends ClientMap<PluginEvents, T, PluginMapEvents> {
|
|
4618
|
+
constructor(logger: Logger);
|
|
4602
4619
|
add(plugin: T, emitEvent?: boolean): this;
|
|
4603
4620
|
delete(pluginId: string, emitEvent?: boolean, removeListeners?: boolean): boolean;
|
|
4604
4621
|
}
|
|
4605
4622
|
|
|
4606
|
-
declare class
|
|
4607
|
-
readonly all:
|
|
4608
|
-
readonly active:
|
|
4609
|
-
constructor(logger:
|
|
4623
|
+
declare class Plugins {
|
|
4624
|
+
readonly all: PluginMap;
|
|
4625
|
+
readonly active: PluginMap;
|
|
4626
|
+
constructor(logger: Logger);
|
|
4627
|
+
}
|
|
4628
|
+
|
|
4629
|
+
declare class SelfMedia extends TypedEventEmitter$1<SelfEvents> {
|
|
4630
|
+
protected localMediaHandler: LocalMediaHandler;
|
|
4631
|
+
protected updatePermission(): Promise<void>;
|
|
4632
|
+
protected populateMediaPermissionsInCallstats({ message, kind, }: {
|
|
4633
|
+
message: keyof typeof MediaPermission;
|
|
4634
|
+
kind: 'audio' | 'video' | 'screenshare';
|
|
4635
|
+
}): Promise<void>;
|
|
4636
|
+
get peerId(): string;
|
|
4637
|
+
init(options?: {
|
|
4638
|
+
video?: boolean;
|
|
4639
|
+
audio?: boolean;
|
|
4640
|
+
constraints?: MediaConstraints;
|
|
4641
|
+
}, skipAwaits?: boolean, context?: Context<ContextState>): Promise<void>;
|
|
4642
|
+
set context(context: Context<ContextState>);
|
|
4643
|
+
get audioTrack(): MediaStreamTrack;
|
|
4644
|
+
get rawAudioTrack(): MediaStreamTrack;
|
|
4645
|
+
get mediaPermissions(): {
|
|
4646
|
+
audio?: MediaPermission$1;
|
|
4647
|
+
video?: MediaPermission$1;
|
|
4648
|
+
screenshare?: MediaPermission$1;
|
|
4649
|
+
};
|
|
4650
|
+
addAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<{
|
|
4651
|
+
success: boolean;
|
|
4652
|
+
message: string;
|
|
4653
|
+
}>;
|
|
4654
|
+
removeAudioMiddleware(audioMiddleware: AudioMiddleware): Promise<{
|
|
4655
|
+
success: boolean;
|
|
4656
|
+
message: string;
|
|
4657
|
+
}>;
|
|
4658
|
+
removeAllAudioMiddlewares(): Promise<{
|
|
4659
|
+
success: boolean;
|
|
4660
|
+
message: string;
|
|
4661
|
+
}>;
|
|
4662
|
+
get videoTrack(): MediaStreamTrack;
|
|
4663
|
+
get rawVideoTrack(): MediaStreamTrack;
|
|
4664
|
+
addVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<{
|
|
4665
|
+
success: boolean;
|
|
4666
|
+
message: string;
|
|
4667
|
+
}>;
|
|
4668
|
+
setVideoMiddlewareGlobalConfig(config?: VideoMiddlewareGlobalConfig): Promise<void>;
|
|
4669
|
+
removeVideoMiddleware(videoMiddleware: VideoMiddleware): Promise<{
|
|
4670
|
+
success: boolean;
|
|
4671
|
+
message: string;
|
|
4672
|
+
}>;
|
|
4673
|
+
removeAllVideoMiddlewares(): Promise<{
|
|
4674
|
+
success: boolean;
|
|
4675
|
+
message: string;
|
|
4676
|
+
}>;
|
|
4677
|
+
get screenShareTracks(): {
|
|
4678
|
+
audio: MediaStreamTrack;
|
|
4679
|
+
video: MediaStreamTrack;
|
|
4680
|
+
};
|
|
4681
|
+
get audioEnabled(): boolean;
|
|
4682
|
+
get videoEnabled(): boolean;
|
|
4683
|
+
get screenShareEnabled(): boolean;
|
|
4684
|
+
enableAudio(): Promise<void>;
|
|
4685
|
+
enableVideo(): Promise<void>;
|
|
4686
|
+
disableAudio(): Promise<void>;
|
|
4687
|
+
enableScreenShare(): Promise<void>;
|
|
4688
|
+
disableScreenShare(): Promise<void>;
|
|
4689
|
+
disableVideo(): Promise<void>;
|
|
4690
|
+
getCurrentDevices(): {
|
|
4691
|
+
audio: MediaDeviceInfo;
|
|
4692
|
+
video: MediaDeviceInfo;
|
|
4693
|
+
speaker: MediaDeviceInfo;
|
|
4694
|
+
};
|
|
4695
|
+
getAudioDevices(): Promise<MediaDeviceInfo[]>;
|
|
4696
|
+
getVideoDevices(): Promise<MediaDeviceInfo[]>;
|
|
4697
|
+
getSpeakerDevices(): Promise<MediaDeviceInfo[]>;
|
|
4698
|
+
getDeviceById(deviceId: string, kind: 'audio' | 'video' | 'speaker'): Promise<MediaDeviceInfo>;
|
|
4699
|
+
setDevice(device: MediaDeviceInfo): Promise<void>;
|
|
4610
4700
|
}
|
|
4611
4701
|
|
|
4612
4702
|
type RecordingState = 'IDLE' | 'STARTING' | 'RECORDING' | 'PAUSED' | 'STOPPING';
|
|
@@ -4620,12 +4710,12 @@ type RecordingEvents = {
|
|
|
4620
4710
|
['recordingUpdate']: (state: RecordingState) => void;
|
|
4621
4711
|
['*']: (eventName: string, ...args: any[]) => void;
|
|
4622
4712
|
};
|
|
4623
|
-
declare class
|
|
4713
|
+
declare class Recording extends TypedEventEmitter$1<RecordingEvents> {
|
|
4624
4714
|
recordingPeerIds: string[];
|
|
4625
4715
|
get recordingState(): RecordingState;
|
|
4626
4716
|
recordings: RecordingInfo[];
|
|
4627
|
-
constructor(context: Context<
|
|
4628
|
-
get telemetry():
|
|
4717
|
+
constructor(context: Context<ContextState>, self: Self);
|
|
4718
|
+
get telemetry(): Telemetry;
|
|
4629
4719
|
updateRecordings(recordings: RecordingInfo[]): void;
|
|
4630
4720
|
start(opts?: {
|
|
4631
4721
|
allowMultiple: boolean;
|
|
@@ -4694,28 +4784,32 @@ declare class BrowserCapabilities extends BrowserDetection {
|
|
|
4694
4784
|
isIOSMobile(): boolean;
|
|
4695
4785
|
}
|
|
4696
4786
|
|
|
4697
|
-
declare class
|
|
4698
|
-
constructor(context: Context<
|
|
4787
|
+
declare class Features {
|
|
4788
|
+
constructor(context: Context<ContextState>);
|
|
4699
4789
|
hasFeature(featureName: string): boolean;
|
|
4700
|
-
getFeatureValue(featureName: string): _dyteinternals_utils.
|
|
4790
|
+
getFeatureValue(featureName: string): _dyteinternals_utils.DyteFlagValues;
|
|
4701
4791
|
getAllFeatures(): {
|
|
4702
|
-
|
|
4703
|
-
|
|
4792
|
+
[x: string]: _dyteinternals_utils.DyteFlagsEntry;
|
|
4793
|
+
};
|
|
4704
4794
|
}
|
|
4705
4795
|
|
|
4706
|
-
declare class
|
|
4707
|
-
logger:
|
|
4708
|
-
features:
|
|
4796
|
+
declare class Internals {
|
|
4797
|
+
logger: Logger;
|
|
4798
|
+
features: Features;
|
|
4709
4799
|
browserSpecs: BrowserCapabilities;
|
|
4710
4800
|
callStats: InhouseCallStats;
|
|
4711
|
-
constructor(logger:
|
|
4712
|
-
static init(context: Context<
|
|
4801
|
+
constructor(logger: Logger, features: Features, callStats: InhouseCallStats);
|
|
4802
|
+
static init(context: Context<ContextState>): Internals;
|
|
4713
4803
|
}
|
|
4714
4804
|
|
|
4715
4805
|
type StoreData = {
|
|
4716
4806
|
[type: string]: any;
|
|
4717
4807
|
};
|
|
4718
|
-
|
|
4808
|
+
type RateLimitConfig = {
|
|
4809
|
+
maxInvocations: number;
|
|
4810
|
+
period: number;
|
|
4811
|
+
};
|
|
4812
|
+
declare class Store {
|
|
4719
4813
|
name: string;
|
|
4720
4814
|
rateLimitConfig: {
|
|
4721
4815
|
maxInvocations: number;
|
|
@@ -4725,12 +4819,14 @@ declare class RTKStore$1 {
|
|
|
4725
4819
|
maxInvocations: number;
|
|
4726
4820
|
period: number;
|
|
4727
4821
|
};
|
|
4822
|
+
private listeners;
|
|
4728
4823
|
constructor({ name, socketHandler, meetingId }: {
|
|
4729
4824
|
name: string;
|
|
4730
4825
|
socketHandler: PluginSocketHandler;
|
|
4731
4826
|
meetingId: string;
|
|
4732
4827
|
});
|
|
4733
4828
|
set(key: string, value: any, sync?: boolean, emit?: boolean): Promise<void>;
|
|
4829
|
+
private remoteSet;
|
|
4734
4830
|
bulkSet(data: {
|
|
4735
4831
|
key: string;
|
|
4736
4832
|
payload: any;
|
|
@@ -4757,10 +4853,10 @@ declare class RTKStore$1 {
|
|
|
4757
4853
|
populate(data: StoreData): void;
|
|
4758
4854
|
}
|
|
4759
4855
|
|
|
4760
|
-
declare class
|
|
4761
|
-
stores: Map<String,
|
|
4762
|
-
constructor(context: Context<
|
|
4763
|
-
create(name: string): Promise<
|
|
4856
|
+
declare class StoreManager {
|
|
4857
|
+
stores: Map<String, Store>;
|
|
4858
|
+
constructor(context: Context<ContextState>, handler: PluginSocketHandler);
|
|
4859
|
+
create(name: string): Promise<Store>;
|
|
4764
4860
|
}
|
|
4765
4861
|
|
|
4766
4862
|
declare const enum PRODUCERS_TYPE {
|
|
@@ -4783,13 +4879,13 @@ interface MediaNodeClientOptions {
|
|
|
4783
4879
|
socket: SocketService;
|
|
4784
4880
|
}
|
|
4785
4881
|
declare class MediaNodeClient {
|
|
4786
|
-
readonly context: Context<
|
|
4882
|
+
readonly context: Context<ContextState>;
|
|
4787
4883
|
readonly authToken: string;
|
|
4788
4884
|
readonly e2ee: boolean;
|
|
4789
4885
|
get peerId(): string;
|
|
4790
|
-
get telemetry():
|
|
4791
|
-
get logger():
|
|
4792
|
-
constructor(context: Context<
|
|
4886
|
+
get telemetry(): Telemetry;
|
|
4887
|
+
get logger(): Logger;
|
|
4888
|
+
constructor(context: Context<ContextState>, options: MediaNodeClientOptions);
|
|
4793
4889
|
get mediaJoined(): boolean;
|
|
4794
4890
|
set mediaJoined(joined: boolean);
|
|
4795
4891
|
reset(): void;
|
|
@@ -4905,7 +5001,7 @@ declare class ConnectedMeetingsSocketHandler {
|
|
|
4905
5001
|
}
|
|
4906
5002
|
|
|
4907
5003
|
type ConnectedMeetingsEvents = {
|
|
4908
|
-
['meetingChanged']: (meeting:
|
|
5004
|
+
['meetingChanged']: (meeting: Client) => void;
|
|
4909
5005
|
['stateUpdate']: (payload: {
|
|
4910
5006
|
meetings: ConnectedMeeting[];
|
|
4911
5007
|
parentMeeting: ConnectedMeeting;
|
|
@@ -4913,12 +5009,13 @@ type ConnectedMeetingsEvents = {
|
|
|
4913
5009
|
['changingMeeting']: (meetingId: string) => void;
|
|
4914
5010
|
['*']: (eventName: string, ...args: any[]) => void;
|
|
4915
5011
|
};
|
|
4916
|
-
declare class
|
|
4917
|
-
constructor(context: Context<
|
|
5012
|
+
declare class ConnectedMeetings extends TypedEventEmitter$1<ConnectedMeetingsEvents> {
|
|
5013
|
+
constructor(context: Context<ContextState>);
|
|
4918
5014
|
meetings: ConnectedMeeting[];
|
|
4919
5015
|
parentMeeting: ConnectedMeeting;
|
|
4920
5016
|
get supportsConnectedMeetings(): boolean;
|
|
4921
5017
|
get isActive(): boolean;
|
|
5018
|
+
private validateConnectedMeetingsAction;
|
|
4922
5019
|
getConnectedMeetings(): Promise<{
|
|
4923
5020
|
parentMeeting: ConnectedMeeting;
|
|
4924
5021
|
meetings: ConnectedMeeting[];
|
|
@@ -4953,6 +5050,7 @@ declare class RTKConnectedMeetings$1 extends RTKTypedEventEmitter<ConnectedMeeti
|
|
|
4953
5050
|
success: boolean;
|
|
4954
5051
|
error: any;
|
|
4955
5052
|
}>;
|
|
5053
|
+
private moveSuccessHandler;
|
|
4956
5054
|
}
|
|
4957
5055
|
|
|
4958
5056
|
interface Modules {
|
|
@@ -4989,7 +5087,7 @@ interface DefaultOptions {
|
|
|
4989
5087
|
video?: boolean;
|
|
4990
5088
|
audio?: boolean;
|
|
4991
5089
|
recording?: RecordingConfig;
|
|
4992
|
-
mediaHandler?:
|
|
5090
|
+
mediaHandler?: SelfMedia;
|
|
4993
5091
|
autoSwitchAudioDevice?: boolean;
|
|
4994
5092
|
mediaConfiguration?: {
|
|
4995
5093
|
video?: VideoQualityConstraints;
|
|
@@ -5003,6 +5101,9 @@ interface RoomDetails {
|
|
|
5003
5101
|
meetingTitle: string;
|
|
5004
5102
|
useHiveMedia: boolean;
|
|
5005
5103
|
}
|
|
5104
|
+
interface ControllerOptions {
|
|
5105
|
+
peerId?: string;
|
|
5106
|
+
}
|
|
5006
5107
|
|
|
5007
5108
|
declare class ConnectionHandler {
|
|
5008
5109
|
mediaJoined: boolean;
|
|
@@ -5013,7 +5114,7 @@ declare class ConnectionHandler {
|
|
|
5013
5114
|
mediaState: MediaConnectionState;
|
|
5014
5115
|
get joinAttempted(): boolean;
|
|
5015
5116
|
get roomJoined(): boolean;
|
|
5016
|
-
constructor(context: Context<
|
|
5117
|
+
constructor(context: Context<ContextState>);
|
|
5017
5118
|
updateSocketConnectionState(state: SocketStateEvent, attempt?: number): void;
|
|
5018
5119
|
}
|
|
5019
5120
|
|
|
@@ -5106,9 +5207,9 @@ declare const ERROR_CODES: {
|
|
|
5106
5207
|
'2006': string;
|
|
5107
5208
|
'9900': string;
|
|
5108
5209
|
};
|
|
5109
|
-
declare class
|
|
5210
|
+
declare class ClientError extends Error {
|
|
5110
5211
|
code: keyof typeof ERROR_CODES;
|
|
5111
|
-
constructor(message: string, code?: keyof typeof ERROR_CODES, logger?:
|
|
5212
|
+
constructor(message: string, code?: keyof typeof ERROR_CODES, logger?: Logger | undefined, log?: boolean);
|
|
5112
5213
|
}
|
|
5113
5214
|
|
|
5114
5215
|
type EventMap = {
|
|
@@ -5211,7 +5312,7 @@ type TypedEvents = {
|
|
|
5211
5312
|
page?: number;
|
|
5212
5313
|
createAllConsumers?: boolean;
|
|
5213
5314
|
}) => void;
|
|
5214
|
-
[SessionEvents.PEER_JOINED_INTERNAL]: (p:
|
|
5315
|
+
[SessionEvents.PEER_JOINED_INTERNAL]: (p: Participant) => void;
|
|
5215
5316
|
[SessionEvents.UPDATE_PEER_STAGE_STATUS]: (p: {
|
|
5216
5317
|
id: string;
|
|
5217
5318
|
status: string;
|
|
@@ -5246,12 +5347,12 @@ declare class AudioPlaybackManager extends AudioPlayback {
|
|
|
5246
5347
|
removeParticipantTrack(participantId: string): void;
|
|
5247
5348
|
}
|
|
5248
5349
|
|
|
5249
|
-
type
|
|
5350
|
+
type ContextState = {
|
|
5250
5351
|
authToken?: string;
|
|
5251
5352
|
peerId?: string;
|
|
5252
5353
|
apiBase?: string;
|
|
5253
5354
|
baseURI?: string;
|
|
5254
|
-
onError?: (error:
|
|
5355
|
+
onError?: (error: ClientError) => void;
|
|
5255
5356
|
stageStatus?: StageStatus;
|
|
5256
5357
|
organizationId?: string;
|
|
5257
5358
|
presetName?: string;
|
|
@@ -5264,7 +5365,7 @@ type RTKContextState = {
|
|
|
5264
5365
|
meetingId?: string;
|
|
5265
5366
|
roomName?: string;
|
|
5266
5367
|
socketService?: SocketService;
|
|
5267
|
-
pip?:
|
|
5368
|
+
pip?: Pip;
|
|
5268
5369
|
roomNodeClient?: MediaNodeClient;
|
|
5269
5370
|
viewType?: ViewType;
|
|
5270
5371
|
env?: ClientEnvTypeAll;
|
|
@@ -5278,11 +5379,11 @@ type RTKContextState = {
|
|
|
5278
5379
|
roomSocketHandler?: RoomSocketHandler;
|
|
5279
5380
|
connectedMeetingsSocketHandler?: ConnectedMeetingsSocketHandler;
|
|
5280
5381
|
audioPlayback?: AudioPlaybackManager;
|
|
5281
|
-
options?:
|
|
5282
|
-
self?:
|
|
5283
|
-
telemetry?:
|
|
5284
|
-
logger?:
|
|
5285
|
-
meeting?:
|
|
5382
|
+
options?: ClientOptions;
|
|
5383
|
+
self?: Self;
|
|
5384
|
+
telemetry?: Telemetry;
|
|
5385
|
+
logger?: Logger;
|
|
5386
|
+
meeting?: Client;
|
|
5286
5387
|
selfController?: SelfController;
|
|
5287
5388
|
};
|
|
5288
5389
|
interface Context<T extends Record<string, any>> {
|
|
@@ -5294,107 +5395,116 @@ interface Context<T extends Record<string, any>> {
|
|
|
5294
5395
|
getAllValues: () => T;
|
|
5295
5396
|
}
|
|
5296
5397
|
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
reconnectionAttempt: number;
|
|
5398
|
+
declare class EnhancedEventEmitter<TransportPromiseEvents> extends EventEmitter$1 {
|
|
5399
|
+
get logger(): Logger;
|
|
5400
|
+
constructor(context: Context<ContextState>);
|
|
5401
|
+
safeEmit(event: string, ...args: any[]): boolean;
|
|
5402
|
+
safeEmitAsPromise<T extends keyof TransportPromiseEvents>(event: T, ...args: any[]): Promise<TransportPromiseEvents[T]>;
|
|
5403
|
+
safeEmitAsPromiseWithTimeout<T extends keyof TransportPromiseEvents>(event: T, timeout: number, ...args: any[]): Promise<TransportPromiseEvents[T]>;
|
|
5304
5404
|
}
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
id?: string;
|
|
5342
|
-
payload?: Uint8Array;
|
|
5343
|
-
}) => void): void;
|
|
5344
|
-
onStateEvent(event: SocketStateEvent, listener: (...args: any) => void): void;
|
|
5345
|
-
removeListener(event: number, listener: (message: {
|
|
5346
|
-
id?: string;
|
|
5347
|
-
payload?: Uint8Array;
|
|
5348
|
-
}) => void): void;
|
|
5349
|
-
removeListeners(event: number): void;
|
|
5350
|
-
flush(): any;
|
|
5351
|
-
handleSocketConnectionEvents(): void;
|
|
5405
|
+
|
|
5406
|
+
type MediaKind = 'audio' | 'video';
|
|
5407
|
+
type ProducerConstructorOptions = {
|
|
5408
|
+
id: string;
|
|
5409
|
+
localId: string;
|
|
5410
|
+
track?: MediaStreamTrack;
|
|
5411
|
+
stopTracks: boolean;
|
|
5412
|
+
disableTrackOnPause: boolean;
|
|
5413
|
+
zeroRtpOnPause: boolean;
|
|
5414
|
+
handler: HandlerInterface<TransportPromiseEvents>;
|
|
5415
|
+
appData?: Record<string, unknown>;
|
|
5416
|
+
rtpSender?: RTCRtpSender;
|
|
5417
|
+
};
|
|
5418
|
+
declare class Producer extends EnhancedEventEmitter<TransportPromiseEvents> {
|
|
5419
|
+
readonly id: string;
|
|
5420
|
+
readonly localId: string;
|
|
5421
|
+
readonly kind: MediaKind;
|
|
5422
|
+
readonly appData: Record<string, unknown>;
|
|
5423
|
+
readonly rtpSender: RTCRtpSender;
|
|
5424
|
+
constructor(context: Context<ContextState>, opt: ProducerConstructorOptions);
|
|
5425
|
+
get closed(): boolean;
|
|
5426
|
+
get track(): MediaStreamTrack | null;
|
|
5427
|
+
get paused(): boolean;
|
|
5428
|
+
get maxSpatialLayer(): number | undefined;
|
|
5429
|
+
close(reason?: string): Promise<void>;
|
|
5430
|
+
getStats(): Promise<RTCStatsReport>;
|
|
5431
|
+
pause(): void;
|
|
5432
|
+
resume(): void;
|
|
5433
|
+
replaceTrack({ track, }: {
|
|
5434
|
+
track: MediaStreamTrack | null;
|
|
5435
|
+
}): Promise<void>;
|
|
5436
|
+
setMaxSpatialLayer(spatialLayer: number): Promise<void>;
|
|
5437
|
+
setRtpEncodingParameters(params: RTCRtpEncodingParameters): Promise<void>;
|
|
5438
|
+
private _onTrackEnded;
|
|
5439
|
+
private _handleTrack;
|
|
5440
|
+
private _destroyTrack;
|
|
5352
5441
|
}
|
|
5353
5442
|
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
}>;
|
|
5396
|
-
|
|
5397
|
-
|
|
5443
|
+
interface UserDetailsResponse {
|
|
5444
|
+
id: string;
|
|
5445
|
+
name: string;
|
|
5446
|
+
email: string;
|
|
5447
|
+
picture?: string;
|
|
5448
|
+
loggedIn?: boolean;
|
|
5449
|
+
scope?: string[];
|
|
5450
|
+
clientSpecificId?: string;
|
|
5451
|
+
customParticipantId?: string;
|
|
5452
|
+
organizationId?: string;
|
|
5453
|
+
}
|
|
5454
|
+
declare class Self extends SelfMedia {
|
|
5455
|
+
name: string;
|
|
5456
|
+
picture: string;
|
|
5457
|
+
customParticipantId: string;
|
|
5458
|
+
waitlistStatus: 'accepted' | 'waiting' | 'rejected' | 'none';
|
|
5459
|
+
role: any;
|
|
5460
|
+
userId: string;
|
|
5461
|
+
organizationId: string;
|
|
5462
|
+
supportsRemoteControl: boolean;
|
|
5463
|
+
device: DeviceConfig;
|
|
5464
|
+
get telemetry(): Telemetry;
|
|
5465
|
+
hidden: boolean;
|
|
5466
|
+
get stageStatus(): StageStatus;
|
|
5467
|
+
get producers(): Producer[];
|
|
5468
|
+
get id(): string;
|
|
5469
|
+
get peerId(): string;
|
|
5470
|
+
presetName: string;
|
|
5471
|
+
roomState: 'init' | 'joined' | 'waitlisted' | LeaveRoomState;
|
|
5472
|
+
private constructor();
|
|
5473
|
+
static __init__(context: Context<ContextState>, details: UserDetailsResponse, permissions: PermissionPreset, theme: ThemePreset, presetName: string, skipAwaits?: boolean): Promise<Self>;
|
|
5474
|
+
cleanupEvents(): void;
|
|
5475
|
+
private setupEvents;
|
|
5476
|
+
get permissions(): PermissionPreset;
|
|
5477
|
+
get config(): ThemePreset;
|
|
5478
|
+
get roomJoined(): boolean;
|
|
5479
|
+
setName(name: string): void;
|
|
5480
|
+
setupTracks(options?: {
|
|
5481
|
+
video?: boolean;
|
|
5482
|
+
audio?: boolean;
|
|
5483
|
+
forceReset?: boolean;
|
|
5484
|
+
}): Promise<void>;
|
|
5485
|
+
destructMediaHandler(): Promise<void>;
|
|
5486
|
+
removeDocumentEventListeners(): Promise<void>;
|
|
5487
|
+
enableAudio(customTrack?: MediaStreamTrack): Promise<void>;
|
|
5488
|
+
enableVideo(customTrack?: MediaStreamTrack): Promise<void>;
|
|
5489
|
+
updateVideoConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
5490
|
+
enableScreenShare(): Promise<void>;
|
|
5491
|
+
updateScreenshareConstraints(resolution: VideoQualityConstraints): Promise<void>;
|
|
5492
|
+
disableAudio(): Promise<void>;
|
|
5493
|
+
disableVideo(): Promise<void>;
|
|
5494
|
+
disableScreenShare(): Promise<void>;
|
|
5495
|
+
getAllDevices(): Promise<InputDeviceInfo[]>;
|
|
5496
|
+
setIsPinned(isPinned: boolean, emitEvent?: boolean): void;
|
|
5497
|
+
get isPinned(): boolean;
|
|
5498
|
+
pin(): Promise<void>;
|
|
5499
|
+
unpin(): Promise<void>;
|
|
5500
|
+
hide(): Promise<void>;
|
|
5501
|
+
show(): void;
|
|
5502
|
+
setDevice(device: MediaDeviceInfo): Promise<void>;
|
|
5503
|
+
cleanUpTracks(): void;
|
|
5504
|
+
playAudio(): Promise<void>;
|
|
5505
|
+
registerVideoElement(videoElem: HTMLVideoElement, isPreview?: boolean): void;
|
|
5506
|
+
deregisterVideoElement(videoElem?: HTMLVideoElement, isPreview?: boolean): void;
|
|
5507
|
+
private updateVideo;
|
|
5398
5508
|
}
|
|
5399
5509
|
|
|
5400
5510
|
interface DeviceConfig {
|
|
@@ -5414,7 +5524,7 @@ interface ProducerState {
|
|
|
5414
5524
|
mimeType?: string;
|
|
5415
5525
|
consumer?: Partial<Consumer>;
|
|
5416
5526
|
}
|
|
5417
|
-
interface
|
|
5527
|
+
interface IParticipant {
|
|
5418
5528
|
id: string;
|
|
5419
5529
|
userId: string;
|
|
5420
5530
|
displayName: string;
|
|
@@ -5437,7 +5547,7 @@ interface Participant {
|
|
|
5437
5547
|
};
|
|
5438
5548
|
recorderType?: string;
|
|
5439
5549
|
}
|
|
5440
|
-
declare class
|
|
5550
|
+
declare class Participant extends TypedEventEmitter$1<ParticipantEvents> {
|
|
5441
5551
|
id: string;
|
|
5442
5552
|
userId: string;
|
|
5443
5553
|
name: string;
|
|
@@ -5463,22 +5573,24 @@ declare class RTKParticipant$1 extends RTKTypedEventEmitter<ParticipantEvents> {
|
|
|
5463
5573
|
supportsRemoteControl: boolean;
|
|
5464
5574
|
presetName?: string;
|
|
5465
5575
|
get stageStatus(): StageStatus;
|
|
5466
|
-
get telemetry():
|
|
5467
|
-
constructor(context: Context<
|
|
5576
|
+
get telemetry(): Telemetry;
|
|
5577
|
+
constructor(context: Context<ContextState>, participant: IParticipant, self: Self, roomSocket: RoomSocketHandler);
|
|
5468
5578
|
setVideoEnabled(videoEnabled: boolean, emitEvent?: boolean): void;
|
|
5469
5579
|
setAudioEnabled(audioEnabled: boolean, emitEvent?: boolean): void;
|
|
5470
5580
|
setScreenShareEnabled(screenShareEnabled: boolean, emitEvent?: boolean): void;
|
|
5581
|
+
private setupEvents;
|
|
5471
5582
|
pin(): Promise<void>;
|
|
5472
5583
|
unpin(): Promise<void>;
|
|
5473
5584
|
setIsPinned(isPinned: boolean, emitEvent?: boolean): void;
|
|
5474
5585
|
disableAudio(): Promise<void>;
|
|
5475
5586
|
kick(): Promise<void>;
|
|
5476
5587
|
disableVideo(): Promise<void>;
|
|
5477
|
-
getPermissions(): Promise<Pick<_dyteinternals_utils.Permissions, "
|
|
5588
|
+
getPermissions(): Promise<Pick<_dyteinternals_utils.Permissions, "chat" | "polls" | "plugins">>;
|
|
5478
5589
|
setStageStatus(stageStatus: StageStatus): void;
|
|
5479
5590
|
get isPinned(): boolean;
|
|
5480
5591
|
registerVideoElement(videoElem: HTMLVideoElement): void;
|
|
5481
5592
|
deregisterVideoElement(videoElem?: HTMLVideoElement): void;
|
|
5593
|
+
private updateVideo;
|
|
5482
5594
|
}
|
|
5483
5595
|
|
|
5484
5596
|
declare function createSafeToLogError(ex: any): {
|
|
@@ -5501,7 +5613,7 @@ type LogData$2 = {
|
|
|
5501
5613
|
};
|
|
5502
5614
|
devices?: string | MediaDeviceInfo[];
|
|
5503
5615
|
debuggingHint?: string;
|
|
5504
|
-
constraints?: string |
|
|
5616
|
+
constraints?: string | ClientMediaStreamConstraints;
|
|
5505
5617
|
timeout?: number;
|
|
5506
5618
|
execTime?: number;
|
|
5507
5619
|
country?: string;
|
|
@@ -5565,7 +5677,7 @@ type LogData$2 = {
|
|
|
5565
5677
|
property: string;
|
|
5566
5678
|
};
|
|
5567
5679
|
};
|
|
5568
|
-
|
|
5680
|
+
clientInitOptions?: ClientOptions;
|
|
5569
5681
|
plugin?: {
|
|
5570
5682
|
id?: string;
|
|
5571
5683
|
name?: string;
|
|
@@ -5662,15 +5774,15 @@ type LogData$2 = {
|
|
|
5662
5774
|
ip: string;
|
|
5663
5775
|
postal: string;
|
|
5664
5776
|
};
|
|
5665
|
-
|
|
5777
|
+
polls?: {
|
|
5666
5778
|
hasQuestion?: boolean;
|
|
5667
5779
|
optionsLength?: number;
|
|
5668
5780
|
};
|
|
5669
|
-
|
|
5781
|
+
chat?: {
|
|
5670
5782
|
imageType?: string;
|
|
5671
5783
|
messageType?: string;
|
|
5672
5784
|
};
|
|
5673
|
-
|
|
5785
|
+
participant?: {
|
|
5674
5786
|
id: string;
|
|
5675
5787
|
maskedName?: string;
|
|
5676
5788
|
};
|
|
@@ -5719,7 +5831,7 @@ type LogData$2 = {
|
|
|
5719
5831
|
performanceObserver?: {
|
|
5720
5832
|
api: PerformanceEntry;
|
|
5721
5833
|
};
|
|
5722
|
-
|
|
5834
|
+
locker?: {
|
|
5723
5835
|
methodName: string;
|
|
5724
5836
|
lockName: string;
|
|
5725
5837
|
};
|
|
@@ -5764,7 +5876,7 @@ interface MeetingMetadata {
|
|
|
5764
5876
|
visitedUrl?: string;
|
|
5765
5877
|
userId?: string;
|
|
5766
5878
|
}
|
|
5767
|
-
declare class
|
|
5879
|
+
declare class Telemetry {
|
|
5768
5880
|
logsCache: {
|
|
5769
5881
|
[key: string]: any;
|
|
5770
5882
|
}[];
|
|
@@ -5779,7 +5891,7 @@ declare class RTKTelemetry {
|
|
|
5779
5891
|
logExclusionList: string[];
|
|
5780
5892
|
meetingMetadata: MeetingMetadata;
|
|
5781
5893
|
resetPeerId(peerId: string): void;
|
|
5782
|
-
init(context: Context<
|
|
5894
|
+
init(context: Context<ContextState>, options: MeetingMetadata, enableTracing: boolean): void;
|
|
5783
5895
|
static trace(spanName: string, metadata?: LogData$1 | undefined): (_target: Object, _propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
5784
5896
|
injectContext(injectionReceiver: any): void;
|
|
5785
5897
|
addLogInCurrentSpan(eventSeverity: EventSeverities, eventName: string, metadata?: LogData$1, noCache?: boolean): void;
|
|
@@ -5789,9 +5901,9 @@ declare class RTKTelemetry {
|
|
|
5789
5901
|
}
|
|
5790
5902
|
|
|
5791
5903
|
type LogData = LogData$1;
|
|
5792
|
-
declare class
|
|
5793
|
-
get telemetry():
|
|
5794
|
-
init(context: Context<
|
|
5904
|
+
declare class Logger {
|
|
5905
|
+
get telemetry(): Telemetry;
|
|
5906
|
+
init(context: Context<ContextState>): void;
|
|
5795
5907
|
info(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
|
|
5796
5908
|
error(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
|
|
5797
5909
|
debug(humanReadableLogIdentifier: string, logData?: LogData, isCrucial?: boolean): void;
|
|
@@ -5807,7 +5919,7 @@ interface IceServerInformation {
|
|
|
5807
5919
|
}
|
|
5808
5920
|
interface CachedUserDetails {
|
|
5809
5921
|
peerId?: string;
|
|
5810
|
-
pluginInformation:
|
|
5922
|
+
pluginInformation: PluginResponse[];
|
|
5811
5923
|
userDetails: UserDetailsResponseV2;
|
|
5812
5924
|
roomDetails: RoomDetails;
|
|
5813
5925
|
iceServers: IceServerInformation[];
|
|
@@ -5822,10 +5934,20 @@ interface APIOptions {
|
|
|
5822
5934
|
}
|
|
5823
5935
|
declare class API {
|
|
5824
5936
|
ipInfo: any;
|
|
5937
|
+
protected fetchClient: FetchClient;
|
|
5938
|
+
protected requests: FetchClient;
|
|
5939
|
+
protected roomName: string;
|
|
5940
|
+
protected roomUUID: string;
|
|
5941
|
+
protected authToken: string;
|
|
5942
|
+
protected organizationId: string;
|
|
5943
|
+
protected iceServers: IceServerInformation[];
|
|
5944
|
+
protected pluginInformation: PluginResponse[];
|
|
5945
|
+
protected userDetails: UserDetailsResponseV2;
|
|
5946
|
+
protected roomDetails: RoomDetails;
|
|
5825
5947
|
get peerId(): string;
|
|
5826
|
-
context: Context<
|
|
5827
|
-
get logger():
|
|
5828
|
-
constructor(context: Context<
|
|
5948
|
+
context: Context<ContextState>;
|
|
5949
|
+
get logger(): Logger;
|
|
5950
|
+
constructor(context: Context<ContextState>, options?: APIOptions);
|
|
5829
5951
|
setAuthToken(token: string, options?: {
|
|
5830
5952
|
bearer?: boolean;
|
|
5831
5953
|
}): void;
|
|
@@ -5844,40 +5966,41 @@ interface Overrides {
|
|
|
5844
5966
|
forceRelay?: boolean;
|
|
5845
5967
|
[key: string]: boolean | string | number | Record<string, any>;
|
|
5846
5968
|
}
|
|
5847
|
-
interface
|
|
5969
|
+
interface ClientOptions {
|
|
5848
5970
|
authToken: string;
|
|
5849
5971
|
defaults?: DefaultOptions;
|
|
5850
5972
|
modules?: Modules;
|
|
5851
5973
|
overrides?: Overrides;
|
|
5852
5974
|
baseURI?: string;
|
|
5853
|
-
onError?: (error:
|
|
5975
|
+
onError?: (error: ClientError) => void;
|
|
5854
5976
|
cachedUserDetails?: CachedUserDetails;
|
|
5855
5977
|
}
|
|
5856
|
-
declare class
|
|
5978
|
+
declare class Client {
|
|
5857
5979
|
private constructor();
|
|
5858
5980
|
get peerId(): string;
|
|
5859
5981
|
static initMedia(options?: {
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
static init(options:
|
|
5982
|
+
video?: boolean;
|
|
5983
|
+
audio?: boolean;
|
|
5984
|
+
constraints?: MediaConstraints;
|
|
5985
|
+
}, skipAwaits?: boolean, cachedUserDetails?: CachedUserDetails): SelfMedia;
|
|
5986
|
+
static init(options: ClientOptions): Promise<Client>;
|
|
5987
|
+
private static setupContext;
|
|
5865
5988
|
join(): Promise<void>;
|
|
5866
5989
|
leave(state?: LeaveRoomState): Promise<void>;
|
|
5867
|
-
get participants(): Readonly<
|
|
5868
|
-
get self(): Readonly<
|
|
5869
|
-
get meta(): Readonly<
|
|
5870
|
-
get ai(): Readonly<
|
|
5871
|
-
get plugins(): Readonly<
|
|
5872
|
-
get chat(): Readonly<
|
|
5873
|
-
get polls(): Readonly<
|
|
5874
|
-
get connectedMeetings(): Readonly<
|
|
5875
|
-
get recording(): Readonly<
|
|
5876
|
-
get livestream(): Readonly<
|
|
5877
|
-
get stage(): Readonly<
|
|
5878
|
-
get stores(): Readonly<
|
|
5990
|
+
get participants(): Readonly<Participants>;
|
|
5991
|
+
get self(): Readonly<Self>;
|
|
5992
|
+
get meta(): Readonly<Meta>;
|
|
5993
|
+
get ai(): Readonly<Ai>;
|
|
5994
|
+
get plugins(): Readonly<Plugins>;
|
|
5995
|
+
get chat(): Readonly<Chat>;
|
|
5996
|
+
get polls(): Readonly<Polls>;
|
|
5997
|
+
get connectedMeetings(): Readonly<ConnectedMeetings>;
|
|
5998
|
+
get recording(): Readonly<Recording>;
|
|
5999
|
+
get livestream(): Readonly<Livestream>;
|
|
6000
|
+
get stage(): Readonly<Stage>;
|
|
6001
|
+
get stores(): Readonly<StoreManager>;
|
|
5879
6002
|
get audio(): AudioPlaybackManager;
|
|
5880
|
-
get __internals__(): Readonly<
|
|
6003
|
+
get __internals__(): Readonly<Internals>;
|
|
5881
6004
|
joinRoom(): Promise<void>;
|
|
5882
6005
|
leaveRoom(state?: LeaveRoomState): Promise<void>;
|
|
5883
6006
|
}
|
|
@@ -5886,35 +6009,37 @@ declare enum RequestToJoinType {
|
|
|
5886
6009
|
PRESENT = "REQUEST_TO_PRESENT"
|
|
5887
6010
|
}
|
|
5888
6011
|
|
|
5889
|
-
type
|
|
6012
|
+
type RTKConfigOptions = Omit<ControllerOptions, 'peerId'>;
|
|
6013
|
+
|
|
6014
|
+
type RTKParticipant = Readonly<Participant>;
|
|
5890
6015
|
|
|
5891
|
-
type RTKParticipants = Readonly<
|
|
5892
|
-
type RTKParticipantMap = Readonly<
|
|
6016
|
+
type RTKParticipants = Readonly<Participants>;
|
|
6017
|
+
type RTKParticipantMap = Readonly<ParticipantMap>;
|
|
5893
6018
|
|
|
5894
|
-
type RTKPlugin = Readonly<
|
|
5895
|
-
type RTKPlugins = Readonly<
|
|
5896
|
-
type RTKPluginMap = Readonly<
|
|
5897
|
-
type RTKMeta = Readonly<
|
|
5898
|
-
type RTKSelf = Readonly<
|
|
5899
|
-
type RTKSelfMedia = Readonly<
|
|
5900
|
-
type RTKChat = Readonly<
|
|
5901
|
-
type RTKPolls = Readonly<
|
|
5902
|
-
type RTKRecording = Readonly<
|
|
6019
|
+
type RTKPlugin = Readonly<Plugin>;
|
|
6020
|
+
type RTKPlugins = Readonly<Plugins>;
|
|
6021
|
+
type RTKPluginMap = Readonly<PluginMap>;
|
|
6022
|
+
type RTKMeta = Readonly<Meta>;
|
|
6023
|
+
type RTKSelf = Readonly<Self>;
|
|
6024
|
+
type RTKSelfMedia = Readonly<SelfMedia>;
|
|
6025
|
+
type RTKChat = Readonly<Chat>;
|
|
6026
|
+
type RTKPolls = Readonly<Polls>;
|
|
6027
|
+
type RTKRecording = Readonly<Recording>;
|
|
5903
6028
|
|
|
5904
|
-
type RTKLivestream = Readonly<
|
|
6029
|
+
type RTKLivestream = Readonly<Livestream>;
|
|
5905
6030
|
|
|
5906
|
-
type RTKStore =
|
|
6031
|
+
type RTKStore = Store;
|
|
5907
6032
|
|
|
5908
|
-
type RTKConnectedMeetings = Readonly<
|
|
6033
|
+
type RTKConnectedMeetings = Readonly<ConnectedMeetings>;
|
|
5909
6034
|
|
|
5910
|
-
type RTKPermissionsPreset = Readonly<
|
|
5911
|
-
type RTKThemePreset = Readonly<
|
|
6035
|
+
type RTKPermissionsPreset = Readonly<PermissionPreset>;
|
|
6036
|
+
type RTKThemePreset = Readonly<ThemePreset>;
|
|
5912
6037
|
|
|
5913
|
-
type RTKLogger =
|
|
6038
|
+
type RTKLogger = Logger;
|
|
5914
6039
|
|
|
5915
|
-
type
|
|
6040
|
+
type ClientType = {
|
|
5916
6041
|
callStats?: unknown;
|
|
5917
|
-
|
|
6042
|
+
Telemetry?: typeof Telemetry;
|
|
5918
6043
|
};
|
|
5919
6044
|
declare global {
|
|
5920
6045
|
interface Navigator {
|
|
@@ -5925,12 +6050,12 @@ declare global {
|
|
|
5925
6050
|
isReactNative?: boolean;
|
|
5926
6051
|
}
|
|
5927
6052
|
interface Window {
|
|
5928
|
-
RTK?:
|
|
5929
|
-
|
|
6053
|
+
RTK?: ClientType;
|
|
6054
|
+
FAST_RTK?: boolean;
|
|
5930
6055
|
MediaStreamTrackProcessor?: any;
|
|
5931
6056
|
MediaStreamTrackGenerator?: any;
|
|
5932
6057
|
TransformStream?: any;
|
|
5933
6058
|
}
|
|
5934
6059
|
}
|
|
5935
6060
|
|
|
5936
|
-
export { ActiveTab, ActiveTabType, AudioConsumerScoreStats, AudioMiddleware, AudioProducerScoreStats, BroadcastMessagePayload, ChatChannel, ChatUpdateParams, CustomMessage, DeviceConfig,
|
|
6061
|
+
export { ActiveTab, ActiveTabType, AudioConsumerScoreStats, AudioMiddleware, AudioProducerScoreStats, BroadcastMessagePayload, CachedUserDetails, ChatChannel, ChatUpdateParams, ClientError, ConsumerScoreStats, CustomMessage, DeviceConfig, FileMessage, ImageMessage, JoinedPeer, LeaveRoomState, LivestreamIngestionCredentials, LivestreamState, LogData, MediaConnectionState, MediaConnectionUpdate, MediaConstraints, MediaKind, MediaPermission, Message, ProducerScoreStats, BasicParticipant as RTKBasicParticipant, BasicParticipantsMap as RTKBasicParticipantsMap, RTKChat, ClientOptions as RTKClientOptions, RTKConfigOptions, RTKConnectedMeetings, RTKLivestream, RTKLogger, RTKMeta, RTKParticipant, RTKParticipantMap, RTKParticipants, RTKPermissionsPreset, RTKPlugin, RTKPluginMap, RTKPlugins, RTKPolls, RTKRecording, RTKSelf, RTKSelfMedia, RTKStore, StoreData as RTKStoreData, RateLimitConfig as RTKStoreRateLimitConfig, RTKThemePreset, RecordingState, RequestToJoinType, SocketConnectionState, StageStatus, StartLivestreamConfig, TextMessage, UserDetailsResponseV2, VideoConsumerScoreStats, VideoMiddleware, VideoProducerScoreStats, VideoQualityConstraints, Client as default, LeaveRoomState as leaveRoomState };
|