import { WebexPlugin } from '@webex/webex-core'; import { ClientMediaPreferences } from '../reachability/reachability.types'; export type MediaRequestType = 'RoapMessage' | 'LocalMute'; export type RequestResult = any; export type RoapRequest = { type: 'RoapMessage'; selfUrl: string; mediaId: string; roapMessage: any; reachability: any; clientMediaPreferences: ClientMediaPreferences; sequence?: any; }; export type LocalMuteRequest = { type: 'LocalMute'; selfUrl: string; mediaId: string; sequence?: any; muteOptions: { audioMuted?: boolean; videoMuted?: boolean; }; }; export type Request = RoapRequest | LocalMuteRequest; export type Config = { device: { url: string; deviceType: string; countryCode?: string; regionCode?: string; }; correlationId: string; meetingId: string; preferTranscoding: boolean; }; /** * This class manages all /media API requests to Locus. Every call to that * Locus API has to go through this class. */ export declare class LocusMediaRequest extends WebexPlugin { private config; private latestAudioMuted?; private latestVideoMuted?; private isRequestInProgress; private queuedRequests; private confluenceState; /** * Constructor */ constructor(config: Config, options: any); /** * Add a request to the internal queue. */ private addToQueue; /** * Takes the next request from the queue and executes it. Once that * request is completed, the next one will be taken from the queue * and executed and this is repeated until the queue is empty. */ private executeNextQueuedRequest; /** * Returns latest requested audio and video mute values. If they have never been * requested, we assume audio/video to be muted. */ private getLatestMuteState; /** * Prepares the uri and body for the media request to be sent to Locus */ private sendHttpRequest; /** * Sends a media request to Locus */ send(request: Request): Promise; /** Returns true if a confluence on the server is already created */ isConfluenceCreated(): boolean; /** * This method needs to be called when we downgrade from multistream to transcoded connection. */ downgradeFromMultistreamToTranscoded(): void; }