From 4daddd341d4bd03ef20e0106acba7334442d359f Mon Sep 17 00:00:00 2001 From: Hristo Terezov Date: Wed, 7 Dec 2022 14:32:15 -0600 Subject: [PATCH] docs(conference.js): Add JSDoc for startConference --- conference.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conference.js b/conference.js index ab563abef..334b4dba0 100644 --- a/conference.js +++ b/conference.js @@ -668,6 +668,19 @@ export default { }); }, + /** + * Uses the passed promise arguments for tracks and connection in order to initialize and join the conference. + * NOTE: The function expects to receive connectionAndTracksPromiseFunction argument which will return a + * promise that will be resolved with the JitsiConnection instance and the local tracks or otherwise conP and trackP + * arguments which are promises that will be resolved respectively with the JitsiConnection instance and the local + * tracks . + * + * @param {Promise} conP - A promise that will resolve with the JitsiConnection instance. + * @param {Promise} tracksP - A promise that will resolve with the local tracks. + * @param {Function} connectionAndTracksPromiseFunction - A function that returns a promise that will resolve with + * an array with the connection and the local tracks. + * @returns {Promise} - Returns a Promise that will resolve once we have joined a JitsiConference. + */ async startConference(conP, tracksP, connectionAndTracksPromiseFunction) { const promiseCreator = connectionAndTracksPromiseFunction || (() => Promise.resolve([ tracksP, conP ]));