/** * Jitsi Meet External API TypeScript Definitions * Based on: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe */ declare module '@jitsi/iframe-api' { export = JitsiMeetExternalAPI; } export declare class JitsiMeetExternalAPI { constructor(domain: string, options?: JitsiMeetExternalAPIOptions); // ============================================================================ // FUNCTIONS // ============================================================================ /** * Captures a high quality picture using the device's camera. Mobile browsers only. * @param cameraFacingMode - The facing mode: 'environment' or 'user'. Defaults to 'environment'. * @param descriptionText - Custom description text for the consent dialog. * @param titleText - Custom title for the consent dialog. */ captureCameraPicture( cameraFacingMode?: CameraFacingMode, descriptionText?: string, titleText?: string ): Promise; /** * Captures a screenshot for the participant in the large video view (on stage). */ captureLargeVideoScreenshot(): Promise; /** * Retrieves a list of available devices. */ getAvailableDevices(): Promise; /** * Returns a promise which resolves with an array of currently sharing participants IDs. */ getContentSharingParticipants(): Promise; /** * Retrieves a list of currently selected devices. */ getCurrentDevices(): Promise; /** * Retrieves an object containing information about the deployment. */ getDeploymentInfo(): Promise; /** * Retrieves an object containing information about livestreamUrl of the current live stream. */ getLivestreamUrl(): Promise; /** * @deprecated Use getRoomsInfo instead. * Returns an array containing participant information. */ getParticipantsInfo(): ParticipantInfo[]; /** * Returns an array of available rooms and details. */ getRoomsInfo(): Promise; /** * Returns the meeting's unique session ID. */ getSessionId(): Promise; /** * Returns the meeting's unique etherpad shared document URL. */ getSharedDocumentUrl(): Promise; /** * Returns the current video quality setting. */ getVideoQuality(): number; /** * Returns array of commands supported by executeCommand. */ getSupportedCommands(): string[]; /** * Returns array of events supported by addListener. */ getSupportedEvents(): string[]; /** * Resolves to true if the device change is available and to false if not. * @param deviceType - The device type: 'output', 'input', or undefined. */ isDeviceChangeAvailable(deviceType?: DeviceType): Promise; /** * Resolves to true if the device list is available and to false if not. */ isDeviceListAvailable(): Promise; /** * Resolves to true if multiple audio input is supported and to false if not. */ isMultipleAudioInputSupported(): Promise; /** * Selects the participant ID to be the pinned participant. * @param participantId - The participant ID to pin. * @param videoType - Optional. 'camera' or 'desktop'. Default is 'camera'. */ pinParticipant(participantId: string | null, videoType?: VideoType): void; /** * Resizes the large video container per the provided dimensions. */ resizeLargeVideo(width: number, height: number): void; /** * Sets the audio input device to the one with the passed label or ID. */ setAudioInputDevice(deviceLabel: string, deviceId?: string): void; /** * Sets the audio output device to the one with the passed label or ID. */ setAudioOutputDevice(deviceLabel: string, deviceId?: string): void; /** * Displays the participant with the given participant ID on the large video. * @param participantId - The participant ID to display, or undefined for auto-selection. */ setLargeVideoParticipant(participantId?: string): void; /** * Sets the video input device to the one with the passed label or ID. */ setVideoInputDevice(deviceLabel: string, deviceId?: string): void; /** * Set your virtual background with a base64 image. * @param enabled - Enable or disable the virtual background. * @param backgroundImage - Base64 image string, e.g., "data:image/png;base64,iVBOR...". */ setVirtualBackground(enabled: boolean, backgroundImage?: string): void; /** * Starts a file recording or streaming session. */ startRecording(options: RecordingOptions): void; /** * Stops an ongoing file recording, streaming session, or transcription. * @param mode - Recording mode: 'local', 'stream', or 'file'. * @param transcription - Whether to stop transcription. */ stopRecording(mode: RecordingMode, transcription?: boolean): void; /** * Returns the number of conference participants. */ getNumberOfParticipants(): number; /** * @deprecated Use getRoomsInfo instead. * Returns a participant's avatar URL. */ getAvatarURL(participantId: string): string; /** * Returns a participant's display name. */ getDisplayName(participantId: string): string; /** * Returns a participant's email. */ getEmail(participantId: string): string; /** * Returns the IFrame HTML element which is used to load the Jitsi Meet conference. */ getIFrame(): HTMLIFrameElement; /** * Returns a Promise which resolves to the current audio disabled state. */ isAudioDisabled(): Promise; /** * Returns a Promise which resolves to the current audio muted state. */ isAudioMuted(): Promise; /** * Returns a Promise which resolves to the current video muted state. */ isVideoMuted(): Promise; /** * Returns a Promise which resolves to the current audio availability state. */ isAudioAvailable(): Promise; /** * Returns a Promise which resolves to the current video availability state. */ isVideoAvailable(): Promise; /** * Returns whether the current user is a visitor or not. */ isVisitor(): boolean; /** * Returns a Promise which resolves to the current moderation state of the given media type. * @param mediaType - 'audio' (default) or 'video'. */ isModerationOn(mediaType?: MediaType): Promise; /** * Returns a Promise which resolves to a Boolean or null when there is no conference. */ isP2pActive(): Promise; /** * Returns a Promise which resolves to the current force mute state of the given participant. * @param participantId - The participant ID. * @param mediaType - 'audio' (default) or 'video'. */ isParticipantForceMuted(participantId: string, mediaType?: MediaType): Promise; /** * Returns a Promise which resolves with the current participants pane state. */ isParticipantsPaneOpen(): Promise; /** * Returns a Promise which resolves with whether meeting was started in view only. */ isStartSilent(): Promise; /** * Returns a Promise which resolves with the map of breakout rooms. */ listBreakoutRooms(): Promise; /** * Invite the given array of participants to the meeting. */ invite(invitees: Invitee[]): Promise; /** * Removes the embedded Jitsi Meet conference. */ dispose(): void; // ============================================================================ // COMMANDS - executeCommand // ============================================================================ /** * Execute a single command. */ executeCommand(command: 'displayName', name: string): void; executeCommand(command: 'password', password: string): void; executeCommand(command: 'toggleLobby', enabled: boolean): void; executeCommand(command: 'sendTones', options: SendTonesOptions): void; executeCommand(command: 'startShareVideo', url: string): void; executeCommand(command: 'stopShareVideo'): void; executeCommand(command: 'subject', subject: string): void; executeCommand(command: 'localSubject', subject: string): void; executeCommand(command: 'toggleAudio'): void; executeCommand(command: 'toggleVideo'): void; executeCommand(command: 'toggleFilmStrip'): void; executeCommand(command: 'toggleChat'): void; executeCommand(command: 'toggleRaiseHand'): void; executeCommand(command: 'toggleShareScreen'): void; executeCommand(command: 'setNoiseSuppressionEnabled', options: NoiseSuppressionOptions): void; executeCommand(command: 'toggleSubtitles'): void; executeCommand(command: 'toggleTileView'): void; executeCommand(command: 'hangup'): void; executeCommand(command: 'endConference'): void; executeCommand(command: 'email', email: string): void; executeCommand( command: 'sendCameraFacingMode', receiverParticipantId: string, facingMode?: CameraFacingMode ): void; executeCommand( command: 'sendEndpointTextMessage', receiverParticipantId: string, text: string ): void; executeCommand( command: 'setLargeVideoParticipant', participantId?: string, videoType?: VideoType ): void; executeCommand(command: 'setVideoQuality', height: number): void; executeCommand(command: 'muteEveryone', mediaType?: MediaType): void; executeCommand( command: 'muteRemoteParticipant', participantId: string, mediaType?: MediaType ): void; executeCommand(command: 'startRecording', options: RecordingOptions): void; executeCommand(command: 'stopRecording', mode: RecordingMode, transcription?: boolean): void; executeCommand(command: 'initiatePrivateChat', participantId: string): void; executeCommand(command: 'cancelPrivateChat'): void; executeCommand(command: 'kickParticipant', participantId: string): void; executeCommand(command: 'grantModerator', participantId: string): void; executeCommand(command: 'overwriteConfig', config: Record): void; executeCommand( command: 'sendChatMessage', message: string, to?: string, ignorePrivacy?: boolean ): void; executeCommand(command: 'setFollowMe', value: boolean, recorderOnly?: boolean): void; executeCommand( command: 'setSubtitles', enabled: boolean, displaySubtitles?: boolean, language?: string | null ): void; executeCommand(command: 'setTileView', enabled: boolean): void; executeCommand(command: 'answerKnockingParticipant', id: string, approved: boolean): void; executeCommand(command: 'toggleCamera', facingMode?: CameraFacingMode): void; executeCommand(command: 'toggleCameraMirror'): void; executeCommand(command: 'toggleVirtualBackgroundDialog'): void; executeCommand(command: 'pinParticipant', participantId?: string | null): void; executeCommand(command: 'setParticipantVolume', participantId: string, volume: number): void; executeCommand(command: 'toggleParticipantsPane', enabled: boolean): void; executeCommand(command: 'toggleModeration', enable: boolean, mediaType?: MediaType): void; executeCommand(command: 'askToUnmute', participantId: string): void; executeCommand(command: 'approveVideo', participantId: string): void; executeCommand(command: 'rejectParticipant', participantId: string, mediaType?: MediaType): void; executeCommand(command: 'addBreakoutRoom', name?: string): void; executeCommand(command: 'autoAssignToBreakoutRooms'): void; executeCommand(command: 'closeBreakoutRoom', roomId: string): void; executeCommand(command: 'joinBreakoutRoom', roomId?: string): void; executeCommand(command: 'removeBreakoutRoom', breakoutRoomJid: string): void; executeCommand(command: 'resizeFilmStrip', options: ResizeFilmStripOptions): void; executeCommand(command: 'resizeLargeVideo', width: number, height: number): void; executeCommand(command: 'sendParticipantToRoom', participantId: string, roomId: string): void; executeCommand(command: 'overwriteNames', names: OverwriteNameEntry[]): void; executeCommand(command: 'showNotification', options: ShowNotificationOptions): void; executeCommand(command: 'hideNotification', uid: string): void; executeCommand(command: 'toggleWhiteboard'): void; executeCommand(command: 'setAssumedBandwidthBps', assumedBandwidthBps: number): void; executeCommand(command: 'setBlurredBackground', blurType: BlurType): void; executeCommand(command: 'setAudioOnly', enable: boolean): void; executeCommand(command: 'setVirtualBackground', enabled: boolean, backgroundImage: string): void; executeCommand(command: string, ...args: unknown[]): void; /** * Execute multiple commands. */ executeCommands(commands: ExecuteCommands): void; // ============================================================================ // EVENTS - addListener / removeListener / on // ============================================================================ /** * Add an event listener. */ addListener( event: E, listener: (data: JitsiMeetEventMap[E]) => void ): void; addListener(event: string, listener: (data: unknown) => void): void; /** * Remove an event listener. */ removeListener( event: E, listener: (data: JitsiMeetEventMap[E]) => void ): void; removeListener(event: string, listener: (data: unknown) => void): void; /** * Alias for addListener. */ on( event: E, listener: (data: JitsiMeetEventMap[E]) => void ): void; on(event: string, listener: (data: unknown) => void): void; /** * Add an event listener that only triggers once. */ once( event: E, listener: (data: JitsiMeetEventMap[E]) => void ): void; once(event: string, listener: (data: unknown) => void): void; } // ============================================================================ // CONSTRUCTOR OPTIONS // ============================================================================ export interface JitsiMeetExternalAPIOptions { /** The name of the room to join. */ roomName?: string; /** The created IFrame width. */ width?: number | string; /** The created IFrame height. */ height?: number | string; /** The HTML DOM Element where the IFrame is added as a child. */ parentNode?: HTMLElement; /** JS object with overrides for options defined in config.js. */ configOverwrite?: ConfigOverwrite; /** JS object with overrides for options defined in interface_config.js. */ interfaceConfigOverwrite?: InterfaceConfigOverwrite; /** The JWT token. */ jwt?: string; /** The IFrame onload event handler. */ onload?: () => void; /** Object arrays that contain information about participants invited to a call. */ invitees?: Invitee[]; /** Information map about the devices used in a call. */ devices?: DevicesConfig; /** JS object that contains information about the participant. */ userInfo?: UserInfo; /** The default meeting language. */ lang?: string; /** Object with rules to modify/remove existing ice server configuration. */ iceServers?: IceServersConfig; } interface ConfigOverwrite { // Audio settings startWithAudioMuted?: boolean; startAudioMuted?: number; startAudioOnly?: boolean; startSilent?: boolean; enableNoisyMicDetection?: boolean; enableOpusRed?: boolean; audioQuality?: { stereo?: boolean; opusMaxAverageBitrate?: number | null; enableOpusDtx?: boolean; }; noiseSuppression?: { krisp?: { enabled?: boolean; logProcessStats?: boolean; debugLogs?: boolean; useBVC?: boolean; bufferOverflowMS?: number; }; }; disableAEC?: boolean; disableAGC?: boolean; disableAP?: boolean; disableNS?: boolean; // Video settings startWithVideoMuted?: boolean; startVideoMuted?: number; maxFullResolutionParticipants?: number; disableSimulcast?: boolean; disableResponsiveTiles?: boolean; constraints?: { video?: { height?: { ideal?: number; max?: number; min?: number; }; }; }; desktopSharingFrameRate?: { min?: number; max?: number; }; screenShareSettings?: { desktopPreferCurrentTab?: boolean; desktopSystemAudio?: 'include' | 'exclude'; desktopSurfaceSwitching?: 'include' | 'exclude'; desktopDisplaySurface?: string; desktopSelfBrowserSurface?: 'include' | 'exclude'; }; videoQuality?: { codecPreferenceOrder?: ('AV1' | 'VP9' | 'VP8' | 'H264')[]; mobileCodecPreferenceOrder?: ('AV1' | 'VP9' | 'VP8' | 'H264')[]; screenshareCodec?: string; mobileScreenshareCodec?: string; enableAdaptiveMode?: boolean; minHeightForQualityLvl?: Record; }; // Prejoin configuration (replaces prejoinPageEnabled) prejoinConfig?: { enabled?: boolean; hideDisplayName?: boolean; hideExtraJoinButtons?: ('no-audio' | 'by-phone')[]; preCallTestEnabled?: boolean; preCallTestICEUrl?: string; showHangUp?: boolean; }; /** @deprecated Use prejoinConfig.enabled instead */ prejoinPageEnabled?: boolean; // Lobby configuration lobby?: { autoKnock?: boolean; enableChat?: boolean; showHangUp?: boolean; }; /** @deprecated Use lobby.autoKnock instead */ autoKnockLobby?: boolean; /** @deprecated Use lobby.enableChat instead */ enableLobbyChat?: boolean; // Security UI configuration securityUi?: { hideLobbyButton?: boolean; disableLobbyPassword?: boolean; }; /** @deprecated Use securityUi.hideLobbyButton instead */ hideLobbyButton?: boolean; // Deep linking configuration deeplinking?: { disabled?: boolean; hideLogo?: boolean; desktop?: { appName?: string; appScheme?: string; download?: { linux?: string; macos?: string; windows?: string; }; enabled?: boolean; }; ios?: { appName?: string; appScheme?: string; downloadLink?: string; }; android?: { appName?: string; appScheme?: string; downloadLink?: string; appPackage?: string; fDroidUrl?: string; }; }; /** @deprecated Use deeplinking.disabled instead */ disableDeepLinking?: boolean; // Welcome page configuration welcomePage?: { disabled?: boolean; customUrl?: string; }; // Recording configuration recordings?: { recordAudioAndVideo?: boolean; suggestRecording?: boolean; showPrejoinWarning?: boolean; showRecordingLink?: boolean; requireConsent?: boolean; skipConsentInMeeting?: boolean; consentLearnMoreLink?: string; }; recordingService?: { enabled?: boolean; sharingEnabled?: boolean; hideStorageWarning?: boolean; }; localRecording?: { disable?: boolean; notifyAllParticipants?: boolean; disableSelfRecording?: boolean; }; // Live streaming configuration liveStreaming?: { enabled?: boolean; termsLink?: string; dataPrivacyLink?: string; validatorRegExpString?: string; helpLink?: string; }; // Transcription configuration transcription?: { enabled?: boolean; useAppLanguage?: boolean; preferredLanguage?: string; customLanguages?: Record; autoTranscribeOnRecord?: boolean; autoCaptionOnTranscribe?: boolean; disableClosedCaptions?: boolean; }; // Toolbar configuration toolbarButtons?: ToolbarButton[]; mainToolbarButtons?: ToolbarButton[][]; reducedUImainToolbarButtons?: ToolbarButton[]; reducedUIEnabled?: boolean; buttonsWithNotifyClick?: (ToolbarButton | ButtonWithNotifyClick)[]; participantMenuButtonsWithNotifyClick?: (string | ButtonWithNotifyClick)[]; hiddenPremeetingButtons?: ( | 'microphone' | 'camera' | 'select-background' | 'invite' | 'settings' )[]; customToolbarButtons?: Array<{ icon: string; id: string; text: string; backgroundColor?: string; }>; customParticipantMenuButtons?: Array<{ icon: string; id: string; text: string }>; toolbar?: { initialTimeout?: number; timeout?: number; alwaysVisible?: boolean; autoHideWhileChatIsOpen?: boolean; }; // UI settings enableClosePage?: boolean; disableInviteFunctions?: boolean; disableModeratorIndicator?: boolean; enableInsecureRoomNameWarning?: boolean; disableReactions?: boolean; disableReactionsModeration?: boolean; disableReactionsInChat?: boolean; disablePolls?: boolean; disableChat?: boolean; disableSelfDemote?: boolean; disableSelfView?: boolean; disableSelfViewSettings?: boolean; showChatPermissionsModeratorSetting?: boolean; disableShortcuts?: boolean; disableInitialGUM?: boolean; disable1On1Mode?: boolean | null; defaultLocalDisplayName?: string; defaultRemoteDisplayName?: string; hideDisplayName?: boolean; hideDominantSpeakerBadge?: boolean; defaultLanguage?: string; disableProfile?: boolean; hideEmailInSettings?: boolean; requireDisplayName?: boolean; readOnlyName?: boolean; enableWebHIDFeature?: boolean; doNotStoreRoom?: boolean; disableLocalVideoFlip?: boolean; doNotFlipLocalVideo?: boolean; disableVirtualBackground?: boolean; disableAddingBackgroundImages?: boolean; backgroundAlpha?: number; disableTileView?: boolean; disableTileEnlargement?: boolean; hideConferenceSubject?: boolean; hideConferenceTimer?: boolean; hideRecordingLabel?: boolean; hideParticipantsStats?: boolean; subject?: string; localSubject?: string; disableChatSmileys?: boolean; disableFilmstripAutohiding?: boolean; disableCameraTintForeground?: boolean; // Filmstrip configuration filmstrip?: { disabled?: boolean; disableResizable?: boolean; disableStageFilmstrip?: boolean; stageFilmstripParticipants?: number; disableTopPanel?: boolean; minParticipantCountForTopPanel?: number; initialWidth?: number; alwaysShowResizeBar?: boolean; }; // Tile view configuration tileView?: { disabled?: boolean; numberOfVisibleTiles?: number; }; // Participants pane configuration participantsPane?: { enabled?: boolean; hideModeratorSettingsTab?: boolean; hideMoreActionsButton?: boolean; hideMuteAllButton?: boolean; }; // Breakout rooms configuration breakoutRooms?: { hideAddRoomButton?: boolean; hideAutoAssignButton?: boolean; hideJoinRoomButton?: boolean; }; // Raised hands configuration raisedHands?: { disableLowerHandByModerator?: boolean; disableLowerHandNotification?: boolean; disableNextSpeakerNotification?: boolean; disableRemoveRaisedHandOnFocus?: boolean; }; disableRemoveRaisedHandOnFocus?: boolean; // Speaker stats configuration speakerStats?: { disabled?: boolean; disableSearch?: boolean; order?: ('role' | 'name' | 'hasLeft')[]; }; // Connection indicators configuration connectionIndicators?: { autoHide?: boolean; autoHideTimeout?: number; disabled?: boolean; disableDetails?: boolean; inactiveDisabled?: boolean; }; // Remote video menu configuration remoteVideoMenu?: { disabled?: boolean; disableDemote?: boolean; disableKick?: boolean; disableGrantModerator?: boolean; disablePrivateChat?: 'all' | 'allow-moderator-chat' | 'disable-visitor-chat'; }; disableRemoteMute?: boolean; // Face landmarks configuration faceLandmarks?: { enableFaceCentering?: boolean; enableFaceExpressionsDetection?: boolean; enableDisplayFaceExpressions?: boolean; enableRTCStats?: boolean; faceCenteringThreshold?: number; captureInterval?: number; }; // Notification settings notificationTimeouts?: { short?: number; medium?: number; long?: number; extraLong?: number; sticky?: number; }; notifications?: string[]; disabledNotifications?: string[]; // Conference info configuration conferenceInfo?: { alwaysVisible?: string[]; autoHide?: string[]; }; // Giphy configuration giphy?: { enabled?: boolean; sdkKey?: string; displayMode?: 'tile' | 'chat' | 'all'; tileTime?: number; rating?: 'g' | 'pg' | 'pg-13' | 'r'; }; // Whiteboard configuration whiteboard?: { enabled?: boolean; collabServerBaseUrl?: string; userLimit?: number; limitUrl?: string; }; // E2EE configuration e2ee?: { labels?: { description?: string; label?: string; tooltip?: string; warning?: string; }; externallyManagedKey?: boolean; }; // Visitors configuration visitors?: { enableMediaOnPromote?: { audio?: boolean; video?: boolean; }; hideVisitorCountForVisitors?: boolean; showJoinMeetingDialog?: boolean; }; // P2P configuration p2p?: { enabled?: boolean; iceTransportPolicy?: 'all' | 'relay'; codecPreferenceOrder?: ('AV1' | 'VP9' | 'VP8' | 'H264')[]; mobileCodecPreferenceOrder?: ('AV1' | 'VP9' | 'VP8' | 'H264')[]; screenshareCodec?: string; mobileScreenshareCodec?: string; backToP2PDelay?: number; stunServers?: Array<{ urls: string }>; }; // Testing/experimental features testing?: { assumeBandwidth?: boolean; enableAV1ForFF?: boolean; enableCodecSelectionAPI?: boolean; p2pTestMode?: boolean; testMode?: boolean; noAutoPlayVideo?: boolean; skipInterimTranscriptions?: boolean; dumpTranscript?: boolean; debugAudioLevels?: boolean; failICE?: boolean; showSpotConsentDialog?: boolean; }; // Analytics configuration analytics?: { disabled?: boolean; rtcstatsEnabled?: boolean; rtcstatsStoreLogs?: boolean; rtcstatsEndpoint?: string; rtcstatsPollInterval?: number; rtcstatsSendSdp?: boolean; watchRTCEnabled?: boolean; }; // Gravatar configuration gravatar?: { baseUrl?: string; disabled?: boolean; }; // Legal URLs legalUrls?: { helpCentre?: string; privacy?: string; terms?: string; }; // Other settings apiLogLevels?: LogLevel[]; mouseMoveCallbackInterval?: number; channelLastN?: number; startLastN?: number; useHostPageLocalStorage?: boolean; disableRtx?: boolean; enableTcc?: boolean; enableRemb?: boolean; enableForcedReload?: boolean; useTurnUdp?: boolean; enableEncodedTransformSupport?: boolean; disableThirdPartyRequests?: boolean; enableCalendarIntegration?: boolean; notifyOnConferenceDestruction?: boolean; feedbackPercentage?: number; roomPasswordNumberOfDigits?: number | false; noticeMessage?: string; enableTalkWhileMuted?: boolean; forceTurnRelay?: boolean; hideLoginButton?: boolean; disableWebrtcStats?: boolean; disableShowMoreStats?: boolean; etherpad_base?: string; openSharedDocumentOnJoin?: boolean; screenshotCapture?: { enabled?: boolean; mode?: 'recording' | 'always'; }; webrtcIceUdpDisable?: boolean; webrtcIceTcpDisable?: boolean; disableBeforeUnloadHandlers?: boolean; // Logging configuration logging?: { defaultLogLevel?: 'trace' | 'debug' | 'info' | 'log' | 'warn' | 'error'; disableLogCollector?: boolean; loggers?: Record; }; // File sharing configuration fileSharing?: { apiUrl?: string; enabled?: boolean; maxFileSize?: number; }; // Dropbox integration dropbox?: { appKey?: string; redirectURI?: string; }; // Dynamic branding dynamicBrandingUrl?: string; // Shared video allowed domains sharedVideoAllowedURLDomains?: string[]; // CORS avatar URLs corsAvatarURLs?: string[]; // Recording limit recordingLimit?: { limit?: number; appName?: string; appURL?: string; }; // Chrome extension banner chromeExtensionBanner?: { url?: string; edgeUrl?: string; chromeExtensionsInfo?: Array<{ id: string; path: string; }>; }; // Allow any additional config options [key: string]: unknown; } /** * @deprecated Most interfaceConfig options are being migrated to config.js. * Use configOverwrite instead where possible. */ interface InterfaceConfigOverwrite { /** @deprecated Use config.disableModeratorIndicator instead */ DISABLE_DOMINANT_SPEAKER_INDICATOR?: boolean; TILE_VIEW_MAX_COLUMNS?: number; SHOW_JITSI_WATERMARK?: boolean; SHOW_WATERMARK_FOR_GUESTS?: boolean; SHOW_BRAND_WATERMARK?: boolean; SHOW_POWERED_BY?: boolean; SHOW_PROMOTIONAL_CLOSE_PAGE?: boolean; /** @deprecated Use config.toolbarButtons instead */ TOOLBAR_BUTTONS?: ToolbarButton[]; SETTINGS_SECTIONS?: SettingsSection[]; VIDEO_LAYOUT_FIT?: 'both' | 'width' | 'height'; VERTICAL_FILMSTRIP?: boolean; FILM_STRIP_MAX_HEIGHT?: number; MOBILE_APP_PROMO?: boolean; HIDE_INVITE_MORE_HEADER?: boolean; /** @deprecated Use config.disabledSounds instead */ DISABLE_JOIN_LEAVE_NOTIFICATIONS?: boolean; DISABLE_VIDEO_BACKGROUND?: boolean; DEFAULT_BACKGROUND?: string; DEFAULT_WELCOME_PAGE_LOGO_URL?: string; DEFAULT_LOGO_URL?: string; JITSI_WATERMARK_LINK?: string; BRAND_WATERMARK_LINK?: string; APP_NAME?: string; NATIVE_APP_NAME?: string; PROVIDER_NAME?: string; LANG_DETECTION?: boolean; ENFORCE_NOTIFICATION_AUTO_DISMISS_TIMEOUT?: number; MAXIMUM_ZOOMING_COEFFICIENT?: number; SUPPORT_URL?: string; CONNECTION_INDICATOR_AUTO_HIDE_ENABLED?: boolean; CONNECTION_INDICATOR_AUTO_HIDE_TIMEOUT?: number; CONNECTION_INDICATOR_DISABLED?: boolean; AUTO_PIN_LATEST_SCREEN_SHARE?: string; DISABLE_FOCUS_INDICATOR?: boolean; DISABLE_PRESENCE_STATUS?: boolean; DISABLE_TRANSCRIPTION_SUBTITLES?: boolean; DISABLE_RINGING?: boolean; AUDIO_LEVEL_PRIMARY_COLOR?: string; AUDIO_LEVEL_SECONDARY_COLOR?: string; FILMSTRIP_MAX_HEIGHT?: number; GENERATE_ROOMNAMES_ON_WELCOME_PAGE?: boolean; HIDE_DEEP_LINKING_LOGO?: boolean; INITIAL_TOOLBAR_TIMEOUT?: number; TOOLBAR_TIMEOUT?: number; TOOLBAR_ALWAYS_VISIBLE?: boolean; LOCAL_THUMBNAIL_RATIO?: number; REMOTE_THUMBNAIL_RATIO?: number; LIVE_STREAMING_HELP_LINK?: string; POLICY_LOGO?: string; RECENT_LIST_ENABLED?: boolean; SHOW_CHROME_EXTENSION_BANNER?: boolean; VIDEO_QUALITY_LABEL_DISABLED?: boolean; [key: string]: unknown; } interface DevicesConfig { audioInput?: string; audioOutput?: string; videoInput?: string; } interface UserInfo { email?: string; displayName?: string; } interface IceServersConfig { replace?: IceServerReplacement[]; } interface IceServerReplacement { targetType: 'turn' | 'turns' | 'stun'; urls: string | null; } // ============================================================================ // FUNCTION RETURN TYPES // ============================================================================ interface CaptureCameraPictureResult { dataURL?: string; error?: string; } interface CaptureScreenshotResult { dataURL: string; } interface DeviceInfo { deviceId: string; groupId: string; kind: string; label: string; } interface AvailableDevices { audioInput: DeviceInfo[]; audioOutput: DeviceInfo[]; videoInput: DeviceInfo[]; } interface CurrentDevices { audioInput?: DeviceInfo; audioOutput?: DeviceInfo; videoInput?: DeviceInfo; } interface ContentSharingParticipants { sharingParticipantIds: string[]; } interface DeploymentInfo { region?: string; shard?: string; [key: string]: unknown; } interface LivestreamData { livestreamUrl: string; } interface ParticipantInfo { participantId: string; displayName: string; avatarURL?: string; email?: string; } interface RoomParticipant { id: string; jid: string; role: string; displayName: string; avatarUrl?: string; } interface RoomInfo { isMainRoom: boolean; id: string; jid: string; participants: RoomParticipant[]; } interface RoomsInfo { rooms: RoomInfo[]; } interface BreakoutRoom { id: string; jid: string; name: string; isMainRoom?: boolean; participants: Record; } interface BreakoutRoomParticipant { displayName: string; jid: string; role: string; } type BreakoutRoomsMap = Record; // ============================================================================ // COMMAND TYPES // ============================================================================ interface SendTonesOptions { /** The dial pad touch tones to play. For example, '12345#'. */ tones: string; /** The number of milliseconds each tone should play. Default is 200. */ duration?: number; /** The number of milliseconds between each tone. Default is 200. */ pause?: number; } interface NoiseSuppressionOptions { /** Enable or disable noise suppression. */ enabled: boolean; } interface RecordingOptions { /** Recording mode: 'local', 'file', or 'stream'. */ mode: RecordingMode; /** Dropbox OAuth2 token. */ dropboxToken?: string; /** Whether to only record the local streams. Only applies to 'local' mode. */ onlySelf?: boolean; /** Whether the recording should be shared with the participants. */ shouldShare?: boolean; /** The RTMP stream key. */ rtmpStreamKey?: string; /** The RTMP broadcast ID. */ rtmpBroadcastID?: string; /** The YouTube stream key. */ youtubeStreamKey?: string; /** The YouTube broadcast ID. */ youtubeBroadcastID?: string; /** Any extra metadata for file recording. */ extraMetadata?: Record; /** Whether a transcription should be started. */ transcription?: boolean; } interface ResizeFilmStripOptions { /** The desired filmstrip width. */ width: number; } interface OverwriteNameEntry { /** The ID of the participant. */ id: string; /** The new name. */ name: string; } interface CustomNotificationAction { /** The label for the action button. */ label: string; /** The unique identifier for the action. */ uuid: string; } interface ShowNotificationOptions { /** Title of the notification. */ title: string; /** Content of the notification. */ description: string; /** Custom actions to be displayed on the notification. */ customActions?: CustomNotificationAction[]; /** Unique identifier for the notification. */ uid?: string; /** Notification type. */ type?: NotificationType; /** Notification timeout. */ timeout?: NotificationTimeout; } interface ExecuteCommands { displayName?: [string]; password?: [string]; toggleLobby?: [boolean]; sendTones?: [SendTonesOptions]; startShareVideo?: [string]; stopShareVideo?: []; subject?: [string]; localSubject?: [string]; toggleAudio?: []; toggleVideo?: []; toggleFilmStrip?: []; toggleChat?: []; toggleRaiseHand?: []; toggleShareScreen?: []; setNoiseSuppressionEnabled?: [NoiseSuppressionOptions]; toggleSubtitles?: []; toggleTileView?: []; hangup?: []; endConference?: []; email?: [string]; sendCameraFacingMode?: [string, CameraFacingMode?]; sendEndpointTextMessage?: [string, string]; setLargeVideoParticipant?: [string?, VideoType?]; setVideoQuality?: [number]; muteEveryone?: [MediaType?]; muteRemoteParticipant?: [string, MediaType?]; startRecording?: [RecordingOptions]; stopRecording?: [RecordingMode, boolean?]; initiatePrivateChat?: [string]; cancelPrivateChat?: []; kickParticipant?: [string]; grantModerator?: [string]; overwriteConfig?: [Record]; sendChatMessage?: [string, string?, boolean?]; setFollowMe?: [boolean, boolean?]; setSubtitles?: [boolean, boolean?, string?]; setTileView?: [boolean]; answerKnockingParticipant?: [string, boolean]; toggleCamera?: [CameraFacingMode?]; toggleCameraMirror?: []; toggleVirtualBackgroundDialog?: []; pinParticipant?: [string?]; setParticipantVolume?: [string, number]; toggleParticipantsPane?: [boolean]; toggleModeration?: [boolean, MediaType?]; askToUnmute?: [string]; approveVideo?: [string]; rejectParticipant?: [string, MediaType?]; addBreakoutRoom?: [string?]; autoAssignToBreakoutRooms?: []; closeBreakoutRoom?: [string]; joinBreakoutRoom?: [string?]; removeBreakoutRoom?: [string]; resizeFilmStrip?: [ResizeFilmStripOptions]; resizeLargeVideo?: [number, number]; sendParticipantToRoom?: [string, string]; overwriteNames?: [OverwriteNameEntry[]]; showNotification?: [ShowNotificationOptions]; hideNotification?: [string]; toggleWhiteboard?: []; setAssumedBandwidthBps?: [number]; setBlurredBackground?: [BlurType]; setAudioOnly?: [boolean]; setVirtualBackground?: [boolean, string]; [key: string]: unknown[] | undefined; } // ============================================================================ // EVENT TYPES // ============================================================================ interface JitsiMeetEventMap { cameraError: CameraErrorEvent; micError: MicErrorEvent; avatarChanged: AvatarChangedEvent; audioAvailabilityChanged: AudioAvailabilityChangedEvent; audioMuteStatusChanged: AudioMuteStatusChangedEvent; breakoutRoomsUpdated: BreakoutRoomsUpdatedEvent; browserSupport: BrowserSupportEvent; contentSharingParticipantsChanged: ContentSharingParticipantsChangedEvent; customNotificationActionTriggered: CustomNotificationActionTriggeredEvent; dataChannelOpened: DataChannelOpenedEvent; endpointTextMessageReceived: EndpointTextMessageReceivedEvent; nonParticipantMessageReceived: NonParticipantMessageReceivedEvent; faceLandmarkDetected: FaceLandmarkDetectedEvent; errorOccurred: ErrorOccurredEvent; knockingParticipant: KnockingParticipantEvent; largeVideoChanged: LargeVideoChangedEvent; log: LogEvent; screenSharingStatusChanged: ScreenSharingStatusChangedEvent; dominantSpeakerChanged: DominantSpeakerChangedEvent; raiseHandUpdated: RaiseHandUpdatedEvent; tileViewChanged: TileViewChangedEvent; chatUpdated: ChatUpdatedEvent; incomingMessage: IncomingMessageEvent; mouseEnter: MouseEventData; mouseLeave: MouseEventData; mouseMove: MouseEventData; participantMenuButtonClick: ParticipantMenuButtonClickEvent; toolbarButtonClicked: ToolbarButtonClickedEvent; outgoingMessage: OutgoingMessageEvent; displayNameChange: DisplayNameChangeEvent; deviceListChanged: DeviceListChangedEvent; emailChange: EmailChangeEvent; feedbackSubmitted: FeedbackSubmittedEvent; filmstripDisplayChanged: FilmstripDisplayChangedEvent; toolbarVisibilityChanged: ToolbarVisibilityChangedEvent; moderationStatusChanged: ModerationStatusChangedEvent; moderationParticipantApproved: ModerationParticipantApprovedEvent; moderationParticipantRejected: ModerationParticipantRejectedEvent; notificationTriggered: NotificationTriggeredEvent; participantJoined: ParticipantJoinedEvent; participantKickedOut: ParticipantKickedOutEvent; participantLeft: ParticipantLeftEvent; participantRoleChanged: ParticipantRoleChangedEvent; participantsPaneToggled: ParticipantsPaneToggledEvent; passwordRequired: PasswordRequiredEvent; videoConferenceJoined: VideoConferenceJoinedEvent; videoConferenceLeft: VideoConferenceLeftEvent; conferenceCreatedTimestamp: ConferenceCreatedTimestampEvent; videoAvailabilityChanged: VideoAvailabilityChangedEvent; videoMuteStatusChanged: VideoMuteStatusChangedEvent; videoQualityChanged: VideoQualityChangedEvent; readyToClose: ReadyToCloseEvent; recordingLinkAvailable: RecordingLinkAvailableEvent; recordingStatusChanged: RecordingStatusChangedEvent; subjectChange: SubjectChangeEvent; suspendDetected: SuspendDetectedEvent; peerConnectionFailure: PeerConnectionFailureEvent; transcribingStatusChanged: TranscribingStatusChangedEvent; transcriptionChunkReceived: TranscriptionChunkReceivedEvent; whiteboardStatusChanged: WhiteboardStatusChangedEvent; p2pStatusChanged: P2pStatusChangedEvent; audioOnlyChanged: AudioOnlyChangedEvent; } interface CameraErrorEvent { /** A constant representing the overall type of the error. */ type: string; /** Additional information about the error. */ message: string; } interface MicErrorEvent { /** A constant representing the overall type of the error. */ type: string; /** Additional information about the error. */ message: string; } interface AvatarChangedEvent { /** The ID of the participant that changed their avatar. */ id: string; /** The new avatar URL. */ avatarURL: string; } interface AudioAvailabilityChangedEvent { /** New available status. */ available: boolean; } interface AudioMuteStatusChangedEvent { /** New muted status. */ muted: boolean; } interface BreakoutRoomsUpdatedEvent { [roomId: string]: { id: string; jid: string; name: string; isMainRoom?: true; participants: { [participantJid: string]: { displayName: string; jid: string; role: string; }; }; }; } interface BrowserSupportEvent { supported: boolean; } interface ContentSharingParticipantsChangedEvent { data: string[]; } interface CustomNotificationActionTriggeredEvent { data: { /** UUID of the triggered action. */ id: string; }; } // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface DataChannelOpenedEvent {} interface EndpointTextMessageReceivedEvent { senderInfo: { /** The JID of the sender. */ jid: string; /** The participant ID of the sender. */ id: string; }; eventData: { /** The name of the datachannel event. */ name: string; /** The received text from the sender. */ text: string; }; } interface NonParticipantMessageReceivedEvent { /** The ID of the message, may be null. */ id: string | null; /** The message received. */ message: string; } interface FaceLandmarkDetectedEvent { faceBox?: { /** Face bounding box distance as percentage from the left video edge. */ left: number; /** Face bounding box distance as percentage from the right video edge. */ right: number; /** Face bounding box width as percentage of the total video width. */ width: number; }; /** Face expression detected. */ faceExpression: string; } interface ErrorOccurredEvent { error: { /** Additional error details. */ details?: Record; /** The error message. */ message?: string; /** The coded name of the error. */ name: string; /** Error type/source: 'CONFIG', 'CONNECTION', 'CONFERENCE'. */ type: ErrorType; /** Whether this is a fatal error which triggered a reconnect overlay. */ isFatal: boolean; }; } interface KnockingParticipantEvent { participant: { /** The ID of the participant knocking. */ id: string; /** The name of the participant knocking. */ name: string; }; } interface LargeVideoChangedEvent { /** ID of the participant that is now on large video. */ id: string; } interface LogEvent { /** A constant representing the log type. */ logLevel: LogLevel; /** Additional log information. */ args: string; } interface ScreenSharingStatusChangedEvent { /** Whether screen sharing is on. */ on: boolean; details: { /** Source type: 'window', 'screen', 'proxy', 'device', or undefined. */ sourceType?: ScreenShareSourceType; }; } interface DominantSpeakerChangedEvent { /** Participant ID of the new dominant speaker. */ id: string; } interface RaiseHandUpdatedEvent { /** Participant ID of the user who raises/lowers the hand. */ id: string; /** 0 when hand is lowered, timestamp when raised. */ handRaised: number; } interface TileViewChangedEvent { /** Whether tile view is displayed or not. */ enabled: boolean; } interface ChatUpdatedEvent { /** Whether the chat panel is open or not. */ isOpen: boolean; /** The unread messages counter. */ unreadCount: number; } interface IncomingMessageEvent { /** The ID of the user that sent the message. */ from: string; /** The nickname of the user that sent the message. */ nick: string; /** Whether this is a private or group message. */ privateMessage: boolean; /** The text of the message. */ message: string; /** The message timestamp as string (ISO-8601). */ stamp: string; } interface MouseEventData { event: { clientX: number; clientY: number; movementX: number; movementY: number; offsetX: number; offsetY: number; pageX: number; pageY: number; x: number; y: number; screenX: number; screenY: number; }; } interface ParticipantMenuButtonClickEvent { /** The pressed button's key. */ key: string; /** The ID of the participant for which the button was clicked. */ participantId: string; /** Whether the execution of the button click was prevented. */ preventExecution: boolean; } interface ToolbarButtonClickedEvent { /** The pressed button's key. */ key: string; /** Whether the click routine execution was prevented. */ preventExecution: boolean; } interface OutgoingMessageEvent { /** The text of the message. */ message: string; /** Whether this is a private or group message. */ privateMessage: boolean; } interface DisplayNameChangeEvent { /** The ID of the participant that changed their display name. */ id: string; /** The new display name. */ displayname: string; } interface DeviceListChangedEvent { /** The new list of available devices. */ devices: AvailableDevices; } interface EmailChangeEvent { /** The ID of the participant that changed their email. */ id: string; /** The new email. */ email: string; } interface FeedbackSubmittedEvent { /** The error which occurred during submission, if any. */ error?: string; } interface FilmstripDisplayChangedEvent { /** Whether the filmstrip is displayed or hidden. */ visible: boolean; } interface ToolbarVisibilityChangedEvent { /** Whether the toolbar is currently visible. */ visible: boolean; } interface ModerationStatusChangedEvent { /** The media type for which moderation changed. */ mediaType: MediaType; /** Whether moderation is enabled. */ enabled: boolean; } interface ModerationParticipantApprovedEvent { /** The ID of the participant that got approved. */ id: string; /** The media type for which the participant was approved. */ mediaType: MediaType; } interface ModerationParticipantRejectedEvent { /** The ID of the participant that got rejected. */ id: string; /** The media type for which the participant was rejected. */ mediaType: MediaType; } interface NotificationTriggeredEvent { /** The notification title. */ title: string; /** The notification description. */ description: string; } interface ParticipantJoinedEvent { /** The ID of the participant. */ id: string; /** The display name of the participant. */ displayName: string; } interface ParticipantKickedOutEvent { kicked: { /** The ID of the participant removed from the room. */ id: string; /** Whether the participant is the local participant. */ local: boolean; }; kicker: { /** The ID of the participant who kicked out the other participant. */ id: string; }; } interface ParticipantLeftEvent { /** The ID of the participant. */ id: string; } interface ParticipantRoleChangedEvent { /** The ID of the participant. */ id: string; /** The new role of the participant. */ role: ParticipantRole; } interface ParticipantsPaneToggledEvent { /** Whether the pane is open or not. */ open: boolean; } // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface PasswordRequiredEvent {} interface VideoConferenceJoinedEvent { /** The room name of the conference. */ roomName: string; /** The ID of the local participant. */ id: string; /** The display name of the local participant. */ displayName: string; /** The avatar URL of the local participant. */ avatarURL: string; /** Whether the current room is a breakout room. */ breakoutRoom: boolean; /** Whether the current user is a visitor. */ visitor: boolean; } interface VideoConferenceLeftEvent { /** The room name of the conference. */ roomName: string; } interface ConferenceCreatedTimestampEvent { /** Time the conference started. */ timestamp: number; } interface VideoAvailabilityChangedEvent { /** New available status. */ available: boolean; } interface VideoMuteStatusChangedEvent { /** New muted status. */ muted: boolean; } interface VideoQualityChangedEvent { /** The height of the resolution related to the new video quality setting. */ videoQuality: number; } // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface ReadyToCloseEvent {} interface RecordingLinkAvailableEvent { /** The recording link. */ link: string; /** The time to live of the recording link. */ ttl: number; } interface RecordingStatusChangedEvent { /** New recording status. */ on: boolean; /** Recording mode: 'local', 'stream', or 'file'. */ mode: RecordingMode; /** Error type if recording fails. */ error?: string; /** Whether a transcription is active. */ transcription: boolean; } interface SubjectChangeEvent { /** The new subject. */ subject: string; } // eslint-disable-next-line @typescript-eslint/no-empty-object-type interface SuspendDetectedEvent {} interface PeerConnectionFailureEvent { /** Type of PC, Peer2Peer or JVB connection. */ isP2P: boolean; /** Was this connection previously connected. */ wasConnected: boolean; } interface TranscribingStatusChangedEvent { on: boolean; } interface TranscriptionChunkReceivedEvent { /** Transcription language. */ language: string; /** ID for this chunk. */ messageID: string; /** Participant info. */ participant: { avatarUrl: string; id: string; name: string; }; /** Final transcription text. */ final?: string; /** High accuracy transcription text. */ stable?: string; /** Low accuracy transcription text. */ unstable?: string; } interface WhiteboardStatusChangedEvent { /** New whiteboard status. */ status: string; } interface P2pStatusChangedEvent { /** Whether the new connection type is P2P. */ isP2p: boolean | null; } interface AudioOnlyChangedEvent { /** Whether audio only is enabled or disabled. */ audioOnlyChanged: boolean; } // ============================================================================ // INVITEE TYPES // ============================================================================ interface PhoneInvitee { type: 'phone'; /** The phone number in E.164 format (e.g., +31201234567). */ number: string; } interface SipInvitee { type: 'sip'; /** The SIP address. */ address: string; } type Invitee = PhoneInvitee | SipInvitee | Record; // ============================================================================ // UTILITY TYPES // ============================================================================ type CameraFacingMode = 'user' | 'environment'; type DeviceType = 'input' | 'output'; type VideoType = 'camera' | 'desktop'; type MediaType = 'audio' | 'video'; type RecordingMode = 'local' | 'file' | 'stream'; type NotificationType = 'normal' | 'success' | 'warning' | 'error'; type NotificationTimeout = 'short' | 'medium' | 'long' | 'sticky'; type BlurType = 'slight-blur' | 'blur' | 'none'; type ErrorType = 'CONFIG' | 'CONNECTION' | 'CONFERENCE'; type LogLevel = 'info' | 'error' | 'debug' | 'warn'; type ScreenShareSourceType = 'window' | 'screen' | 'proxy' | 'device'; type ParticipantRole = 'none' | 'moderator' | 'participant'; type ToolbarButton = | 'camera' | 'chat' | 'closedcaptions' | 'desktop' | 'dock-iframe' | 'download' | 'embedmeeting' | 'end-meeting' | 'etherpad' | 'feedback' | 'filmstrip' | 'fullscreen' | 'hangup' | 'hangup-menu' | 'help' | 'highlight' | 'invite' | 'linktosalesforce' | 'livestreaming' | 'microphone' | 'mute-everyone' | 'mute-video-everyone' | 'noisesuppression' | 'participants-pane' | 'profile' | 'raisehand' | 'reactions' | 'recording' | 'security' | 'select-background' | 'settings' | 'shareaudio' | 'sharedvideo' | 'shortcuts' | 'stats' | 'tileview' | 'toggle-camera' | 'undock-iframe' | 'videoquality' | 'whiteboard' | '__end'; interface ButtonWithNotifyClick { key: ToolbarButton; preventExecution: boolean; } type SettingsSection = | 'devices' | 'language' | 'moderator' | 'profile' | 'calendar' | 'sounds' | 'more'; // ============================================================================ // GLOBAL DECLARATION // ============================================================================ declare global { interface Window { JitsiMeetExternalAPI: typeof JitsiMeetExternalAPI; } const JitsiMeetExternalAPI: typeof import('@jitsi/iframe-api'); } // export = JitsiMeetExternalAPI; export as namespace JitsiMeetExternalAPI;