Browse Source

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

j8
Jaya Allamsetty 4 years ago
parent
commit
0f9e01a7cf
2 changed files with 18 additions and 0 deletions
  1. 6
    0
      modules/API/API.js
  2. 12
    0
      modules/API/external/external_api.js

+ 6
- 0
modules/API/API.js View File

15
 } from '../../react/features/base/conference';
15
 } from '../../react/features/base/conference';
16
 import { parseJWTFromURLParams } from '../../react/features/base/jwt';
16
 import { parseJWTFromURLParams } from '../../react/features/base/jwt';
17
 import { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
17
 import { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
18
+import { pinParticipant } from '../../react/features/base/participants';
18
 import {
19
 import {
19
     processExternalDeviceRequest
20
     processExternalDeviceRequest
20
 } from '../../react/features/device-selection/functions';
21
 } from '../../react/features/device-selection/functions';
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
         'proxy-connection-event': event => {
129
         'proxy-connection-event': event => {
124
             APP.conference.onProxyConnectionEvent(event);
130
             APP.conference.onProxyConnectionEvent(event);
125
         },
131
         },

+ 12
- 0
modules/API/external/external_api.js View File

35
     hangup: 'video-hangup',
35
     hangup: 'video-hangup',
36
     muteEveryone: 'mute-everyone',
36
     muteEveryone: 'mute-everyone',
37
     password: 'password',
37
     password: 'password',
38
+    pinParticipant: 'pin-participant',
38
     resizeLargeVideo: 'resize-large-video',
39
     resizeLargeVideo: 'resize-large-video',
39
     sendEndpointTextMessage: 'send-endpoint-text-message',
40
     sendEndpointTextMessage: 'send-endpoint-text-message',
40
     sendTones: 'send-tones',
41
     sendTones: 'send-tones',
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
      * Removes event listener.
935
      * Removes event listener.
924
      *
936
      *

Loading…
Cancel
Save