diff --git a/JitsiParticipant.js b/JitsiParticipant.js index f08a656b34..a94c1de328 100644 --- a/JitsiParticipant.js +++ b/JitsiParticipant.js @@ -135,7 +135,7 @@ export default class JitsiParticipant { /** * Returns a set with the features for the participant. - * @returns {Promise, Error>} + * @returns {Promise>} */ getFeatures() { return Promise.resolve(this._features); diff --git a/authenticateAndUpgradeRole.js b/authenticateAndUpgradeRole.js index 17071b99f7..18b26b144d 100644 --- a/authenticateAndUpgradeRole.js +++ b/authenticateAndUpgradeRole.js @@ -40,6 +40,7 @@ import XMPP from './modules/xmpp/xmpp'; * @param {string} options.id - XMPP user's ID to log in. For example, * user@xmpp-server.com. * @param {string} options.password - XMPP user's password to log in with. + * @param {Function} [options.onCreateResource] * @param {Function} [options.onLoginSuccessful] - Callback called when logging * into the XMPP server was successful. The next step will be to obtain a new * session ID from Jicofo and join the MUC using it which will effectively diff --git a/modules/RTC/JitsiLocalTrack.js b/modules/RTC/JitsiLocalTrack.js index ecfa7b98fd..e10f15eb9d 100644 --- a/modules/RTC/JitsiLocalTrack.js +++ b/modules/RTC/JitsiLocalTrack.js @@ -47,8 +47,9 @@ export default class JitsiLocalTrack extends JitsiTrack { * @param {number} trackInfo.resolution - The the video resolution if it's a video track * @param {string} trackInfo.deviceId - The ID of the local device for this track. * @param {string} trackInfo.facingMode - Thehe camera facing mode used in getUserMedia call (for mobile only). - * @param {sourceId} trackInfo.sourceId - The id of the desktop sharing source, which is the Chrome media source ID, + * @param {string} trackInfo.sourceId - The id of the desktop sharing source, which is the Chrome media source ID, * returned by Desktop Picker on Electron. NOTE: defined for desktop sharing tracks only. + * @param {string} trackInfo.sourceType - The type of source the track originates from. */ constructor({ deviceId, diff --git a/modules/connectivity/TrackStreamingStatus.ts b/modules/connectivity/TrackStreamingStatus.ts index 61c0509440..eca28e1e87 100644 --- a/modules/connectivity/TrackStreamingStatus.ts +++ b/modules/connectivity/TrackStreamingStatus.ts @@ -4,12 +4,11 @@ import { JitsiConferenceEvents } from '../../JitsiConferenceEvents'; import * as JitsiTrackEvents from '../../JitsiTrackEvents'; import RTCEvents from '../../service/RTC/RTCEvents'; import { createTrackStreamingStatusEvent } from '../../service/statistics/AnalyticsEvents'; -import JitsiConference from '../../types/hand-crafted/JitsiConference'; -import JitsiRemoteTrack from '../../types/hand-crafted/modules/RTC/JitsiRemoteTrack'; -import RTC from '../../types/hand-crafted/modules/RTC/RTC'; -import { VideoType } from '../../types/hand-crafted/service/RTC/VideoType'; import browser from '../browser'; import Statistics from '../statistics/statistics'; +import JitsiRemoteTrack from '../RTC/JitsiRemoteTrack'; +import { VideoType } from '../../service/RTC/VideoType'; +import RTC from '../RTC/RTC'; /** Track streaming statuses. */ export enum TrackStreamingStatus { @@ -38,7 +37,6 @@ export enum TrackStreamingStatus { } type StreamingStatusMap = { - // TODO: Replace this hand crafted VideoType when we convert VideoType.js to Typescript. videoType?: VideoType, startedMs?: number, p2p?: boolean, @@ -75,7 +73,7 @@ const DEFAULT_RESTORING_TIMEOUT = 10000; */ export class TrackStreamingStatusImpl { rtc: RTC; - conference: JitsiConference; + conference: any; // TODO: needs JitsiConference type track: JitsiRemoteTrack; /** This holds the timeout callback ID scheduled using window.setTimeout. */ @@ -207,7 +205,7 @@ export class TrackStreamingStatusImpl { * * @constructor * @param rtc - the RTC service instance - * @param conference - parent conference instance + * @param conference - parent conference instance // TODO: Needs JitsiConference Type * @param {Object} options * @param {number} [options.p2pRtcMuteTimeout=2500] custom value for * {@link TrackStreamingStatusImpl.p2pRtcMuteTimeout}. @@ -216,7 +214,7 @@ export class TrackStreamingStatusImpl { * @param {number} [options.outOfForwardedSourcesTimeout=500] custom value for * {@link TrackStreamingStatusImpl.outOfForwardedSourcesTimeout}. */ - constructor(rtc: RTC, conference: JitsiConference, track: JitsiRemoteTrack, options: { + constructor(rtc: RTC, conference: any, track: JitsiRemoteTrack, options: { outOfForwardedSourcesTimeout: number, p2pRtcMuteTimeout: number, rtcMuteTimeout: number diff --git a/modules/recording/JibriSession.js b/modules/recording/JibriSession.js index 991107a2f0..958a915cb0 100644 --- a/modules/recording/JibriSession.js +++ b/modules/recording/JibriSession.js @@ -235,8 +235,7 @@ export default class JibriSession { /** * Generates the message to change the status of the recording session. * - * @param {string} status - The new status to which the recording session - * should transition. + * @param {string} [options.action] - The action to set the IQ * @param {string} [options.appData] - Data specific to the app/service that * the result file will be uploaded. * @param {string} [options.broadcastId] - The broadcast ID of an diff --git a/modules/statistics/AudioOutputProblemDetector.js b/modules/statistics/AudioOutputProblemDetector.js index 000f388734..8ace9356bd 100644 --- a/modules/statistics/AudioOutputProblemDetector.js +++ b/modules/statistics/AudioOutputProblemDetector.js @@ -43,7 +43,8 @@ export default class AudioOutputProblemDetector { * A listener for audio level data received by a remote participant. * * @param {string} userID - The user id of the participant that sent the data. - * @param {number} audioLevel - The average audio level value. + * @param {Object} result - The result object. + * @param {number} [result.avgAudioLevels] - The average audio level value. * @returns {void} */ _onRemoteAudioLevelReceived(userID, { avgAudioLevels }) { diff --git a/modules/xmpp/Caps.js b/modules/xmpp/Caps.js index 5f1fc74040..7a35f3952f 100644 --- a/modules/xmpp/Caps.js +++ b/modules/xmpp/Caps.js @@ -195,7 +195,7 @@ export default class Caps extends Listenable { * Returns a set with the features for a host. * @param {String} jid the jid of the host * @param {int} timeout the timeout in ms for reply from the host. - * @returns {Promise, Error>} + * @returns {Promise>} */ getFeaturesAndIdentities(jid, node, timeout = 5000) { return this._getDiscoInfo(jid, node, timeout); diff --git a/modules/xmpp/XmppConnection.js b/modules/xmpp/XmppConnection.js index b239c27a77..721b934379 100644 --- a/modules/xmpp/XmppConnection.js +++ b/modules/xmpp/XmppConnection.js @@ -528,8 +528,10 @@ export default class XmppConnection extends Listenable { * which would fail immediately if disconnected). * * @param {Element} iq - The IQ to send. - * @param {number} timeout - How long to wait for the response. The time when the connection is reconnecting is - * included, which means that the IQ may never be sent and still fail with a timeout. + * @param {Object} options - Options object + * @param {options.timeout} timeout - How long to wait for the response. + * The time when the connection is reconnecting is included, which means that + * the IQ may never be sent and still fail with a timeout. */ sendIQ2(iq, { timeout }) { return new Promise((resolve, reject) => { diff --git a/modules/xmpp/strophe.ping.js b/modules/xmpp/strophe.ping.js index ac32984a03..c564bd9355 100644 --- a/modules/xmpp/strophe.ping.js +++ b/modules/xmpp/strophe.ping.js @@ -34,7 +34,7 @@ export default class PingConnectionPlugin extends ConnectionPlugin { * @param {Object} options * @param {Function} options.onPingThresholdExceeded - Callback called when ping fails too many times (controlled * by the {@link PING_THRESHOLD} constant). - * @param {Function} options._getTimeSinceLastServerResponse - A function to obtain the last seen + * @param {Function} options.getTimeSinceLastServerResponse - A function to obtain the last seen * response from the server. * @param {Object} options.pingOptions - The ping options if any. * @constructor