浏览代码

fix(JitsiMeetJS) cleanup createLocalTracks docs

Also drop deprecated settings.
release-8443
Saúl Ibarra Corretgé 1年前
父节点
当前提交
eaa11dd80e
共有 1 个文件被更改,包括 3 次插入23 次删除
  1. 3
    23
      JitsiMeetJS.ts

+ 3
- 23
JitsiMeetJS.ts 查看文件

273
     },
273
     },
274
 
274
 
275
     /**
275
     /**
276
-     * Creates the media tracks and returns them trough the callback.
276
+     * Creates local media tracks.
277
      *
277
      *
278
      * @param options Object with properties / settings specifying the tracks
278
      * @param options Object with properties / settings specifying the tracks
279
      * which should be created. should be created or some additional
279
      * which should be created. should be created or some additional
287
      * @param {string} options.resolution resolution constraints
287
      * @param {string} options.resolution resolution constraints
288
      * @param {string} options.cameraDeviceId
288
      * @param {string} options.cameraDeviceId
289
      * @param {string} options.micDeviceId
289
      * @param {string} options.micDeviceId
290
-     * @param {intiger} interval - the interval (in ms) for
291
-     * checking whether the desktop sharing extension is installed or not
292
-     * @param {Function} checkAgain - returns boolean. While checkAgain()==true
293
-     * createLocalTracks will wait and check on every "interval" ms for the
294
-     * extension. If the desktop extension is not install and checkAgain()==true
295
-     * createLocalTracks will finish with rejected Promise.
296
-     * @param {Function} listener - The listener will be called to notify the
297
-     * user of lib-jitsi-meet that createLocalTracks is starting external
298
-     * extension installation process.
299
-     * NOTE: If the inline installation process is not possible and external
300
-     * installation is enabled the listener property will be called to notify
301
-     * the start of external installation process. After that createLocalTracks
302
-     * will start to check for the extension on every interval ms until the
303
-     * plugin is installed or until checkAgain return false. If the extension
304
-     * is found createLocalTracks will try to get the desktop sharing track and
305
-     * will finish the execution. If checkAgain returns false, createLocalTracks
306
-     * will finish the execution with rejected Promise.
307
      *
290
      *
308
-     * @deprecated old firePermissionPromptIsShownEvent
309
      * @returns {Promise.<{Array.<JitsiTrack>}, JitsiConferenceError>} A promise
291
      * @returns {Promise.<{Array.<JitsiTrack>}, JitsiConferenceError>} A promise
310
      * that returns an array of created JitsiTracks if resolved, or a
292
      * that returns an array of created JitsiTracks if resolved, or a
311
      * JitsiConferenceError if rejected.
293
      * JitsiConferenceError if rejected.
312
      */
294
      */
313
-    createLocalTracks(options: ICreateLocalTrackOptions = {}, oldfirePermissionPromptIsShownEvent) {
295
+    createLocalTracks(options: ICreateLocalTrackOptions = {}) {
314
         let promiseFulfilled = false;
296
         let promiseFulfilled = false;
315
-
316
         const { firePermissionPromptIsShownEvent, fireSlowPromiseEvent, ...restOptions } = options;
297
         const { firePermissionPromptIsShownEvent, fireSlowPromiseEvent, ...restOptions } = options;
317
-        const firePermissionPrompt = firePermissionPromptIsShownEvent || oldfirePermissionPromptIsShownEvent;
318
 
298
 
319
-        if (firePermissionPrompt && !RTC.arePermissionsGrantedForAvailableDevices()) {
299
+        if (firePermissionPromptIsShownEvent && !RTC.arePermissionsGrantedForAvailableDevices()) {
320
             // @ts-ignore
300
             // @ts-ignore
321
             JitsiMediaDevices.emit(JitsiMediaDevicesEvents.PERMISSION_PROMPT_IS_SHOWN, browser.getName());
301
             JitsiMediaDevices.emit(JitsiMediaDevicesEvents.PERMISSION_PROMPT_IS_SHOWN, browser.getName());
322
         } else if (fireSlowPromiseEvent) {
302
         } else if (fireSlowPromiseEvent) {

正在加载...
取消
保存