Browse Source

feat(api): Expose event used for sending browser support

master
Vlad Piersec 4 years ago
parent
commit
0bf52b613b
2 changed files with 16 additions and 0 deletions
  1. 15
    0
      modules/API/API.js
  2. 1
    0
      modules/API/external/external_api.js

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

15
 } from '../../react/features/base/conference';
15
 } from '../../react/features/base/conference';
16
 import { overwriteConfig, getWhitelistedJSON } from '../../react/features/base/config';
16
 import { overwriteConfig, getWhitelistedJSON } from '../../react/features/base/config';
17
 import { toggleDialog } from '../../react/features/base/dialog/actions';
17
 import { toggleDialog } from '../../react/features/base/dialog/actions';
18
+import { isSupportedBrowser } from '../../react/features/base/environment';
18
 import { parseJWTFromURLParams } from '../../react/features/base/jwt';
19
 import { parseJWTFromURLParams } from '../../react/features/base/jwt';
19
 import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
20
 import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
20
 import { MEDIA_TYPE } from '../../react/features/base/media';
21
 import { MEDIA_TYPE } from '../../react/features/base/media';
692
         this._enabled = true;
693
         this._enabled = true;
693
 
694
 
694
         initCommands();
695
         initCommands();
696
+        this.notifyBrowserSupport(isSupportedBrowser());
695
     }
697
     }
696
 
698
 
697
     /**
699
     /**
1355
         });
1357
         });
1356
     }
1358
     }
1357
 
1359
 
1360
+    /**
1361
+     * Notify external application (if API is enabled) wether the used browser is supported or not.
1362
+     *
1363
+     * @param {boolean} supported - If browser is supported or not.
1364
+     * @returns {void}
1365
+     */
1366
+    notifyBrowserSupport(supported: boolean) {
1367
+        this._sendEvent({
1368
+            name: 'browser-support',
1369
+            supported
1370
+        });
1371
+    }
1372
+
1358
     /**
1373
     /**
1359
      * Disposes the allocated resources.
1374
      * Disposes the allocated resources.
1360
      *
1375
      *

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

76
     'avatar-changed': 'avatarChanged',
76
     'avatar-changed': 'avatarChanged',
77
     'audio-availability-changed': 'audioAvailabilityChanged',
77
     'audio-availability-changed': 'audioAvailabilityChanged',
78
     'audio-mute-status-changed': 'audioMuteStatusChanged',
78
     'audio-mute-status-changed': 'audioMuteStatusChanged',
79
+    'browser-support': 'browserSupport',
79
     'camera-error': 'cameraError',
80
     'camera-error': 'cameraError',
80
     'chat-updated': 'chatUpdated',
81
     'chat-updated': 'chatUpdated',
81
     'content-sharing-participants-changed': 'contentSharingParticipantsChanged',
82
     'content-sharing-participants-changed': 'contentSharingParticipantsChanged',

Loading…
Cancel
Save