Browse Source

fix(types): fix last few types (#2417)

release-8443
Daniel McAssey 1 year ago
parent
commit
47fc0fbbbe
No account linked to committer's email address

+ 1
- 1
JitsiParticipant.js View File

135
 
135
 
136
     /**
136
     /**
137
      * Returns a set with the features for the participant.
137
      * Returns a set with the features for the participant.
138
-     * @returns {Promise<Set<String>, Error>}
138
+     * @returns {Promise<Set<String>>}
139
      */
139
      */
140
     getFeatures() {
140
     getFeatures() {
141
         return Promise.resolve(this._features);
141
         return Promise.resolve(this._features);

+ 1
- 0
authenticateAndUpgradeRole.js View File

40
  * @param {string} options.id - XMPP user's ID to log in. For example,
40
  * @param {string} options.id - XMPP user's ID to log in. For example,
41
  * user@xmpp-server.com.
41
  * user@xmpp-server.com.
42
  * @param {string} options.password - XMPP user's password to log in with.
42
  * @param {string} options.password - XMPP user's password to log in with.
43
+ * @param {Function} [options.onCreateResource]
43
  * @param {Function} [options.onLoginSuccessful] - Callback called when logging
44
  * @param {Function} [options.onLoginSuccessful] - Callback called when logging
44
  * into the XMPP server was successful. The next step will be to obtain a new
45
  * into the XMPP server was successful. The next step will be to obtain a new
45
  * session ID from Jicofo and join the MUC using it which will effectively
46
  * session ID from Jicofo and join the MUC using it which will effectively

+ 2
- 1
modules/RTC/JitsiLocalTrack.js View File

47
      * @param {number} trackInfo.resolution - The the video resolution if it's a video track
47
      * @param {number} trackInfo.resolution - The the video resolution if it's a video track
48
      * @param {string} trackInfo.deviceId - The ID of the local device for this track.
48
      * @param {string} trackInfo.deviceId - The ID of the local device for this track.
49
      * @param {string} trackInfo.facingMode - Thehe camera facing mode used in getUserMedia call (for mobile only).
49
      * @param {string} trackInfo.facingMode - Thehe camera facing mode used in getUserMedia call (for mobile only).
50
-     * @param {sourceId} trackInfo.sourceId - The id of the desktop sharing source, which is the Chrome media source ID,
50
+     * @param {string} trackInfo.sourceId - The id of the desktop sharing source, which is the Chrome media source ID,
51
      * returned by Desktop Picker on Electron. NOTE: defined for desktop sharing tracks only.
51
      * returned by Desktop Picker on Electron. NOTE: defined for desktop sharing tracks only.
52
+     * @param {string} trackInfo.sourceType - The type of source the track originates from.
52
      */
53
      */
53
     constructor({
54
     constructor({
54
         deviceId,
55
         deviceId,

+ 6
- 8
modules/connectivity/TrackStreamingStatus.ts View File

4
 import * as JitsiTrackEvents from '../../JitsiTrackEvents';
4
 import * as JitsiTrackEvents from '../../JitsiTrackEvents';
5
 import RTCEvents from '../../service/RTC/RTCEvents';
5
 import RTCEvents from '../../service/RTC/RTCEvents';
6
 import { createTrackStreamingStatusEvent } from '../../service/statistics/AnalyticsEvents';
6
 import { createTrackStreamingStatusEvent } from '../../service/statistics/AnalyticsEvents';
7
-import JitsiConference from '../../types/hand-crafted/JitsiConference';
8
-import JitsiRemoteTrack from '../../types/hand-crafted/modules/RTC/JitsiRemoteTrack';
9
-import RTC from '../../types/hand-crafted/modules/RTC/RTC';
10
-import { VideoType } from '../../types/hand-crafted/service/RTC/VideoType';
11
 import browser from '../browser';
7
 import browser from '../browser';
12
 import Statistics from '../statistics/statistics';
8
 import Statistics from '../statistics/statistics';
9
+import JitsiRemoteTrack from '../RTC/JitsiRemoteTrack';
10
+import { VideoType } from '../../service/RTC/VideoType';
11
+import RTC from '../RTC/RTC';
13
 
12
 
14
 /** Track streaming statuses. */
13
 /** Track streaming statuses. */
15
 export enum TrackStreamingStatus {
14
 export enum TrackStreamingStatus {
38
   }
37
   }
39
 
38
 
40
 type StreamingStatusMap = {
39
 type StreamingStatusMap = {
41
-    // TODO: Replace this hand crafted VideoType when we convert VideoType.js to Typescript.
42
     videoType?: VideoType,
40
     videoType?: VideoType,
43
     startedMs?: number,
41
     startedMs?: number,
44
     p2p?: boolean,
42
     p2p?: boolean,
75
  */
73
  */
76
 export class TrackStreamingStatusImpl {
74
 export class TrackStreamingStatusImpl {
77
     rtc: RTC;
75
     rtc: RTC;
78
-    conference: JitsiConference;
76
+    conference: any; // TODO: needs JitsiConference type
79
     track: JitsiRemoteTrack;
77
     track: JitsiRemoteTrack;
80
 
78
 
81
     /**  This holds the timeout callback ID scheduled using window.setTimeout. */
79
     /**  This holds the timeout callback ID scheduled using window.setTimeout. */
207
      *
205
      *
208
      * @constructor
206
      * @constructor
209
      * @param rtc - the RTC service instance
207
      * @param rtc - the RTC service instance
210
-     * @param conference - parent conference instance
208
+     * @param conference - parent conference instance // TODO: Needs JitsiConference Type
211
      * @param {Object} options
209
      * @param {Object} options
212
      * @param {number} [options.p2pRtcMuteTimeout=2500] custom value for
210
      * @param {number} [options.p2pRtcMuteTimeout=2500] custom value for
213
      * {@link TrackStreamingStatusImpl.p2pRtcMuteTimeout}.
211
      * {@link TrackStreamingStatusImpl.p2pRtcMuteTimeout}.
216
      * @param {number} [options.outOfForwardedSourcesTimeout=500] custom value for
214
      * @param {number} [options.outOfForwardedSourcesTimeout=500] custom value for
217
      * {@link TrackStreamingStatusImpl.outOfForwardedSourcesTimeout}.
215
      * {@link TrackStreamingStatusImpl.outOfForwardedSourcesTimeout}.
218
      */
216
      */
219
-    constructor(rtc: RTC, conference: JitsiConference, track: JitsiRemoteTrack, options: {
217
+    constructor(rtc: RTC, conference: any, track: JitsiRemoteTrack, options: {
220
         outOfForwardedSourcesTimeout: number,
218
         outOfForwardedSourcesTimeout: number,
221
         p2pRtcMuteTimeout: number,
219
         p2pRtcMuteTimeout: number,
222
         rtcMuteTimeout: number
220
         rtcMuteTimeout: number

+ 1
- 2
modules/recording/JibriSession.js View File

235
     /**
235
     /**
236
      * Generates the message to change the status of the recording session.
236
      * Generates the message to change the status of the recording session.
237
      *
237
      *
238
-     * @param {string} status - The new status to which the recording session
239
-     * should transition.
238
+     * @param {string} [options.action] - The action to set the IQ
240
      * @param {string} [options.appData] - Data specific to the app/service that
239
      * @param {string} [options.appData] - Data specific to the app/service that
241
      * the result file will be uploaded.
240
      * the result file will be uploaded.
242
      * @param {string} [options.broadcastId] - The broadcast ID of an
241
      * @param {string} [options.broadcastId] - The broadcast ID of an

+ 2
- 1
modules/statistics/AudioOutputProblemDetector.js View File

43
      * A listener for audio level data received by a remote participant.
43
      * A listener for audio level data received by a remote participant.
44
      *
44
      *
45
      * @param {string} userID - The user id of the participant that sent the data.
45
      * @param {string} userID - The user id of the participant that sent the data.
46
-     * @param {number} audioLevel - The average audio level value.
46
+     * @param {Object} result - The result object.
47
+     * @param {number} [result.avgAudioLevels] - The average audio level value.
47
      * @returns {void}
48
      * @returns {void}
48
      */
49
      */
49
     _onRemoteAudioLevelReceived(userID, { avgAudioLevels }) {
50
     _onRemoteAudioLevelReceived(userID, { avgAudioLevels }) {

+ 1
- 1
modules/xmpp/Caps.js View File

195
      * Returns a set with the features for a host.
195
      * Returns a set with the features for a host.
196
      * @param {String} jid the jid of the host
196
      * @param {String} jid the jid of the host
197
      * @param {int} timeout the timeout in ms for reply from the host.
197
      * @param {int} timeout the timeout in ms for reply from the host.
198
-     * @returns {Promise<Set<String>, Error>}
198
+     * @returns {Promise<Set<String>>}
199
      */
199
      */
200
     getFeaturesAndIdentities(jid, node, timeout = 5000) {
200
     getFeaturesAndIdentities(jid, node, timeout = 5000) {
201
         return this._getDiscoInfo(jid, node, timeout);
201
         return this._getDiscoInfo(jid, node, timeout);

+ 4
- 2
modules/xmpp/XmppConnection.js View File

528
      * which would fail immediately if disconnected).
528
      * which would fail immediately if disconnected).
529
      *
529
      *
530
      * @param {Element} iq - The IQ to send.
530
      * @param {Element} iq - The IQ to send.
531
-     * @param {number} timeout - How long to wait for the response. The time when the connection is reconnecting is
532
-     * included, which means that the IQ may never be sent and still fail with a timeout.
531
+     * @param {Object} options - Options object
532
+     * @param {options.timeout} timeout - How long to wait for the response.
533
+     * The time when the connection is reconnecting is included, which means that
534
+     * the IQ may never be sent and still fail with a timeout.
533
      */
535
      */
534
     sendIQ2(iq, { timeout }) {
536
     sendIQ2(iq, { timeout }) {
535
         return new Promise((resolve, reject) => {
537
         return new Promise((resolve, reject) => {

+ 1
- 1
modules/xmpp/strophe.ping.js View File

34
      * @param {Object} options
34
      * @param {Object} options
35
      * @param {Function} options.onPingThresholdExceeded - Callback called when ping fails too many times (controlled
35
      * @param {Function} options.onPingThresholdExceeded - Callback called when ping fails too many times (controlled
36
      * by the {@link PING_THRESHOLD} constant).
36
      * by the {@link PING_THRESHOLD} constant).
37
-     * @param {Function} options._getTimeSinceLastServerResponse - A function to obtain the last seen
37
+     * @param {Function} options.getTimeSinceLastServerResponse - A function to obtain the last seen
38
      * response from the server.
38
      * response from the server.
39
      * @param {Object} options.pingOptions - The ping options if any.
39
      * @param {Object} options.pingOptions - The ping options if any.
40
      * @constructor
40
      * @constructor

Loading…
Cancel
Save