浏览代码

feat(external_api) Expose command for toggling background dlg

master
hmuresan 3 年前
父节点
当前提交
cafefecea5
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 5
    0
      modules/API/API.js
  2. 1
    0
      modules/API/external/external_api.js

+ 5
- 0
modules/API/API.js 查看文件

@@ -13,6 +13,7 @@ import {
13 13
     setSubject
14 14
 } from '../../react/features/base/conference';
15 15
 import { overwriteConfig, getWhitelistedJSON } from '../../react/features/base/config';
16
+import { toggleDialog } from '../../react/features/base/dialog/actions';
16 17
 import { parseJWTFromURLParams } from '../../react/features/base/jwt';
17 18
 import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
18 19
 import { MEDIA_TYPE } from '../../react/features/base/media';
@@ -50,6 +51,7 @@ import { playSharedVideo, stopSharedVideo } from '../../react/features/shared-vi
50 51
 import { toggleTileView, setTileView } from '../../react/features/video-layout';
51 52
 import { muteAllParticipants } from '../../react/features/video-menu/actions';
52 53
 import { setVideoQuality } from '../../react/features/video-quality';
54
+import VirtualBackgroundDialog from '../../react/features/virtual-background/components/VirtualBackgroundDialog';
53 55
 import { getJitsiMeetTransport } from '../transport';
54 56
 
55 57
 import { API_ID, ENDPOINT_TEXT_MESSAGE_NAME } from './constants';
@@ -421,6 +423,9 @@ function initCommands() {
421 423
             const whitelistedConfig = getWhitelistedJSON('config', config);
422 424
 
423 425
             APP.store.dispatch(overwriteConfig(whitelistedConfig));
426
+        },
427
+        'toggle-virtual-background': () => {
428
+            APP.store.dispatch(toggleDialog(VirtualBackgroundDialog));
424 429
         }
425 430
     };
426 431
     transport.on('event', ({ data, name }) => {

+ 1
- 0
modules/API/external/external_api.js 查看文件

@@ -60,6 +60,7 @@ const commands = {
60 60
     toggleRaiseHand: 'toggle-raise-hand',
61 61
     toggleShareScreen: 'toggle-share-screen',
62 62
     toggleTileView: 'toggle-tile-view',
63
+    toggleVirtualBackgroundDialog: 'toggle-virtual-background',
63 64
     toggleVideo: 'toggle-video'
64 65
 };
65 66
 

正在加载...
取消
保存