/// import { StatelessWebexPlugin } from '@webex/webex-core'; import { ClientEvent, ClientEventLeaveReason } from '@webex/internal-plugin-metrics'; import type { ClientEvent as RawClientEvent } from '@webex/event-dictionary-ts'; import { MediaType, StatsAnalyzer, NetworkQualityMonitor, StatsMonitor } from '@webex/internal-media-core'; import { DataChannelTokenType } from '@webex/internal-plugin-llm'; import { LocalStream, LocalCameraStream, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream } from '@webex/media-helpers'; import Roap, { type TurnDiscoverySkipReason } from '../roap/index'; import { type TurnServerInfo } from '../roap/types'; import { type BundlePolicy } from '../media'; import MediaProperties from '../media/properties'; import ReconnectionManager from '../reconnection-manager'; import MeetingRequest from './request'; import Members from '../members/index'; import { DESTINATION_TYPE, NETWORK_STATUS } from '../constants'; import { ReceiveSlotManager } from '../multistream/receiveSlotManager'; import { MediaRequestManager } from '../multistream/mediaRequestManager'; import { Configuration as RemoteMediaManagerConfiguration, RemoteMediaManager } from '../multistream/remoteMediaManager'; import { ReactionServerType, SkinToneType } from '../reactions/reactions.type'; import InMeetingActions from './in-meeting-actions'; import RecordingController from '../recording-controller'; import ControlsOptionsManager from '../controls-options-manager'; import { LocusMediaRequest } from './locusMediaRequest'; import { BrbState } from './brbState'; import { SetStageOptions } from './request.type'; import { Invitee } from './type'; import { DataSet, Metadata } from '../hashTree/hashTreeParser'; import { LocusDTO } from '../locus-info/types'; export type CaptionData = { id: string; isFinal: boolean; translations: Array; text: string; currentCaptionLanguage: string; timestamp: string; speaker: string; }; export type Transcription = { languageOptions: { captionLanguages?: string; maxLanguages?: number; spokenLanguages?: Array; currentCaptionLanguage?: string; requestedCaptionLanguage?: string; currentSpokenLanguage?: string; }; status: string; isListening: boolean; commandText: string; captions: Array; showCaptionBox: boolean; transcribingRequestStatus: string; isCaptioning: boolean; speakerProxy: Map; interimCaptions: Map; }; export type LocalStreams = { microphone?: LocalMicrophoneStream; camera?: LocalCameraStream; screenShare?: { audio?: LocalSystemAudioStream; video?: LocalDisplayStream; }; }; export type AddMediaOptions = { localStreams?: LocalStreams; audioEnabled?: boolean; videoEnabled?: boolean; shareAudioEnabled?: boolean; shareVideoEnabled?: boolean; remoteMediaManagerConfig?: RemoteMediaManagerConfiguration; bundlePolicy?: BundlePolicy; allowMediaInLobby?: boolean; allowPublishMediaInLobby?: boolean; additionalMediaOptions?: AdditionalMediaOptions; }; export type AdditionalMediaOptions = { sendVideo?: boolean; receiveVideo?: boolean; sendAudio?: boolean; receiveAudio?: boolean; }; export type CallStateForMetrics = { correlationId?: string; sessionCorrelationId?: string; joinTrigger?: string; loginType?: string; userNameInput?: string; emailInput?: string; pstnCorrelationId?: string; }; export declare const MEDIA_UPDATE_TYPE: { TRANSCODED_MEDIA_CONNECTION: string; SHARE_FLOOR_REQUEST: string; UPDATE_MEDIA: string; }; export declare enum ScreenShareFloorStatus { PENDING = "floor_request_pending", GRANTED = "floor_request_granted", RELEASED = "floor_released" } type FetchMeetingInfoParams = { password?: string; registrationId?: string; classificationId?: string; captchaCode?: string; extraParams?: Record; sendCAevents?: boolean; }; /** * MediaDirection * @typedef {Object} MediaDirection * @property {boolean} sendAudio * @property {boolean} receiveAudio * @property {boolean} sendVideo * @property {boolean} receiveVideo * @property {boolean} sendShare * @property {boolean} receiveShare * @property {boolean} isSharing */ /** * SharePreferences * @typedef {Object} SharePreferences * @property {Object} [shareConstraints] * @property {Boolean} [highFrameRate] */ /** * JoinOptions * @typedef {Object} JoinOptions * @property {String} [resourceId] * @property {String} [pin] * @property {Boolean} [moderator] * @property {String|Object} [meetingQuality] * @property {String} [meetingQuality.remote] * @property {Boolean} [rejoin] * @property {Boolean} [enableMultistream] */ /** * Recording * @typedef {Object} Recording * @property {Object} state * @property {String} modifiedBy */ /** * Meeting State Change Event * Emitted when ever there is a meeting state change * @event meeting:stateChange * @instance * @type {Object} * @property {String} currentState current state of the meeting * @property {String} previousState previous state of the meeting * @memberof Meeting */ /** * Media Ready Event * Emitted when a stream is ready to be rendered * @event media:ready * @instance * @type {Object} * @property {MediaStream} stream the media stream * @property {String} type what type of stream, remote, local * @memberof Meeting */ /** * Media Stopped Event * Emitted when a stream has stopped sending * @event media:stopped * @instance * @type {Object} * @property {String} type what type of stream, remote, local * @memberof Meeting */ /** * Meeting Ringing Event * Emitted when this client should play a ringing sound, because this member is getting an incoming meeting * or sending out an incoming meeting * @event meeting:ringing * @instance * @type {Object} * @property {String} type // INCOMING or JOIN * @property {String} id * @memberof Meeting */ /** * Meeting Ringing Stop Event * Emitted when this client should stop playing a ringing sound * @event meeting:ringingStop * @instance * @type {Object} * @property {Object} type * @property {Boolean} type.remoteAnswered * @property {Boolean} type.remoteDeclined * @property {String} id * @memberof Meeting */ /** * Meeting Started Sharing Local Event * Emitted when this member starts sharing * @event meeting:startedSharingLocal * @instance * @type {Object} * @memberof Meeting */ /** * Meeting Stopped Sharing Local Event * Emitted when this member stops sharing * @event meeting:stoppedSharingLocal * @instance * @type {Object} * @memberof Meeting */ /** * Meeting Started Sharing Remote Event * Emitted when remote sharing starts * @event meeting:startedSharingRemote * @instance * @type {Object} * @property {Boolean} memberId id of the meeting member that started screen share * @property {String} url of this content share * @property {String} shareInstanceId of this content share * @property {Object} annotation Info of this content share * @memberof Meeting * */ /** * Meeting Stopped Sharing Remote Event * Emitted when remote screen sharing ends * @event meeting:stoppedSharingRemote * @instance * @type {Object} * @memberof Meeting */ /** * Meeting Locked Event * Emitted when a meeting is locked * @event meeting:locked * @instance * @type {Object} * @property {Object} info * @memberof Meeting */ /** * Meeting Unlocked Event * Emitted when a meeting is unlocked * @event meeting:unlocked * @instance * @type {Object} * @property {Object} info * @memberof Meeting */ /** * Meeting Actions Update Event * Emitted when a user can take actions on a meeting such as lock, unlock, assign host * @event meeting:actionsUpdate * @instance * @type {Object} * @property {Boolean} canLock * @property {Boolean} canUnlock * @property {Boolean} canAssignHost * @memberof Meeting */ /** * Meeting Unmuted By Others Event * Emitted when a member is unmuted by another member * @event meeting:self:unmutedByOthers * @instance * @type {Object} * @property {Object} payload * @memberof Meeting */ /** * Meeting Muted By Others Event * Emitted when a member is muted by another member * @event meeting:self:mutedByOthers * @instance * @type {Object} * @property {Object} payload * @property {Boolean} payload.unmuteAllowed - whether the user is allowed to unmute self * @memberof Meeting */ /** * Meeting Muted By Others Event * Emitted when the host(moderator)/co-host requests a user to unmute * @event meeting:self:requestedToUnmute * @instance * @type {Object} * @property {Object} payload * @memberof Meeting */ /** * Meeting Self Guest Admitted Event * Emitted when a joined user get admitted to the meeting by another member or host * @event meeting:self:guestAdmitted * @instance * @type {Object} * @property {Object} payload * @memberof Meeting */ /** * Meeting Self Lobby Waiting Event * Emitted when joined user enters the lobby and is waiting for the webex meeting to begin * @event meeting:self:lobbyWaiting * @instance * @type {Object} * @property {Object} reason Reason why user left the meeting * @memberof Meeting */ /** * Meeting Self Left State * Emitted when user is inactive for more then 40 seconds, User can rejoin the meeting again * @event meeting:self:left * @instance * @type {Object} * @property {Object} payload * @memberof Meeting */ /** * Reconnection Starting Event * Emitted when reconnection of media to the active meeting was successful * @event meeting:reconnectionStarting * @instance * @memberof Meeting */ /** * Reconnection Success Event * Emitted when reconnection of media to the active meeting was successful * @event meeting:reconnectionSuccess * @instance * @type {Object} * @property {Object} reconnect * @memberof Meeting */ /** * Reconnection Failure Event * Emitted when reconnection of media to the active meeting was successful * @event meeting:reconnectionFailure * @instance * @type {Object} * @property {Error} error * @memberof Meeting */ /** * Meeting network quality event * Emitted on each interval of retrieving stats Analyzer data * @event network:quality * @type {Object} * @property {string} mediaType {video|audio} * @property {number} networkQualityScore - {1|0} 1 indicates acceptable uplink 0 indicates unacceptable uplink based on threshold * @memberof Meeting */ /** * @description Meeting is the crux of the plugin * @export * @class Meeting */ export default class Meeting extends StatelessWebexPlugin { #private; attrs: any; audio: any; breakouts: any; simultaneousInterpretation: any; annotation: any; aiEnableRequest: any; webinar: any; conversationUrl: string; callStateForMetrics: CallStateForMetrics; destination: string; destinationType: DESTINATION_TYPE; deviceUrl: string; hostId: string; id: string; isMultistream: boolean; locusUrl: string; mediaConnections: any[]; mediaId?: string; meetingFiniteStateMachine: any; meetingInfo: any; meetingRequest: MeetingRequest; members: Members; options: object; orgId: string; owner: string; partner: any; policy: string; reconnectionManager: ReconnectionManager; resource: string; roap: Roap; roapSeq: number; selfUrl?: string; sipUri: string; type: string; userId: string; video: any; callEvents: any[]; datachannelUrl: string; deferJoin: Promise; dialInDeviceStatus: string; dialInUrl: string; dialOutDeviceStatus: string; dialOutUrl: string; fetchMeetingInfoTimeoutId: NodeJS.Timeout; floorGrantPending: boolean; hasJoinedOnce: boolean; hasWebsocketConnected: boolean; inMeetingActions: InMeetingActions; isLocalShareLive: boolean; isRoapInProgress: boolean; keepAliveTimerId: NodeJS.Timeout; lastVideoLayoutInfo: any; locusInfo: any; isUserUnadmitted?: boolean; joinedWith?: any; selfId?: string; roles: any[]; locusMediaRequest?: LocusMediaRequest; mediaProperties: MediaProperties; mediaRequestManagers: { audio: MediaRequestManager; video: MediaRequestManager; screenShareAudio: MediaRequestManager; screenShareVideo: MediaRequestManager; }; meetingInfoFailureReason: string; meetingInfoFailureCode?: number; meetingInfoExtraParams?: Record; networkQualityMonitor: NetworkQualityMonitor; networkStatus?: NETWORK_STATUS; passwordStatus: string; queuedMediaUpdates: any[]; recording: any; remoteMediaManager: RemoteMediaManager | null; recordingController: RecordingController; controlsOptionsManager: ControlsOptionsManager; requiredCaptcha: any; receiveSlotManager: ReceiveSlotManager; selfUserPolicies: any; enforceVBGImagesURL: string; shareStatus: string; screenShareFloorState: ScreenShareFloorStatus; statsAnalyzer: StatsAnalyzer; statsMonitor: StatsMonitor; transcription: Transcription; updateMediaConnections: (mediaConnections: any[]) => void; userDisplayHints: any; endCallInitJoinReq: any; endJoinReqResp: any; endLocalSDPGenRemoteSDPRecvDelay: any; locusId: any; startCallInitJoinReq: any; startJoinReqResp: any; startLocalSDPGenRemoteSDPRecvDelay: any; wirelessShare: any; guest: any; meetingJoinUrl: any; meetingNumber: any; meetingState: any; permissionToken: string; permissionTokenPayload: any; permissionTokenReceivedLocalTime: number; resourceId: any; resourceUrl: string; state: any; localAudioStreamMuteStateHandler: () => void; localVideoStreamMuteStateHandler: () => void; localOutputTrackChangeHandler: () => void; localConstraintsChangeHandler: () => void; environment: string; namespace: string; allowMediaInLobby: boolean; localShareInstanceId: string; remoteShareInstanceId: string; shareCAEventSentStatus: { transmitStart: boolean; transmitStop: boolean; receiveStart: boolean; receiveStop: boolean; }; turnDiscoverySkippedReason: TurnDiscoverySkipReason; turnServerUsed: boolean; areVoiceaEventsSetup: boolean; isMoveToInProgress: boolean; registrationIdStatus: string; brbState: BrbState; voiceaListenerCallbacks: object; private addMediaData; private sendSlotManager; private deferSDPAnswer?; private sdpResponseTimer?; private hasMediaConnectionConnectedAtLeastOnce; private joinWithMediaRetryInfo?; private connectionStateHandler?; private iceCandidateErrors; private iceCandidatesCount; private rtcMetrics?; private uploadLogsTimer?; private logUploadIntervalIndex; private mediaServerIp; private llmHealthCheckTimer?; /** * @param {Object} attrs * @param {Object} options * @param {Function} callback - if provided, it will be called with the newly created meeting object as soon as the meeting.id is set * @constructor * @memberof Meeting */ constructor(attrs: any, options: object, callback: (meeting: Meeting) => void); /** * returns meeting is joined * @private * @memberof Meeting * @returns {Boolean} */ private isJoined; /** * Returns whether this meeting is a Locus CALL * @returns {Boolean} */ isLocusCall(): boolean; /** * Getter - Returns callStateForMetrics.correlationId * @returns {string} */ get correlationId(): string; /** * Setter - sets callStateForMetrics.correlationId * @param {string} correlationId */ set correlationId(correlationId: string); /** * Getter - Returns callStateForMetrics.pstnCorrelationId * @returns {string | undefined} */ get pstnCorrelationId(): string | undefined; /** * Setter - sets callStateForMetrics.pstnCorrelationId * @param {string | undefined} correlationId */ set pstnCorrelationId(correlationId: string | undefined); /** * Getter - Returns callStateForMetrics.userNameInput * @returns {string} */ get userNameInput(): string; /** * Setter - sets callStateForMetrics.userNameInput * @param {string} userNameInput */ set userNameInput(userNameInput: string); /** * Getter - Returns callStateForMetrics.emailInput * @returns {string} */ get emailInput(): string; /** * Setter - sets callStateForMetrics.emailInput * @param {string} emailInput */ set emailInput(emailInput: string); /** * Getter - Returns callStateForMetrics.sessionCorrelationId * @returns {string} */ get sessionCorrelationId(): string; /** * Setter - sets callStateForMetrics.sessionCorrelationId * @param {string} sessionCorrelationId */ set sessionCorrelationId(sessionCorrelationId: string); /** * Getter - Returns isoLocalClientMeetingJoinTime * This will be set once on meeting join, and not updated again * @returns {string | undefined} */ get isoLocalClientMeetingJoinTime(): string | undefined; /** * Setter - sets isoLocalClientMeetingJoinTime * This will be set once on meeting join, and not updated again * this will always produce an ISO string * If the iso string is invalid, it will fallback to the current system time * @param {string | undefined} time */ set isoLocalClientMeetingJoinTime(time: string | undefined); /** * Set meeting info and trigger `MEETING_INFO_AVAILABLE` event * @param {any} info * @param {string} [meetingLookupUrl] Lookup url, defined when the meeting info fetched * @returns {void} */ private setMeetingInfo; /** * Add pre-fetched meeting info * * The passed meeting info should be be complete, e.g.: fetched after password or captcha provided * * @param {Object} meetingInfo - Complete meeting info * @param {FetchMeetingInfoParams} fetchParams - Fetch parameters for validation * @param {String|undefined} meetingLookupUrl - Lookup url, defined when the meeting info fetched * @returns {Promise} */ injectMeetingInfo(meetingInfo: any, fetchParams: FetchMeetingInfoParams, meetingLookupUrl: string | undefined): Promise; /** * Validate fetch parameters and clear the fetchMeetingInfoTimeout timeout * * @param {FetchMeetingInfoParams} fetchParams - fetch parameters for validation * @param {String} caller - Name of the caller for logging * * @returns {Promise} * @private */ private prepForFetchMeetingInfo; /** * Internal method for fetching meeting info * * @returns {Promise} */ private fetchMeetingInfoInternal; /** * Refreshes the meeting info permission token (it's required for joining meetings) * * @param {string} [reason] used for metrics and logging purposes (optional) * @returns {Promise} */ refreshPermissionToken(reason?: string): Promise; /** * Fetches meeting information. * @param {Object} options * @param {String} [options.password] optional * @param {String} [options.captchaCode] optional * @param {Boolean} [options.sendCAevents] optional - Whether to submit Call Analyzer events or not. Default: false. * @public * @memberof Meeting * @returns {Promise} */ fetchMeetingInfo(options: FetchMeetingInfoParams): Promise; /** * Checks if the supplied password/host key is correct. It returns a promise with information whether the * password and captcha code were correct or not. * @param {String} password - this can be either a password or a host key, can be undefined if only captcha was required * @param {String} captchaCode - can be undefined if captcha was not required by the server * @param {Boolean} sendCAevents - whether Call Analyzer events should be sent when fetching meeting information * @public * @memberof Meeting * @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>} */ verifyPassword(password: string, captchaCode: string, sendCAevents?: boolean): Promise<{ isPasswordValid: boolean; requiredCaptcha: any; failureReason: string; } | { isPasswordValid: boolean; requiredCaptcha: any; failureReason: string; }>; /** * Checks if the supplied registrationId is correct. It returns a promise with information whether the * registrationId and captcha code were correct or not. * @param {String | undefined} registrationId - can be undefined if only captcha was required * @param {String | undefined} captchaCode - can be undefined if captcha was not required by the server * @param {Boolean} sendCAevents - whether Call Analyzer events should be sent when fetching meeting information * @public * @memberof Meeting * @returns {Promise<{isRegistrationIdValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>} */ verifyRegistrationId(registrationId: string, captchaCode: string, sendCAevents?: boolean): Promise<{ isRegistrationIdValid: boolean; requiredCaptcha: any; failureReason: string; } | { isRegistrationIdValid: boolean; requiredCaptcha: any; failureReason: string; }>; /** * Refreshes the captcha. As a result the meeting will have new captcha id, image and audio. * If the refresh operation fails, meeting remains with the old captcha properties. * @public * @memberof Meeting * @returns {Promise} */ refreshCaptcha(): any; /** * Posts metrics event for this meeting. Allows the app to send Call Analyzer events. * @param {String} eventName - Call Analyzer event * @public * @memberof Meeting * @returns {Promise} */ postMetrics(eventName: ClientEvent['name']): void; /** * Proxy function for all the listener set ups * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusInfoListeners; /** * Set up the listeners for breakouts * @returns {undefined} * @private * @memberof Meeting */ setUpBreakoutsListener(): void; /** * Set up the listeners for interpretation * @returns {undefined} * @private * @memberof Meeting */ private setUpInterpretationListener; /** * Set up the listeners for captions * @returns {undefined} * @private * @memberof Meeting */ private setUpVoiceaListeners; /** * Set up the locus info listener for meetings disconnected due to inactivity * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusInfoMediaInactiveListener; /** * Set up the locus info listener for assign host permissions on a meeting * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusInfoAssignHostListener; /** * Set up the internal locus info full state object listener * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusFullStateListener; /** * sets the network status on meeting object * @param {NETWORK_STATUS} networkStatus * @private * @returns {undefined} * @memberof Meeting */ private setNetworkStatus; /** * Set up the locus info self listener * update self value for members and updates the member * notifies consumer with members:self:update {activeSelfId endedSelfId} * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusSelfListener; /** * Notify any changes on the pstn devices * @param {Object} payload * @returns {undefined} * @private * @memberof Meeting */ private pstnUpdate; /** * Set up the locus info host listener * update host value for members and updates the member * notifies consumer with members:host:update: {activeHostId, endedHostId} * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusHostListener; /** * Set up the locus info participants update listener * update members collection value for members * notifies consumer with members:update * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusParticipantsListener; /** * Set up the locus info recording update listener * update recording value for the meeting * notifies consumer with: * meeting:recording:started * meeting:recording:stopped * meeting:recording:paused * meeting:recording:resumed * * Set up the locus info meeeting container listener * update meetingContainerUrl value for the meeting * notifies consumer with: * meeting:meetingContainer:update * * @returns {undefined} * @private * @memberof Meeting */ private setupLocusControlsListener; /** * Trigger annotation info update event @returns {undefined} @param {object} contentShare @param {object} previousContentShare */ private triggerAnnotationInfoEvent; /** * Set up the locus info media shares listener * update content and whiteboard sharing id value for members, and updates the member * notifies consumer with members:content:update {activeContentSharingId, endedContentSharingId} * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusMediaSharesListener; /** * Set up the locus info url listener * update locus_url value for members * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusUrlListener; /** * Set up the locus info service link listener * update the locusInfo for recording controller * does not currently re-emit the event as it's internal only * payload is unused * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusServicesListener; /** * Set up the locus info resources link listener * update the locusInfo for webcast instance url * @param {Object} payload - The event payload * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusResourcesListener; /** * Set up the locus info meeting info listener * @returns {undefined} * @private * @memberof meeting */ private setUpLocusInfoMeetingInfoListener; /** * Handles a data channel URL change * @param {String} datachannelUrl * @returns {void} */ handleDataChannelUrlChange(datachannelUrl: any): void; /** * Set up the locus info embedded apps listener * @returns {undefined} * @private * @memberof meeting */ private setUpLocusEmbeddedAppsListener; /** * Internal function to listen to the self object changes * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusInfoSelfListener; /** * Add LocusInfo nested object listeners (from child to parent) * @returns {undefined} * @private * @memberof Meeting */ private setUpLocusInfoMeetingListener; /** * Set meeting values rather than events * @param {Object} object * @returns {undefined} * @private * @memberof Meeting * // TODO: is this function necessary? */ private updateMeetingObject; /** * Invite a guest to the call that isn't normally part of this call * @param {Invitee} invitee * @param {String} invitee.emailAddress * @param {String} invitee.email * @param {String} invitee.phoneNumber * @param {Boolean} [alertIfActive] * @param {Boolean} [invitee.skipEmailValidation] * @param {Boolean} [invitee.isInternalNumber] * @returns {Promise} see #members.addMember * @public * @memberof Meeting */ invite(invitee: Invitee, alertIfActive?: boolean): any; /** * Cancel an outgoing phone call invitation made during a meeting * @param {Invitee} invitee * @param {String} invitee.phoneNumber * @returns {Promise} see #members.cancelPhoneInvite * @public * @memberof Meeting */ cancelPhoneInvite(invitee: Invitee): any; /** * Cancel an SIP/phone call invitation made during a meeting * @param {Invitee} invitee * @param {String} invitee.memberId * @param {Boolean} [invitee.isInternalNumber] - When cancel phone invitation, if the number is internal * @returns {Promise} see #members.cancelInviteByMemberId * @public * @memberof Meeting */ cancelInviteByMemberId(invitee: Invitee): any; /** * Admit the guest(s) to the call once they are waiting. * If the host/cohost is in a breakout session, the locus url * of the session must be provided as the authorizingLocusUrl. * Regardless of host/cohost location, the locus Id (lid) in * the path should be the locus Id of the main, which means the * locus url of the api call must be from the main session. * If these loucs urls are not provided, the function will do the check. * @param {Array} memberIds * @param {Object} sessionLocusUrls: {authorizingLocusUrl, mainLocusUrl} * @returns {Promise} see #members.admitMembers * @public * @memberof Meeting */ admit(memberIds: Array, sessionLocusUrls?: { authorizingLocusUrl: string; mainLocusUrl: string; }): any; /** * Manages be right back status updates for the current participant. * * @param {boolean} enabled - Indicates whether the user enabled brb or not. * @returns {Promise} resolves when the brb status is updated or does nothing if not in a multistream meeting. * @throws {Error} - Throws an error if the request fails. */ beRightBack(enabled: boolean): Promise; /** * Remove the member from the meeting, boot them * @param {String} memberId * @returns {Promise} see #members.removeMember * @public * @memberof Meeting */ remove(memberId: string): any; /** * Mute another member from the meeting * @param {String} memberId * @param {Boolean} mute * @returns {Promise} see #members.muteMember * @public * @memberof Meeting */ mute(memberId: string, mute?: boolean): any; /** * Transfer the moderator role to another eligible member * @param {String} memberId * @param {Boolean} moderator * @returns {Promise} see #members.transferHostToMember * @public * @memberof Meeting */ transfer(memberId: string, moderator?: boolean): any; /** * Reference to the Members object * @returns {Members} * @public * @memberof Meeting */ getMembers(): Members; /** * Sets the meeting info on the class instance * @param {Object} meetingInfo * @param {String} meetingInfo.conversationUrl * @param {String} meetingInfo.locusUrl * @param {String} meetingInfo.sipUri * @param {String} [meetingInfo.sipUrl] * @param {String} [meetingInfo.sipMeetingUri] * @param {String} [meetingInfo.meetingNumber] * @param {String} [meetingInfo.meetingJoinUrl] * @param {String} [meetingInfo.hostId] * @param {String} [meetingInfo.permissionToken] * @param {String} [meetingInfo.channel] * @param {Object} meetingInfo.owner * @param {Object | String} destination locus object with meeting data or destination string (sip url, meeting link, etc) * @param {Object | String} errors Meeting info request error * @returns {undefined} * @private * @memberof Meeting */ parseMeetingInfo(meetingInfo: { conversationUrl: string; locusUrl: string; sipUri: string; owner: object; sipUrl?: string; sipMeetingUri?: string; meetingNumber?: string; meetingJoinUrl?: string; hostId?: string; permissionToken?: string; channel?: string; }, destination?: object | string | null, errors?: any): void; /** * Indicates whether policy can be applied * @returns {boolean} */ private arePolicyRestrictionsSupported; /** * Updates the meeting actions (display hints), depends on locus display hints, user policy and app api info * @returns {undefined} * @private * @memberof Meeting */ private updateMeetingActions; /** * Sets the self user policies based on the contents of the permission token * @returns {void} */ setSelfUserPolicies(): void; /** * Sets the permission token payload on the class instance * * @param {String} permissionToken * @returns {void} */ setPermissionTokenPayload(permissionToken: string): void; /** * Sets the sip uri on the class instance * uses meeting info as precedence * @param {String} sipUri * @returns {undefined} * @private * @memberof Meeting */ setSipUri(sipUri: string): void; /** * Set the locus info the class instance. Should be called with the parsed locus * we got in the join response. * * @param {Object} data * @param {Array} data.mediaConnections * @param {String} data.locusUrl * @param {String} data.locusId * @param {String} data.mediaId * @param {Object} data.host * @todo change name to genertic parser * @returns {undefined} * @private * @memberof Meeting */ setLocus(data: { locus: LocusDTO; mediaConnections: Array; locusUrl: string; locusId: string; mediaId: string; host: object; selfId: string; dataSets: DataSet[]; metadata: Metadata; }): void; /** * Upload logs for the current meeting * @param {object} options file name and function name * @returns {undefined} * @public * @memberof Meeting */ uploadLogs(options?: object): void; /** * sets the timer for periodic log upload * @returns {void} */ private setLogUploadTimer; /** * Starts a periodic upload of logs * * @returns {undefined} */ startPeriodicLogUpload(): void; /** * Stops the periodic upload of logs * * @returns {undefined} */ stopPeriodicLogUpload(): void; /** * Removes remote audio, video and share streams from class instance's mediaProperties * @returns {undefined} */ unsetRemoteStreams(): void; /** * Removes the remote stream on the class instance and triggers an event * to developers * @returns {undefined} * @public * @memberof Meeting * @deprecated after v1.89.3 */ closeRemoteStream(): void; /** * Removes the remote streams on the class instance and triggers an event * to developers * @returns {undefined} * @memberof Meeting */ closeRemoteStreams(): Promise<[any, any, any]>; /** * Stores the reference to a new microphone stream, sets up the required event listeners * on it, cleans up previous stream, etc. * * @param {LocalMicrophoneStream | null} localStream local microphone stream * @returns {Promise} */ private setLocalAudioStream; /** * Stores the reference to a new camera stream, sets up the required event listeners * on it, cleans up previous stream, etc. * * @param {LocalCameraStream | null} localStream local camera stream * @returns {Promise} */ private setLocalVideoStream; /** * Stores the reference to a new screen share stream, sets up the required event listeners * on it, cleans up previous stream, etc. * It also sends the floor grant/release request. * * @param {LocalDisplayStream | undefined} localDisplayStream local display stream * @returns {Promise} */ private setLocalShareVideoStream; /** * Stores the reference to a new screen share audio stream, sets up the required event listeners * on it, cleans up previous stream, etc. * * @param {LocalSystemAudioStream | undefined} localSystemAudioStream local system audio stream * @returns {Promise} */ private setLocalShareAudioStream; /** * sets up listner for mercury event * @returns {undefined} * @public * @memberof Meeting */ setMercuryListener(): void; /** * Close the peer connections and remove them from the class. * Cleanup any media connection related things. * * @param {boolean} resetMuteStates whether to also reset the audio/video mute state information * @returns {Promise} * @public * @memberof Meeting */ closePeerConnections(resetMuteStates?: boolean): Promise; /** * Unsets the peer connections on the class * warning DO NOT CALL WITHOUT CLOSING PEER CONNECTIONS FIRST * @returns {undefined} * @public * @memberof Meeting */ unsetPeerConnections(): void; /** * Convenience method to set the correlation id for the callStateForMetrics * @param {String} id correlation id to set on the callStateForMetrics * @returns {undefined} * @public * @memberof Meeting */ setCorrelationId(id: string): void; /** * Update the callStateForMetrics * @param {CallStateForMetrics} callStateForMetrics updated values for callStateForMetrics * @returns {undefined} * @public * @memberof Meeting */ updateCallStateForMetrics(callStateForMetrics: CallStateForMetrics): void; /** * Enqueue request for screenshare floor and set the status to pending * @returns {Promise} * @private * @memberof Meeting */ private enqueueScreenShareFloorRequest; /** * Mute the audio for a meeting * @returns {Promise} resolves the data from muting audio {mute, self} or rejects if there is no audio set * @public * @memberof Meeting */ muteAudio(): any; /** * Unmute meeting audio * @returns {Promise} resolves data from muting audio {mute, self} or rejects if there is no audio set * @public * @memberof Meeting */ unmuteAudio(): any; /** * Mute the video for a meeting * @returns {Promise} resolves data from muting video {mute, self} or rejects if there is no video set * @public * @memberof Meeting */ muteVideo(): any; /** * Unmute meeting video * @returns {Promise} resolves data from muting video {mute, self} or rejects if there is no video set * @public * @memberof Meeting */ unmuteVideo(): any; /** * Shorthand function to join AND set up media * @param {Object} options - options to join with media * @param {JoinOptions} [options.joinOptions] - see #join() * @param {AddMediaOptions} [options.mediaOptions] - see #addMedia() * @returns {Promise} -- {join: see join(), media: see addMedia(), multistreamEnabled: flag to indicate if we managed to join in multistream mode} * @public * @memberof Meeting * @example * joinWithMedia({ * joinOptions: {resourceId: 'resourceId' }, * mediaOptions: { * localStreams: { microphone: microphoneStream, camera: cameraStream } * } * }) */ joinWithMedia(options?: { joinOptions?: any; mediaOptions?: AddMediaOptions; }): any; /** * Initiates the reconnection of the media in the meeting * * @param {object} options * @returns {Promise} resolves with {reconnect} or errors with {error} * @public * @memberof Meeting */ reconnect(options?: object): Promise; /** * Check if the meeting supports the Webex Assistant feature * @returns {boolean} * @throws TranscriptionNotSupportedError */ isTranscriptionSupported(): boolean; /** * Check if the meeting supports the Reactions * @returns {boolean} */ isReactionsSupported(): boolean; /** * sets Caption language for the meeting * @param {string} language * @returns {Promise} */ setCaptionLanguage(language: string): Promise; /** * sets Spoken language for the meeting * @param {string} language * @returns {Promise} */ setSpokenLanguage(language: string): Promise; /** * This method will enable the transcription for the current meeting if the meeting has enabled/supports Webex Assistant * @param {Object} options object with spokenlanguage setting * @public * @returns {Promise} a promise to open the WebSocket connection */ startTranscription(options?: { spokenLanguage?: string; }): Promise; /** Handles Locus LLM events * * @param {LocusLLMEvent} event - The Locus LLM event to process * @returns {void} */ private processLocusLLMEvent; /** * Callback called when a relay event is received from meeting LLM Connection * @param {RelayEvent} e Event object coming from LLM Connection * @private * @returns {void} */ private processRelayEvent; /** * This method stops receiving transcription for the current meeting * @returns {void} */ stopTranscription(): void; /** * triggers an event to notify that the user * will not receive any more transcription * @private * @returns{void} */ private triggerStopReceivingTranscriptionEvent; /** * This is a callback for the LLM event that is triggered when it comes online * This method in turn will trigger an event to the developers that the LLM is connected * @private * @memberof Meeting * @returns {null} */ private handleLLMOnline; /** * Specify joining via audio (option: pstn), video, screenshare * @param {JoinOptions} options A configurable options object for joining a meeting * @returns {Promise} the join response * @public * @memberof Meeting * Scenario A: Joining own claimed personal meeting room * Scenario B: Joining other's claimed personal meeting room, do pass pin (if desired to join as host, or nullify), do pass moderator * Scenario C: Joining an unclaimed personal meeting room, -do not- pass pin or moderator on first try, -do- pass pin and moderator * if joining as host on second loop, pass pin and pass moderator if joining as guest on second loop * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId) */ join(options?: any): Promise; /** starts a timer that after a few minutes checks if * the LLM connection is connected, if not it sends a metric * @private * @returns {void} */ private startLLMHealthCheckTimer; /** * Clears the LLM health check timer * @private * @returns {void} */ private clearLLMHealthCheckTimer; /** * Disconnects and cleans up the default LLM session listeners/timers. * @param {Object} options * @param {boolean} [options.removeOnlineListener=true] removes the one-time online listener * @param {boolean} [options.throwOnError=true] rethrows disconnect errors when true * @returns {Promise} */ private cleanupLLMConneciton; /** * Connects to low latency mercury and reconnects if the address has changed * It will also disconnect if called when the meeting has ended * @param {String} datachannelUrl * @returns {Promise} */ updateLLMConnection(): Promise; /** * Use phone for meeting audio * @param {String} phoneNumber If provided, it will dial-out using this number. If not provided, dial-in will be used * @returns {Promise} Resolves once the dial-in or dial-out request has completed, or rejects if it failed * @public * @memberof Meeting */ usePhoneAudio(phoneNumber: string): Promise; /** * Determines if the given pstnStatus is in a state which implies the phone is provisioned * @param {String} pstnStatus * @returns {Boolean} * @private * @memberof Meeting */ private isPhoneProvisioned; /** * Enable dial-in for audio * @returns {Promise} Resolves once the dial-in request has completed, or rejects if it failed * @private * @memberof Meeting */ private dialInPstn; /** * Enable dial-out for audio * @param {String} phoneNumber Phone number to dial out to * @returns {Promise} Resolves once the dial-out request has completed (it doesn't wait for the user to answer the phone), or rejects if it failed * @private * @memberof Meeting */ private dialOutPstn; /** * Disconnect meeting audio via phone. * @returns {Promise} Resolves once the phone audio disconnection has completed * @public * @memberof Meeting * @returns {Promise} */ disconnectPhoneAudio(): Promise; /** * Moves the call to the specified resourceId * @param {String} resourceId * @returns {Promise} once the move has been completed * @public * @memberof Meeting */ moveTo(resourceId: string): Promise; /** * Moves the call from the specified resourceId, back to computer * @param {String} resourceId * @returns {Promise} once the move has been completed * @public * @memberof Meeting */ moveFrom(resourceId: string): Promise; /** * Handles ROAP_FAILURE event from the webrtc media connection * * @param {Error} error * @returns {void} */ handleRoapFailure: (error: any) => void; /** * This function makes sure we send the right metrics when local and remote SDPs are processed/generated * * @returns {undefined} */ setupSdpListeners: () => void; setupMediaConnectionListeners: () => void; /** * Registers for all required StatsAnalyzer events * @private * @returns {void} * @memberof Meetings */ setupStatsAnalyzerEventHandlers: () => void; getMediaConnectionDebugId(): string; /** * Creates a webrtc media connection and publishes streams to it * * @param {Object} turnServerInfo TURN server information * @param {BundlePolicy} [bundlePolicy] Bundle policy settings * @param {AddMediaOptions} [options] Options for enabling/disabling audio/video * @returns {RoapMediaConnection | MultistreamRoapMediaConnection} */ private createMediaConnection; /** * Listens for an event emitted by eventEmitter and emits it from the meeting object * * @private * @param {*} eventEmitter object from which to forward the event * @param {*} eventTypeToForward which event type to listen on and to forward * @param {string} meetingEventType event type to be used in the event emitted from the meeting object * @returns {void} */ forwardEvent(eventEmitter: any, eventTypeToForward: any, meetingEventType: any): void; /** * Sets up all the references to local streams in this.mediaProperties before creating media connection * and before TURN discovery, so that the correct mute state is sent with TURN discovery roap messages. * * @private * @param {LocalStreams} localStreams * @returns {Promise} */ private setUpLocalStreamReferences; /** * Calls mediaProperties.waitForMediaConnectionConnected() and sends CA client.ice.end metric on failure * * @private * @returns {Promise} */ private waitForMediaConnectionConnected; /** * Enables statsAnalyser if config allows it * * @private * @returns {void} */ private createStatsAnalyzer; /** * Returns a promise. This promise is created once the local sdp offer has been successfully created and is resolved * once the remote sdp answer has been received. * * @private * @returns {Promise} */ private waitForRemoteSDPAnswer; /** * Calls establishMediaConnection with isForced = true to force turn discovery to happen * * @private * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig] * @param {BundlePolicy} [bundlePolicy] * @returns {Promise} */ private retryEstablishMediaConnectionWithForcedTurnDiscovery; /** * Does relevant clean up before retrying to establish media connection * and performs the retry with forced turn discovery * * @private * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig] * @param {BundlePolicy} [bundlePolicy] * @returns {Promise} */ private retryWithForcedTurnDiscovery; /** * If waitForMediaConnectionConnected() fails when we haven't done turn discovery then we * attempt to establish a media connection again, but this time using turn discovery. If we * used turn discovery on the first pass we do not attempt connection again. * * @private * @param {Error} error * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig] * @param {BundlePolicy} [bundlePolicy] * @returns {Promise} */ private handleWaitForMediaConnectionConnectedError; /** * Performs TURN discovery as a separate call to the Locus /media API * * @param {boolean} isReconnecting * @param {boolean} isForced * @returns {Promise} */ private doTurnDiscovery; /** * Does TURN discovery, SDP offer/answer exhange, establishes ICE connection and DTLS handshake. * * @private * @param {RemoteMediaManagerConfiguration} [remoteMediaManagerConfig] * @param {BundlePolicy} [bundlePolicy] * @param {boolean} [isForced] - let isForced be true to do turn discovery regardless of reachability results * @param {TurnServerInfo} [turnServerInfo] * @returns {Promise} */ private establishMediaConnection; /** * Cleans up stats analyzer, peer connection, and turns off listeners * * @private * @returns {Promise} */ private cleanUpOnAddMediaFailure; /** * Cleans up stats analyzer, peer connection and other things before * we can create a new transcoded media connection * * @private * @returns {Promise} */ private downgradeFromMultistreamToTranscoded; /** * Sends stats report, closes peer connection and cleans up any media connection * related things before trying to establish media connection again with turn server * * @private * @returns {Promise} */ private cleanUpBeforeRetryWithTurnServer; private cleanUpBeforeReconnection; /** * Creates an instance of LocusMediaRequest for this meeting - it is needed for doing any calls * to Locus /media API (these are used for sending Roap messages and updating audio/video mute status). * * @returns {void} */ private setupLocusMediaRequest; /** * Creates a media connection to the server. Media connection is required for sending or receiving any audio/video. * * @param {AddMediaOptions} options * @returns {Promise} * @public * @memberof Meeting */ addMedia(options?: AddMediaOptions): Promise; /** * Internal version of addMedia() with some more arguments for finer control of its behavior * * @param {Function} icePhaseCallback - callback to determine the icePhase for CA "client.ice.end" failure events * @param {TurnServerInfo} turnServerInfo - TURN server information * @param {boolean} forceTurnDiscovery - if true, TURN discovery will be done * @param {AddMediaOptions} options - same as options of the public addMedia() method * @returns {Promise} * @protected * @memberof Meeting */ protected addMediaInternal(icePhaseCallback: () => string, turnServerInfo: TurnServerInfo, forceTurnDiscovery: any, options?: AddMediaOptions): Promise; /** * Informs if the peer connection is in a state that can be updated with updateMedia (audio/video/share) * @returns {Boolean} */ canUpdateMedia(): boolean; /** * media failed, so collect a stats report from webrtc using the wcme connection to grab the rtc stats report * send a webrtc telemetry dump to the configured server using the internal media core check metrics configured callback * @param {String} callFrom - the function calling this function, optional. * @returns {Promise} */ private forceSendStatsReport; /** * Enqueues a media update operation. * @param {String} mediaUpdateType one of MEDIA_UPDATE_TYPE values * @param {Object} options * @returns {Promise} * @private * @memberof Meeting */ private enqueueMediaUpdate; /** * emits event when the negotation is completed * @returns {void} * @private * @memberof Meeting */ mediaNegotiatedEvent: () => void; /** * Checks if there are any queued media updates and runs the first one from * the queue if we are in a state that allows doing that. * @returns {undefined} * @public * @memberof Meeting */ processNextQueuedMediaUpdate: () => void; /** * Updates the media connection - it allows to enable/disable all audio/video/share in the meeting. * This does not affect the published tracks, so for example if a microphone track is published and * updateMedia({audioEnabled: false}) is called, the audio will not be sent or received anymore, * but the track's "published" state is not changed and when updateMedia({audioEnabled: true}) is called, * the sending of the audio from the same track will resume. * * @param {Object} options * @param {boolean} options.audioEnabled [optional] enables/disables receiving and sending of main audio in the meeting * @param {boolean} options.videoEnabled [optional] enables/disables receiving and sending of main video in the meeting * @param {boolean} options.shareEnabled [optional] enables/disables receiving and sending of screen share in the meeting * @returns {Promise} * @public * @memberof Meeting */ updateMedia(options: { audioEnabled?: boolean; videoEnabled?: boolean; shareAudioEnabled?: boolean; shareVideoEnabled?: boolean; }): Promise; /** * Acknowledge the meeting, outgoing or incoming * @param {String} type * @returns {Promise} resolve {message, ringing, response} * @public * @memberof Meeting */ acknowledge(type: string): Promise<{ response: any; }> | Promise<{ message: string; }>; /** * Decline this meeting * @param {String} reason * @returns {undefined} * @public * @memberof Meeting */ decline(reason: string): any; /** * Returns a promise that will resolve to fetch options for leaving a meeting. * * This is to support quickly submitting a leave request when the browser/tab is closing. * Calling meeting.leave will not work because there are some async steps that will * not complete before the browser is closed. Instead, we pre-gather all the * information/options needed for the request(s), and then simply and quickly * fire the fetch(es) when pagehide is triggered. * * We must use fetch instead of request because fetch has a keepalive option that * allows the request it to outlive the page. * * Note: the $timings values will be wrong, but setRequestTimingsAndFetch() will * properly adjust them before submitting. * * @public * @param {Object} options leave options * @param {String} options.resourceId the device with which to leave from, empty if just the computer * @param {any} options.reason the reason for leaving * @returns {Promise} resolves to options to be used with fetch */ buildLeaveFetchRequestOptions(options?: { resourceId?: string; reason?: any; }): any; /** * Leave the current meeting * @param {Object} options - leave options * @param {String} [options.resourceId] - the device with which to leave from, empty if just the computer * @param {String} [options.clientEventLeaveReason] - the leaveReason to include in the Call Analyzer event. * Must be one of: 'paired-leave' | 'one-to-one' | 'ended-by-locus' (defaults to no reason) * https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/main/diagnostic-events.raml#L796 * @param {String} [options.reason] - only used for logging * @returns {Promise} * @public * @memberof Meeting */ leave(options?: { resourceId?: string; clientEventLeaveReason?: ClientEventLeaveReason; reason?: any; }): any; /** * Start sharing whiteboard given channelUrl * @param {string} channelUrl whiteboard url * @param {String} resourceToken token created by authorize media injector * @returns {Promise} * @public * @memberof Meeting */ startWhiteboardShare(channelUrl: string, resourceToken: string): any; /** * Stop sharing whiteboard given channelUrl * @param {string} channelUrl whiteboard url * @returns {Promise} * @public * @memberof Meeting */ stopWhiteboardShare(channelUrl: string): any; /** * Sends a request to Locus to obtain the screen share floor * @returns {Promise} see #meetingRequest.changeMeetingFloor * @private * @memberof Meeting */ private requestScreenShareFloor; /** * Requests screen share floor if such request is pending. * It should be called whenever meeting state changes to JOINED * * @returns {void} */ private requestScreenShareFloorIfPending; /** * Sends a request to Locus to release the screen share floor. * @returns {Promise} see #meetingRequest.changeMeetingFloor * @private * @memberof Meeting */ private releaseScreenShareFloor; /** * Intiate a recording of this meeting * @returns {Promise} * @public * @memberof Meeting */ startRecording(): Promise; /** * set the mute on entry flag for participants if you're the host * @returns {Promise} * @param {boolean} enabled * @public * @memberof Meeting */ setMuteOnEntry(enabled: boolean): Promise; /** * set the disallow unmute flag for participants if you're the host * @returns {Promise} * @param {boolean} enabled * @public * @memberof Meeting */ setDisallowUnmute(enabled: boolean): Promise; /** * set the mute all flag for participants if you're the host * @returns {Promise} * @param {boolean} mutedEnabled * @param {boolean} disallowUnmuteEnabled * @param {boolean} muteOnEntryEnabled * @param {array} roles * @public * @memberof Meeting */ setMuteAll(mutedEnabled: boolean, disallowUnmuteEnabled: boolean, muteOnEntryEnabled: boolean, roles: Array): Promise; /** * End the recording of this meeting * @returns {Promise} * @public * @memberof Meeting */ stopRecording(): Promise; /** * Pauses the recording of this meeting * @returns {Promise} * @public * @memberof Meeting */ pauseRecording(): Promise; /** * Resumes the recording of this meeting * @returns {Promise} * @public * @memberof Meeting */ resumeRecording(): Promise; /** * Locks the current meeting if possible * @returns {Promise} * @public * @memberof Meeting */ lockMeeting(): any; /** * Unlocks the current meeting if possible * @returns {Promise} * @public * @memberof Meeting */ unlockMeeting(): any; /** * Logs an error message and returns a rejected promise with same message * @param {String} message * @returns {Promise} * @private * @memberof Meeting */ private rejectWithErrorLog; /** * Sends DTMF tones to the current meeting * @param {String} tones a string of one or more DTMF tones to send * @returns {Promise} * @public * @memberof Meeting */ sendDTMF(tones: string): Promise; /** * Sends request to change layout type for the current meeting for the specific participant/device only * @param {String} [layoutType] a layout type that should be available in meeting constants {@link #layout_types} * @param {Object} renderInfo preferred dimensions for the remote main and content streams (server can ignore it) * @param {Object} renderInfo.main preferred dimensions for the remote main video stream * @param {Number} renderInfo.main.width preferred width of main video stream * @param {Number} renderInfo.main.height preferred height of main video stream * @param {Object} renderInfo.content preferred dimensions for the remote content share stream * @param {Number} renderInfo.content.width preferred width of content share stream * @param {Number} renderInfo.content.height preferred height of content share stream * @returns {Promise} * @public * @memberof Meeting */ changeVideoLayout(layoutType?: string, renderInfo?: { main: { width: number; height: number; }; content: { width: number; height: number; }; }): any; /** * Sets the quality level of the remote incoming media * @param {String} level {LOW|MEDIUM|HIGH} * @returns {Promise} */ setRemoteQualityLevel(level: string): Promise; /** * Functionality for when a share audio is ended. * @private * @memberof Meeting * @returns {undefined} */ private handleShareAudioStreamEnded; /** * Functionality for when a share video is muted or unmuted. * @private * @memberof Meeting * @param {boolean} muted * @returns {undefined} */ private handleShareVideoStreamMuteStateChange; /** * Functionality for when a share video is ended. * @private * @memberof Meeting * @returns {undefined} */ private handleShareVideoStreamEnded; /** * Emits meeting:stoppedSharingLocal * @private * @returns {undefined} * @memberof Meeting */ private triggerStoppedSharing; /** * Emits the 'network:quality' event * 1 indicates an acceptable uplink network. * 0 indicates an unacceptable uplink network based on a predefined threshold * @returns {undefined} * @param {Object} res - payload of emitNetworkQuality * @property {string} mediaType {video|audio} * @property {number} networkQualityScore - {1|0} * @private * @memberof Meeting */ private sendNetworkQualityEvent; /** * Handle logging the media * @param {Object} mediaProperties * @private * @returns {undefined} */ private handleMediaLogging; /** * * @returns {string} one of 'panelist', 'attendee', 'host', 'cohost', returns the user type of the current user */ getCurUserType(): RawClientEvent['userType'] | null; /** * End the current meeting for all * @returns {Promise} * @public * @memberof Meeting */ endMeetingForAll(): any; /** * clear the meeting data * @returns {undefined} * @public * @memberof Meeting */ clearMeetingData: () => Promise; /** * starts keepAlives being sent * @returns {void} * @private * @memberof Meeting */ startKeepAlive: () => void; /** * stops keepAlives being sent * @returns {void} * @private * @memberof Meeting */ stopKeepAlive: () => void; /** * Send a reaction inside the meeting. * * @param {ReactionServerType} reactionType - type of reaction to be sent. Example: "thumbs_up" * @param {SkinToneType} skinToneType - skin tone for the reaction. Example: "medium_dark" * @returns {Promise} * @public * @memberof Meeting */ sendReaction(reactionType: ReactionServerType, skinToneType?: SkinToneType): any; /** * Extend the current meeting duration. * * @param {number} extensionMinutes - how many minutes to extend * @returns {Promise} * @public * @memberof Meeting */ extendMeeting({ meetingPolicyUrl, meetingInstanceId, participantId, extensionMinutes, }: { meetingPolicyUrl: any; meetingInstanceId: any; participantId: any; extensionMinutes?: number; }): any; /** * Method to enable or disable reactions inside the meeting. * * @param {boolean} enable - enable or disable reactions * @returns {Promise} * @public * @memberof Meeting */ toggleReactions(enable: boolean): Promise; /** * Method to set post meeting data consent. * * @param {boolean} accept - whether consent accepted or declined * @returns {Promise} * @public * @memberof Meeting */ setPostMeetingDataConsent(accept: boolean): Promise; /** * Throws if we don't have a media connection created * * @returns {void} */ private checkMediaConnection; /** * Method to enable or disable the 'Music mode' effect on audio stream * * @param {boolean} shouldEnableMusicMode * @returns {Promise} */ enableMusicMode(shouldEnableMusicMode: boolean): Promise; /** Updates the tracks being sent on the transcoded media connection * * @returns {Promise} */ private updateTranscodedMediaConnection; /** * set sending named media group which the audio should send to * @param {MediaType} mediaType of the stream * @param {number} languageCode of the stream * @returns {void} */ setSendNamedMediaGroup(mediaType: MediaType, languageCode?: number): void; /** * Publishes a stream. * * @param {MediaType} mediaType of the stream * @param {LocalStream} stream to publish * @returns {Promise} */ private publishStream; /** * Un-publishes a stream. * * @param {MediaType} mediaType of the stream * @param {LocalStream} stream to unpublish * @returns {Promise} */ private unpublishStream; /** * Publishes specified local streams in the meeting * * @param {Object} streams * @returns {Promise} */ publishStreams(streams: LocalStreams): Promise; /** * Un-publishes specified local streams in the meeting * * @param {Array} streams * @returns {Promise} */ unpublishStreams(streams: LocalStream[]): Promise; /** * Gets permission token expiry information including timeLeft, expiryTime, currentTime * (from the time the function has been fired) * * @returns {object} permissionTokenExpiryInfo * @returns {number} permissionTokenExpiryInfo.timeLeft The time left for token to expire * @returns {number} permissionTokenExpiryInfo.expiryTime The expiry time of permission token from the server * @returns {number} permissionTokenExpiryInfo.currentTime The current time of the local machine */ getPermissionTokenExpiryInfo(): { timeLeft: number; expiryTime: number; currentTime: number; }; /** * Check if there is enough time left till the permission token expires * If not - refresh the permission token * * @param {number} threshold - time in seconds * @param {string} reason - reason for refreshing the permission token * @returns {Promise} */ checkAndRefreshPermissionToken(threshold: number, reason: string): Promise; /** * Gets the media reachability metrics * * @returns {Promise} */ private getMediaReachabilityMetricFields; /** * Set the stage for the meeting * * @param {SetStageOptions} options Options to use when setting the stage * @returns {Promise} The locus request */ setStage({ activeSpeakerProportion, customBackground, customLogo, customNameLabel, importantParticipants, lockAttendeeViewOnStage, showActiveSpeaker, }?: SetStageOptions): Promise; /** * Unset the stage for the meeting * * @returns {Promise} The locus request */ unsetStage(): Promise; /** * Notifies the host with the given meeting UUID and display names. * * @param {string} meetingUuid - The UUID of the meeting. * @param {string[]} displayName - An array of display names to notify the host with. * @returns {Promise} The result of the notifyHost request. */ notifyHost(meetingUuid: string, displayName: string[]): any; /** * Call out a SIP participant to a meeting * @param {string} address - The SIP address or phone number * @param {string} displayName - The display name for the participant * @param {string} [correlationId] - Optional correlation ID * @returns {Promise} Promise that resolves when the call-out is initiated */ sipCallOut(address: string, displayName: string): Promise; /** * Cancel an ongoing SIP call-out * @param {string} participantId - The participant ID to cancel * @returns {Promise} Promise that resolves when the call-out is cancelled * @public * @memberof Meetings */ cancelSipCallOut(participantId: string): Promise; /** * Method to get new data * @returns {Promise} */ refreshDataChannelToken(): Promise<{ body: { datachannelToken: any; dataChannelTokenType: DataChannelTokenType; }; }>; /** * Determines the current data channel token type based on the meeting state. * * variant should be used when connecting to the LLM data channel. * * @returns {DataChannelTokenType} The token type representing the current session mode. */ getDataChannelTokenType(): DataChannelTokenType; } export {};