Explorar el Código

feat(iFrame): Add method for pinning a participant on stage view

j8
Jaya Allamsetty hace 4 años
padre
commit
0f9e01a7cf
Se han modificado 2 ficheros con 18 adiciones y 0 borrados
  1. 6
    0
      modules/API/API.js
  2. 12
    0
      modules/API/external/external_api.js

+ 6
- 0
modules/API/API.js Ver fichero

@@ -15,6 +15,7 @@ import {
15 15
 } from '../../react/features/base/conference';
16 16
 import { parseJWTFromURLParams } from '../../react/features/base/jwt';
17 17
 import { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
18
+import { pinParticipant } from '../../react/features/base/participants';
18 19
 import {
19 20
     processExternalDeviceRequest
20 21
 } from '../../react/features/device-selection/functions';
@@ -120,6 +121,11 @@ function initCommands() {
120 121
                 ));
121 122
             }
122 123
         },
124
+        'pin-participant': id => {
125
+            logger.debug('Pin participant command received');
126
+            sendAnalytics(createApiEvent('participant.pinned'));
127
+            APP.store.dispatch(pinParticipant(id));
128
+        },
123 129
         'proxy-connection-event': event => {
124 130
             APP.conference.onProxyConnectionEvent(event);
125 131
         },

+ 12
- 0
modules/API/external/external_api.js Ver fichero

@@ -35,6 +35,7 @@ const commands = {
35 35
     hangup: 'video-hangup',
36 36
     muteEveryone: 'mute-everyone',
37 37
     password: 'password',
38
+    pinParticipant: 'pin-participant',
38 39
     resizeLargeVideo: 'resize-large-video',
39 40
     sendEndpointTextMessage: 'send-endpoint-text-message',
40 41
     sendTones: 'send-tones',
@@ -919,6 +920,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
919 920
         });
920 921
     }
921 922
 
923
+    /**
924
+     * Pins a participant's video on to the stage view.
925
+     *
926
+     * @param {string} participantId - Participant id (JID) of the participant
927
+     * that needs to be pinned on the stage view.
928
+     * @returns {void}
929
+     */
930
+    pinParticipant(participantId) {
931
+        this.executeCommand('pinParticipant', participantId);
932
+    }
933
+
922 934
     /**
923 935
      * Removes event listener.
924 936
      *

Loading…
Cancelar
Guardar