/*! * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file. */ import Meeting from '../meeting'; /** * @export * @class ReconnectionManager */ export default class ReconnectionManager { autoRejoinEnabled: any; iceState: any; maxRejoinAttempts: any; meeting: any; rejoinAttempts: any; shareStatus: any; status: any; webex: any; /** * @param {Meeting} meeting */ constructor(meeting: Meeting); /** * @public * @memberof ReconnectionManager * @returns {void} */ resetReconnectionTimer(): void; /** * Sets the iceState to connected and clears any disconnect timeouts and * related timeout data within the iceState. * * @returns {undefined} * @public * @memberof ReconnectionManager */ iceReconnected(): void; /** * Set the iceState to disconnected and generates a timeout that waits for the * iceState to reconnect and then resolves. If the ice state is already * processing a reconnect, it immediately resolves. Rejects if the timeout * duration is reached. * * @returns {Promise} * @public * @memberof ReconnectionManager */ waitForIceReconnect(): Promise; /** * @returns {undefined} * @public * @memberof ReconnectionManager */ reset(): void; /** * @returns {undefined} * @public * @memberof ReconnectionManager */ cleanUp(): void; /** * Stop the local share stream. * * @param {string} reason a {@link SHARE_STOPPED_REASON} * @returns {undefined} * @private * @memberof ReconnectionManager */ private stopLocalShareStream; /** * @public * @memberof ReconnectionManager * @returns {Boolean} true if reconnection operation is in progress */ isReconnectInProgress(): boolean; /** * @returns {Boolean} * @throws {ReconnectInProgress, ReconnectionDisabled} * @private * @memberof ReconnectionManager */ private canStartReconnection; /** * Initiates a media reconnect for the active meeting * @param {Object} reconnectOptions * @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened * @param {boolean} [reconnectOptions.networkRetry=false] indicates if we are retrying the reconnect * @param {Function} [completionCallback] callback that gets called when reconnection is started successfully * @returns {Promise} * @public * @memberof ReconnectionManager */ reconnect({ networkDisconnect, networkRetry, }?: { networkDisconnect?: boolean; networkRetry?: boolean; }, completionCallback?: (() => Promise) | undefined): Promise; /** * @param {Object} reconnectOptions * @param {boolean} [reconnectOptions.networkDisconnect=false] indicates if a network disconnect event happened * @returns {Promise} * @throws {NeedsRetryError} * @private * @memberof ReconnectionManager */ private executeReconnection; /** * Rejoins a meeting after detecting the member was in a LEFT state * * @async * @param {boolean} wasSharing * @returns {Promise} */ rejoinMeeting(wasSharing?: boolean): Promise; /** * @returns {Promise} * @private * @memberof ReconnectionManager */ reconnectMedia(): Promise; /** * Attempt to Reconnect Mercury Websocket * @returns {Promise} * @private * @memberof ReconnectionManager */ private reconnectMercuryWebSocket; }