import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup, StreamState } from '@webex/internal-media-core'; /** * This class is used to manage the sendSlots for the given media types. */ export default class SendSlotManager { private readonly slots; private readonly LoggerProxy; private readonly sourceStateOverrides; /** * Constructor for SendSlotManager * * @param {any} LoggerProxy is used to log the messages * @constructor */ constructor(LoggerProxy: any); /** * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES) * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true * @returns {SendSlot} slot The created sendSlot */ createSlot(mediaConnection: MultistreamRoapMediaConnection, mediaType: MediaType, active?: boolean): SendSlot; /** * This method is used to retrieve the sendSlot for the given mediaType * @param {MediaType} mediaType of which the slot needs to be retrieved * @returns {SendSlot} */ getSlot(mediaType: MediaType): SendSlot; /** * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to. * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero, * named media group will be canceled and the audio stream will be sent to the floor. * @returns {void} */ setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]): void; /** * Sets the source state override for the given media type. * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes). * @param {StreamState | null} state - The state to set or null to clear the override value. * @returns {void} */ setSourceStateOverride(mediaType: MediaType, state: StreamState | null): void; /** * Gets the source state override for the given media type. * @param {MediaType} mediaType - The type of media to get the source state override for. * @returns {StreamState | null} - The current source state override or null if not set. */ private getSourceStateOverride; /** * This method publishes the given stream to the sendSlot for the given mediaType * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES) * @param {LocalStream} stream LocalStream to be published * @returns {Promise} */ publishStream(mediaType: MediaType, stream: LocalStream): Promise; /** * This method unpublishes the stream from the sendSlot of the given mediaType * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES) * @returns {Promise} */ unpublishStream(mediaType: MediaType): Promise; /** * This method is used to set the active state of the sendSlot for the given mediaType * @param {MediaType} mediaType The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES) * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true * @returns {void} */ setActive(mediaType: MediaType, active?: boolean): void; /** * This method is used to set the codec parameters for the sendSlot of the given mediaType * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES) * @param {Object} codecParameters * @returns {Promise} */ setCodecParameters(mediaType: MediaType, codecParameters: { [key: string]: string | undefined; }): Promise; /** * This method is used to delete the codec parameters for the sendSlot of the given mediaType * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES) * @param {Array} parameters Array of keys of the codec parameters to be deleted * @returns {Promise} */ deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise; /** * This method is used to reset the SendSlotsManager by deleting all the sendSlots * @returns {undefined} */ reset(): void; }