@cometchat/calls-sdk-javascript
Version:
Cometchat's Javascript SDK for In-app Calling.
280 lines (279 loc) • 11 kB
TypeScript
import { MainVideoContainerSetting, VirtualBackground } from "./CallSettings";
import { OngoingCallListener } from "./Listener";
export declare class PresenterSettings {
static POSITION_TOP_LEFT: string;
static POSITION_TOP_RIGHT: string;
static POSITION_BOTTOM_LEFT: string;
static POSITION_BOTTOM_RIGHT: string;
static POSITION: {
readonly TOP_LEFT: "top-left";
readonly TOP_RIGHT: "top-right";
readonly BOTTOM_LEFT: "bottom-left";
readonly BOTTOM_RIGHT: "bottom-right";
};
static ASPECT_RATIO_DEFAULT: string;
static ASPECT_RATIO_CONTAIN: string;
static ASPECT_RATIO_COVER: string;
static ASPECT_RATIO: {
readonly DEFAULT: "default";
readonly CONTAIN: "contain";
readonly COVER: "cover";
};
private defaultLayout;
private isAudioOnly;
private isPresenter;
private mode;
private ShowEndCallButton;
private ShowMuteAudioButton;
private ShowPauseVideoButton;
private ShowScreenShareButton;
private ShowSwitchModeButton;
private StartAudioMuted;
private StartVideoMuted;
private localizedObject;
private analyticsSettings;
private customCSS;
private ShowRecordingButton;
private idleTimeoutPeriod;
private StartRecordingOnCallStart;
private callListener;
private ShowSwitchToVideoCallButton;
private VirtualBackground;
private ShowVirtualBackgroundSetting;
private MainVideoContainerSetting;
constructor(builder?: PresenterSettingsBuilder);
getCallListener(): OngoingCallListener;
isRecordingButtonEnabled(): boolean;
getIdleTimeoutPeriod(): number;
shouldStartRecordingOnCallStart(): boolean;
getCustomCSS(): string;
isAudioOnlyCall(): boolean;
getIsPresenter(): boolean;
isDefaultLayoutEnabled(): boolean;
getMode(): "PRESENTER";
getStartWithAudioMuted(): boolean;
getStartWithVideoMuted(): boolean;
isEndCallButtonEnabled(): boolean;
isMuteAudioButtonEnabled(): boolean;
isPauseVideoButtonEnabled(): boolean;
isScreenShareButtonEnabled(): boolean;
isModeButtonEnabled(): boolean;
getLocalizedStringObject(): Object;
getAnalyticsSettings(): Object;
isAudioToVideoButtonEnabled(): boolean;
getVirtualBackground(): VirtualBackground;
isVirtualBackgroundSettingEnabled(): boolean;
getMainVideoContainerSetting(): MainVideoContainerSetting;
}
export declare class PresenterSettingsBuilder {
/** @private */ defaultLayout: boolean;
/** @private */ isAudioOnly: boolean;
/** @private */ isPresenter: boolean;
/** @private */ ShowEndCallButton: boolean;
/** @private */ ShowMuteAudioButton: boolean;
/** @private */ ShowPauseVideoButton: boolean;
/** @private */ ShowScreenShareButton: boolean;
/** @private */ ShowSwitchModeButton: boolean;
/** @private */ StartAudioMuted: boolean;
/** @private */ StartVideoMuted: boolean;
/** @private */ localizedObject: Object;
/** @private */ analyticsSettings: Object;
/** @private */ customCSS: string;
/** @private */ ShowRecordingButton: boolean;
/** @private */ idleTimeoutPeriod: number;
/** @private */ StartRecordingOnCallStart: boolean;
/** @private */ ShowSwitchToVideoCallButton: boolean;
/** @private */ virtualBackground: VirtualBackground;
/** @private */ ShowVirtualBackgroundSetting: boolean;
/** @private */ MainVideoContainerSetting: MainVideoContainerSetting;
/** @private */ callListener: OngoingCallListener;
/**
*
* @param {boolean} defaultLayout
* This methods shows/hides the default button layout.
* If set to true the default button layout will be shown.
* If set to false the default button layout will be hidden.
* Default value is true
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
enableDefaultLayout(defaultLayout: boolean): this;
/**
*
* @param {boolean} isAudioOnly
* This methods sets the type(audio/video) of the call.
* If set to true, the call will be strictly an audio call.
* If set to false, the call will be an audio-video call.
* Default value is false
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
setIsAudioOnlyCall(isAudioOnly: boolean): this;
/**
*
* @param {boolean} isPresenter
* This methods sets if the user is a presenter.
* If set to true, user will be a presenter.
* If set to false, user will not be a presenter.
* Default value is false
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
setIsPresenter(isPresenter: boolean): this;
/**
*
* @param {boolean} showEndCallButton
* This method shows/hides the end call button.
* If set to true it will display the end call button.
* If set to false it will hide the end call button.
* Default value is true.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
showEndCallButton(showEndCallButton: boolean): this;
/**
*
* @param {boolean} showMuteAudioButton
* This method shows/hides the mute audio button.
* If set to true it will display the mute audio button.
* If set to false it will hide the mute audio button.
* Default value is true.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
showMuteAudioButton(showMuteAudioButton: boolean): this;
/**
*
* @param {boolean} showPauseVideoButton
* This method shows/hides the pause video button.
* If set to true it will display the pause video button.
* If set to false it will hide the pause video button.
* Default value is true.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
showPauseVideoButton(showPauseVideoButton: boolean): this;
/**
*
* @param {boolean} showScreenShareButton
* This method shows/hides the screen share button.
* If set to true it will display the screen share button.
* If set to false it will hide the screen share button.
* Default value is true.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
showScreenShareButton(showScreenShareButton: boolean): this;
/**
*
* @param {boolean} showModeButton
* This method shows/hides the switch mode button.
* If set to true it will display the switch mode button.
* If set to false it will hide the switch mode button.
* Default value is true.
* @returns
*/
showModeButton(showModeButton: boolean): this;
/**
*
* @param {Object} localizedStringObject
* This method will set the localized text in the call screen.
* @returns
*/
setLocalizedStringObject(localizedStringObject: Object): this;
/**
* @private
* @param {Object} analyticsSettings
* This method will set the settings required for analytics.
* @returns
*/
setAnalyticsSettings(analyticsSettings: Object): this;
/**
*
* @param {boolean} audioMuted
* This method allows the call to be started with audio muted.
* If set to true, the call will start with audio muted.
* Default value is false.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
startWithAudioMuted(audioMuted: boolean): this;
/**
*
* @param {boolean} videoMuted
* This method allows the call to be started with video muted.
* If set to true, the call will start with video muted.
* Default value is false.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
startWithVideoMuted(videoMuted: boolean): this;
/**
*
* @param {boolean} showRecordingButton
* This method shows/hides the recording button.
* If set to true it will display the recording button.
* If set to false it will hide the recording button.
* Default value is false.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
showRecordingButton(showRecordingButton: boolean): this;
/**
*
* @param {number} idleTimeoutPeriod
* This method sets the idle timeout period for the call.
* If set and you are the only one in call, the call will end
* after the idle timeout period, giving you the option to
* extend the call 60 seconds before the call ends.
* Default value is 180 seconds.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
setIdleTimeoutPeriod(idleTimeoutPeriod: number): this;
/**
*
* @param {boolean} startRecordingOnCallStart
* This method starts the recording as soon as the call start.
* If set to true it will start the recording as soon as the call start.
* Default value is false.
* @returns {PresenterSettingsBuilder} Returns the PresenterSettingsBuilder instance
*/
startRecordingOnCallStart(startRecordingOnCallStart: boolean): this;
/**
*
* @param {boolean} showAudioToVideoSwitchButton
* This method shows/hides the switch to video call button.
* If set to true it will display the switch to video call button.
* If set to false it will hide the switch to video call button.
* Default value is true.
* @returns
*/
showSwitchToVideoCallButton(showAudioToVideoSwitchButton: boolean): this;
/**
*
* @param {VirtualBackground} virtualBackground
* This method will set the virtual background setting.
* This methods takes an Object of VirtualBackground Class.
* @returns
*/
setVirtualBackground(virtualBackground: VirtualBackground): this;
/**
*
* @param {boolean} showVirtualBackgroundSetting
* This method shows/hides the virtual background setting button.
* If set to true it will display the virtual background setting button.
* If set to false it will hide the virtual background setting button.
* Default value is true.
* @returns
*/
showVirtualBackgroundSetting(showVirtualBackgroundSetting: boolean): this;
/**
*
* @param {MainVideoContainerSetting} mainVideoContainerSetting
* This method can be used to customize the main video container.
* @returns
*/
setMainVideoContainerSetting(mainVideoContainerSetting: MainVideoContainerSetting): this;
/**
*
* @param {OngoingCallListener} callListener
* This method can be used to subscribe to available callings events
* @returns
*/
setCallListener(callListener: OngoingCallListener): this;
/**
* This method will return an object of the PresenterSettings class.
* @returns {PresenterSettings} Returns the PresenterSettings instance
*/
build(): PresenterSettings;
}