Преглед на файлове

Notify for detecting suspend.

j8
damencho преди 6 години
родител
ревизия
f77976b742
променени са 4 файла, в които са добавени 15 реда и са изтрити 0 реда
  1. 2
    0
      conference.js
  2. 2
    0
      doc/api.md
  3. 9
    0
      modules/API/API.js
  4. 2
    0
      modules/API/external/external_api.js

+ 2
- 0
conference.js Целия файл

1998
                 this.localAudio.dispose();
1998
                 this.localAudio.dispose();
1999
                 this.localAudio = null;
1999
                 this.localAudio = null;
2000
             }
2000
             }
2001
+
2002
+            APP.API.notifySuspendDetected();
2001
         });
2003
         });
2002
 
2004
 
2003
         APP.UI.addListener(UIEvents.AUDIO_MUTED, muted => {
2005
         APP.UI.addListener(UIEvents.AUDIO_MUTED, muted => {

+ 2
- 0
doc/api.md Целия файл

437
 }
437
 }
438
 ```
438
 ```
439
 
439
 
440
+* **suspendDetected** - event notifications about detecting suspend event in host computer.
441
+
440
 You can also add multiple event listeners by using `addEventListeners`.
442
 You can also add multiple event listeners by using `addEventListeners`.
441
 This method requires one argument of type Object. The object argument must
443
 This method requires one argument of type Object. The object argument must
442
 have the names of the events as keys and the listeners of the events as values.
444
 have the names of the events as keys and the listeners of the events as values.

+ 9
- 0
modules/API/API.js Целия файл

509
         this._sendEvent({ name: 'video-ready-to-close' });
509
         this._sendEvent({ name: 'video-ready-to-close' });
510
     }
510
     }
511
 
511
 
512
+    /**
513
+     * Notify external application (if API is enabled) that a suspend event in host computer.
514
+     *
515
+     * @returns {void}
516
+     */
517
+    notifySuspendDetected() {
518
+        this._sendEvent({ name: 'suspend-detected' });
519
+    }
520
+
512
     /**
521
     /**
513
      * Notify external application (if API is enabled) for audio muted status
522
      * Notify external application (if API is enabled) for audio muted status
514
      * changed.
523
      * changed.

+ 2
- 0
modules/API/external/external_api.js Целия файл

73
     'video-mute-status-changed': 'videoMuteStatusChanged',
73
     'video-mute-status-changed': 'videoMuteStatusChanged',
74
     'screen-sharing-status-changed': 'screenSharingStatusChanged',
74
     'screen-sharing-status-changed': 'screenSharingStatusChanged',
75
     'subject-change': 'subjectChange',
75
     'subject-change': 'subjectChange',
76
+    'suspend-detected': 'suspendDetected',
76
     'tile-view-changed': 'tileViewChanged'
77
     'tile-view-changed': 'tileViewChanged'
77
 };
78
 };
78
 
79
 
537
      * {{
538
      * {{
538
      * on: on //whether screen sharing is on
539
      * on: on //whether screen sharing is on
539
      * }}
540
      * }}
541
+     * {@code suspendDetected} - receives event notifications about detecting suspend event in host computer.
540
      * {@code readyToClose} - all hangup operations are completed and Jitsi Meet
542
      * {@code readyToClose} - all hangup operations are completed and Jitsi Meet
541
      * is ready to be disposed.
543
      * is ready to be disposed.
542
      * @returns {void}
544
      * @returns {void}

Loading…
Отказ
Запис