Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

API.js 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. // @flow
  2. import * as JitsiMeetConferenceEvents from '../../ConferenceEvents';
  3. import {
  4. createApiEvent,
  5. sendAnalytics
  6. } from '../../react/features/analytics';
  7. import {
  8. sendTones,
  9. setPassword,
  10. setSubject
  11. } from '../../react/features/base/conference';
  12. import { parseJWTFromURLParams } from '../../react/features/base/jwt';
  13. import { invite } from '../../react/features/invite';
  14. import { toggleTileView } from '../../react/features/video-layout';
  15. import { getJitsiMeetTransport } from '../transport';
  16. import { API_ID, ENDPOINT_TEXT_MESSAGE_NAME } from './constants';
  17. import {
  18. processExternalDeviceRequest
  19. } from '../../react/features/device-selection/functions';
  20. const logger = require('jitsi-meet-logger').getLogger(__filename);
  21. declare var APP: Object;
  22. /**
  23. * List of the available commands.
  24. */
  25. let commands = {};
  26. /**
  27. * The state of screen sharing(started/stopped) before the screen sharing is
  28. * enabled and initialized.
  29. * NOTE: This flag help us to cache the state and use it if toggle-share-screen
  30. * was received before the initialization.
  31. */
  32. let initialScreenSharingState = false;
  33. /**
  34. * The transport instance used for communication with external apps.
  35. *
  36. * @type {Transport}
  37. */
  38. const transport = getJitsiMeetTransport();
  39. /**
  40. * The current audio availability.
  41. *
  42. * @type {boolean}
  43. */
  44. let audioAvailable = true;
  45. /**
  46. * The current video availability.
  47. *
  48. * @type {boolean}
  49. */
  50. let videoAvailable = true;
  51. /**
  52. * Initializes supported commands.
  53. *
  54. * @returns {void}
  55. */
  56. function initCommands() {
  57. commands = {
  58. 'display-name': displayName => {
  59. sendAnalytics(createApiEvent('display.name.changed'));
  60. APP.conference.changeLocalDisplayName(displayName);
  61. },
  62. 'password': password => {
  63. const { conference, passwordRequired }
  64. = APP.store.getState()['features/base/conference'];
  65. if (passwordRequired) {
  66. sendAnalytics(createApiEvent('submit.password'));
  67. APP.store.dispatch(setPassword(
  68. passwordRequired,
  69. passwordRequired.join,
  70. password
  71. ));
  72. } else {
  73. sendAnalytics(createApiEvent('password.changed'));
  74. APP.store.dispatch(setPassword(
  75. conference,
  76. conference.lock,
  77. password
  78. ));
  79. }
  80. },
  81. 'proxy-connection-event': event => {
  82. APP.conference.onProxyConnectionEvent(event);
  83. },
  84. 'send-tones': (options = {}) => {
  85. const { duration, tones, pause } = options;
  86. APP.store.dispatch(sendTones(tones, duration, pause));
  87. },
  88. 'subject': subject => {
  89. sendAnalytics(createApiEvent('subject.changed'));
  90. APP.store.dispatch(setSubject(subject));
  91. },
  92. 'submit-feedback': feedback => {
  93. sendAnalytics(createApiEvent('submit.feedback'));
  94. APP.conference.submitFeedback(feedback.score, feedback.message);
  95. },
  96. 'toggle-audio': () => {
  97. sendAnalytics(createApiEvent('toggle-audio'));
  98. logger.log('Audio toggle: API command received');
  99. APP.conference.toggleAudioMuted(false /* no UI */);
  100. },
  101. 'toggle-video': () => {
  102. sendAnalytics(createApiEvent('toggle-video'));
  103. logger.log('Video toggle: API command received');
  104. APP.conference.toggleVideoMuted(false /* no UI */);
  105. },
  106. 'toggle-film-strip': () => {
  107. sendAnalytics(createApiEvent('film.strip.toggled'));
  108. APP.UI.toggleFilmstrip();
  109. },
  110. 'toggle-chat': () => {
  111. sendAnalytics(createApiEvent('chat.toggled'));
  112. APP.UI.toggleChat();
  113. },
  114. /**
  115. * Callback to invoke when the "toggle-share-screen" command is received.
  116. *
  117. * @param {Object} options - Additional details of how to perform
  118. * the action. Note this parameter is undocumented and experimental.
  119. * @param {boolean} options.enable - Whether trying to enable screen
  120. * sharing or to turn it off.
  121. * @returns {void}
  122. */
  123. 'toggle-share-screen': (options = {}) => {
  124. sendAnalytics(createApiEvent('screen.sharing.toggled'));
  125. toggleScreenSharing(options.enable);
  126. },
  127. 'toggle-tile-view': () => {
  128. sendAnalytics(createApiEvent('tile-view.toggled'));
  129. APP.store.dispatch(toggleTileView());
  130. },
  131. 'video-hangup': (showFeedbackDialog = true) => {
  132. sendAnalytics(createApiEvent('video.hangup'));
  133. APP.conference.hangup(showFeedbackDialog);
  134. },
  135. 'email': email => {
  136. sendAnalytics(createApiEvent('email.changed'));
  137. APP.conference.changeLocalEmail(email);
  138. },
  139. 'avatar-url': avatarUrl => {
  140. sendAnalytics(createApiEvent('avatar.url.changed'));
  141. APP.conference.changeLocalAvatarUrl(avatarUrl);
  142. },
  143. 'send-endpoint-text-message': (to, text) => {
  144. logger.debug('Send endpoint message command received');
  145. try {
  146. APP.conference.sendEndpointMessage(to, {
  147. name: ENDPOINT_TEXT_MESSAGE_NAME,
  148. text
  149. });
  150. } catch (err) {
  151. logger.error('Failed sending endpoint text message', err);
  152. }
  153. }
  154. };
  155. transport.on('event', ({ data, name }) => {
  156. if (name && commands[name]) {
  157. commands[name](...data);
  158. return true;
  159. }
  160. return false;
  161. });
  162. transport.on('request', (request, callback) => {
  163. const { dispatch, getState } = APP.store;
  164. if (processExternalDeviceRequest(dispatch, getState, request, callback)) {
  165. return true;
  166. }
  167. const { name } = request;
  168. switch (name) {
  169. case 'invite': {
  170. const { invitees } = request;
  171. if (!Array.isArray(invitees) || invitees.length === 0) {
  172. callback({
  173. error: new Error('Unexpected format of invitees')
  174. });
  175. break;
  176. }
  177. // The store should be already available because API.init is called
  178. // on appWillMount action.
  179. APP.store.dispatch(
  180. invite(invitees, true))
  181. .then(failedInvitees => {
  182. let error;
  183. let result;
  184. if (failedInvitees.length) {
  185. error = new Error('One or more invites failed!');
  186. } else {
  187. result = true;
  188. }
  189. callback({
  190. error,
  191. result
  192. });
  193. });
  194. break;
  195. }
  196. case 'is-audio-muted':
  197. callback(APP.conference.isLocalAudioMuted());
  198. break;
  199. case 'is-video-muted':
  200. callback(APP.conference.isLocalVideoMuted());
  201. break;
  202. case 'is-audio-available':
  203. callback(audioAvailable);
  204. break;
  205. case 'is-video-available':
  206. callback(videoAvailable);
  207. break;
  208. default:
  209. return false;
  210. }
  211. return true;
  212. });
  213. }
  214. /**
  215. * Listens for desktop/screen sharing enabled events and toggles the screen
  216. * sharing if needed.
  217. *
  218. * @param {boolean} enabled - Current screen sharing enabled status.
  219. * @returns {void}
  220. */
  221. function onDesktopSharingEnabledChanged(enabled = false) {
  222. if (enabled && initialScreenSharingState) {
  223. toggleScreenSharing();
  224. }
  225. }
  226. /**
  227. * Check whether the API should be enabled or not.
  228. *
  229. * @returns {boolean}
  230. */
  231. function shouldBeEnabled() {
  232. return (
  233. typeof API_ID === 'number'
  234. // XXX Enable the API when a JSON Web Token (JWT) is specified in
  235. // the location/URL because then it is very likely that the Jitsi
  236. // Meet (Web) app is being used by an external/wrapping (Web) app
  237. // and, consequently, the latter will need to communicate with the
  238. // former. (The described logic is merely a heuristic though.)
  239. || parseJWTFromURLParams());
  240. }
  241. /**
  242. * Executes on toggle-share-screen command.
  243. *
  244. * @param {boolean} [enable] - Whether this toggle is to explicitly enable or
  245. * disable screensharing. If not defined, the application will automatically
  246. * attempt to toggle between enabled and disabled. This boolean is useful for
  247. * explicitly setting desired screensharing state.
  248. * @returns {void}
  249. */
  250. function toggleScreenSharing(enable) {
  251. if (APP.conference.isDesktopSharingEnabled) {
  252. // eslint-disable-next-line no-empty-function
  253. APP.conference.toggleScreenSharing(enable).catch(() => {});
  254. } else {
  255. initialScreenSharingState = !initialScreenSharingState;
  256. }
  257. }
  258. /**
  259. * Implements API class that communicates with external API class and provides
  260. * interface to access Jitsi Meet features by external applications that embed
  261. * Jitsi Meet.
  262. */
  263. class API {
  264. _enabled: boolean;
  265. /**
  266. * Initializes the API. Setups message event listeners that will receive
  267. * information from external applications that embed Jitsi Meet. It also
  268. * sends a message to the external application that API is initialized.
  269. *
  270. * @param {Object} options - Optional parameters.
  271. * @returns {void}
  272. */
  273. init() {
  274. if (!shouldBeEnabled()) {
  275. return;
  276. }
  277. /**
  278. * Current status (enabled/disabled) of API.
  279. *
  280. * @private
  281. * @type {boolean}
  282. */
  283. this._enabled = true;
  284. APP.conference.addListener(
  285. JitsiMeetConferenceEvents.DESKTOP_SHARING_ENABLED_CHANGED,
  286. onDesktopSharingEnabledChanged);
  287. initCommands();
  288. }
  289. /**
  290. * Notify external application (if API is enabled) that the large video
  291. * visibility changed.
  292. *
  293. * @param {boolean} isHidden - True if the large video is hidden and false
  294. * otherwise.
  295. * @returns {void}
  296. */
  297. notifyLargeVideoVisibilityChanged(isHidden: boolean) {
  298. this._sendEvent({
  299. name: 'large-video-visibility-changed',
  300. isVisible: !isHidden
  301. });
  302. }
  303. /**
  304. * Notifies the external application (spot) that the local jitsi-participant
  305. * has a status update.
  306. *
  307. * @param {Object} event - The message to pass onto spot.
  308. * @returns {void}
  309. */
  310. sendProxyConnectionEvent(event: Object) {
  311. this._sendEvent({
  312. name: 'proxy-connection-event',
  313. ...event
  314. });
  315. }
  316. /**
  317. * Sends event to the external application.
  318. *
  319. * @param {Object} event - The event to be sent.
  320. * @returns {void}
  321. */
  322. _sendEvent(event: Object = {}) {
  323. if (this._enabled) {
  324. transport.sendEvent(event);
  325. }
  326. }
  327. /**
  328. * Notify external application (if API is enabled) that message was sent.
  329. *
  330. * @param {string} message - Message body.
  331. * @returns {void}
  332. */
  333. notifySendingChatMessage(message: string) {
  334. this._sendEvent({
  335. name: 'outgoing-message',
  336. message
  337. });
  338. }
  339. /**
  340. * Notify external application (if API is enabled) that message was
  341. * received.
  342. *
  343. * @param {Object} options - Object with the message properties.
  344. * @returns {void}
  345. */
  346. notifyReceivedChatMessage(
  347. { body, id, nick, ts }: {
  348. body: *, id: string, nick: string, ts: *
  349. } = {}) {
  350. if (APP.conference.isLocalId(id)) {
  351. return;
  352. }
  353. this._sendEvent({
  354. name: 'incoming-message',
  355. from: id,
  356. message: body,
  357. nick,
  358. stamp: ts
  359. });
  360. }
  361. /**
  362. * Notify external application (if API is enabled) that user joined the
  363. * conference.
  364. *
  365. * @param {string} id - User id.
  366. * @param {Object} props - The display name of the user.
  367. * @returns {void}
  368. */
  369. notifyUserJoined(id: string, props: Object) {
  370. this._sendEvent({
  371. name: 'participant-joined',
  372. id,
  373. ...props
  374. });
  375. }
  376. /**
  377. * Notify external application (if API is enabled) that user left the
  378. * conference.
  379. *
  380. * @param {string} id - User id.
  381. * @returns {void}
  382. */
  383. notifyUserLeft(id: string) {
  384. this._sendEvent({
  385. name: 'participant-left',
  386. id
  387. });
  388. }
  389. /**
  390. * Notify external application (if API is enabled) that user changed their
  391. * avatar.
  392. *
  393. * @param {string} id - User id.
  394. * @param {string} avatarURL - The new avatar URL of the participant.
  395. * @returns {void}
  396. */
  397. notifyAvatarChanged(id: string, avatarURL: string) {
  398. this._sendEvent({
  399. name: 'avatar-changed',
  400. avatarURL,
  401. id
  402. });
  403. }
  404. /**
  405. * Notify external application (if API is enabled) that user received
  406. * a text message through datachannels.
  407. *
  408. * @param {Object} data - The event data.
  409. * @returns {void}
  410. */
  411. notifyEndpointTextMessageReceived(data: Object) {
  412. this._sendEvent({
  413. name: 'endpoint-text-message-received',
  414. data
  415. });
  416. }
  417. /**
  418. * Notify external application (if API is enabled) that the device list has
  419. * changed.
  420. *
  421. * @param {Object} devices - The new device list.
  422. * @returns {void}
  423. */
  424. notifyDeviceListChanged(devices: Object) {
  425. this._sendEvent({
  426. name: 'device-list-changed',
  427. devices });
  428. }
  429. /**
  430. * Notify external application (if API is enabled) that user changed their
  431. * nickname.
  432. *
  433. * @param {string} id - User id.
  434. * @param {string} displayname - User nickname.
  435. * @param {string} formattedDisplayName - The display name shown in Jitsi
  436. * meet's UI for the user.
  437. * @returns {void}
  438. */
  439. notifyDisplayNameChanged(
  440. id: string,
  441. { displayName, formattedDisplayName }: Object) {
  442. this._sendEvent({
  443. name: 'display-name-change',
  444. displayname: displayName,
  445. formattedDisplayName,
  446. id
  447. });
  448. }
  449. /**
  450. * Notify external application (if API is enabled) that user changed their
  451. * email.
  452. *
  453. * @param {string} id - User id.
  454. * @param {string} email - The new email of the participant.
  455. * @returns {void}
  456. */
  457. notifyEmailChanged(
  458. id: string,
  459. { email }: Object) {
  460. this._sendEvent({
  461. name: 'email-change',
  462. email,
  463. id
  464. });
  465. }
  466. /**
  467. * Notify external application (if API is enabled) that the conference has
  468. * been joined.
  469. *
  470. * @param {string} roomName - The room name.
  471. * @param {string} id - The id of the local user.
  472. * @param {Object} props - The display name and avatar URL of the local
  473. * user.
  474. * @returns {void}
  475. */
  476. notifyConferenceJoined(roomName: string, id: string, props: Object) {
  477. this._sendEvent({
  478. name: 'video-conference-joined',
  479. roomName,
  480. id,
  481. ...props
  482. });
  483. }
  484. /**
  485. * Notify external application (if API is enabled) that user changed their
  486. * nickname.
  487. *
  488. * @param {string} roomName - User id.
  489. * @returns {void}
  490. */
  491. notifyConferenceLeft(roomName: string) {
  492. this._sendEvent({
  493. name: 'video-conference-left',
  494. roomName
  495. });
  496. }
  497. /**
  498. * Notify external application (if API is enabled) that we are ready to be
  499. * closed.
  500. *
  501. * @returns {void}
  502. */
  503. notifyReadyToClose() {
  504. this._sendEvent({ name: 'video-ready-to-close' });
  505. }
  506. /**
  507. * Notify external application (if API is enabled) that a suspend event in host computer.
  508. *
  509. * @returns {void}
  510. */
  511. notifySuspendDetected() {
  512. this._sendEvent({ name: 'suspend-detected' });
  513. }
  514. /**
  515. * Notify external application (if API is enabled) for audio muted status
  516. * changed.
  517. *
  518. * @param {boolean} muted - The new muted status.
  519. * @returns {void}
  520. */
  521. notifyAudioMutedStatusChanged(muted: boolean) {
  522. this._sendEvent({
  523. name: 'audio-mute-status-changed',
  524. muted
  525. });
  526. }
  527. /**
  528. * Notify external application (if API is enabled) for video muted status
  529. * changed.
  530. *
  531. * @param {boolean} muted - The new muted status.
  532. * @returns {void}
  533. */
  534. notifyVideoMutedStatusChanged(muted: boolean) {
  535. this._sendEvent({
  536. name: 'video-mute-status-changed',
  537. muted
  538. });
  539. }
  540. /**
  541. * Notify external application (if API is enabled) for audio availability
  542. * changed.
  543. *
  544. * @param {boolean} available - True if available and false otherwise.
  545. * @returns {void}
  546. */
  547. notifyAudioAvailabilityChanged(available: boolean) {
  548. audioAvailable = available;
  549. this._sendEvent({
  550. name: 'audio-availability-changed',
  551. available
  552. });
  553. }
  554. /**
  555. * Notify external application (if API is enabled) for video available
  556. * status changed.
  557. *
  558. * @param {boolean} available - True if available and false otherwise.
  559. * @returns {void}
  560. */
  561. notifyVideoAvailabilityChanged(available: boolean) {
  562. videoAvailable = available;
  563. this._sendEvent({
  564. name: 'video-availability-changed',
  565. available
  566. });
  567. }
  568. /**
  569. * Notify external application (if API is enabled) that the on stage
  570. * participant has changed.
  571. *
  572. * @param {string} id - User id of the new on stage participant.
  573. * @returns {void}
  574. */
  575. notifyOnStageParticipantChanged(id: string) {
  576. this._sendEvent({
  577. name: 'on-stage-participant-changed',
  578. id
  579. });
  580. }
  581. /**
  582. * Notify external application of an unexpected camera-related error having
  583. * occurred.
  584. *
  585. * @param {string} type - The type of the camera error.
  586. * @param {string} message - Additional information about the error.
  587. * @returns {void}
  588. */
  589. notifyOnCameraError(type: string, message: string) {
  590. this._sendEvent({
  591. name: 'camera-error',
  592. type,
  593. message
  594. });
  595. }
  596. /**
  597. * Notify external application of an unexpected mic-related error having
  598. * occurred.
  599. *
  600. * @param {string} type - The type of the mic error.
  601. * @param {string} message - Additional information about the error.
  602. * @returns {void}
  603. */
  604. notifyOnMicError(type: string, message: string) {
  605. this._sendEvent({
  606. name: 'mic-error',
  607. type,
  608. message
  609. });
  610. }
  611. /**
  612. * Notify external application (if API is enabled) that conference feedback
  613. * has been submitted. Intended to be used in conjunction with the
  614. * submit-feedback command to get notified if feedback was submitted.
  615. *
  616. * @param {string} error - A failure message, if any.
  617. * @returns {void}
  618. */
  619. notifyFeedbackSubmitted(error: string) {
  620. this._sendEvent({
  621. name: 'feedback-submitted',
  622. error
  623. });
  624. }
  625. /**
  626. * Notify external application (if API is enabled) that the feedback prompt
  627. * has been displayed.
  628. *
  629. * @returns {void}
  630. */
  631. notifyFeedbackPromptDisplayed() {
  632. this._sendEvent({ name: 'feedback-prompt-displayed' });
  633. }
  634. /**
  635. * Notify external application (if API is enabled) that the display
  636. * configuration of the filmstrip has been changed.
  637. *
  638. * @param {boolean} visible - Whether or not the filmstrip has been set to
  639. * be displayed or hidden.
  640. * @returns {void}
  641. */
  642. notifyFilmstripDisplayChanged(visible: boolean) {
  643. this._sendEvent({
  644. name: 'filmstrip-display-changed',
  645. visible
  646. });
  647. }
  648. /**
  649. * Notify external application of a participant, remote or local, being
  650. * removed from the conference by another participant.
  651. *
  652. * @param {string} kicked - The ID of the participant removed from the
  653. * conference.
  654. * @param {string} kicker - The ID of the participant that removed the
  655. * other participant.
  656. * @returns {void}
  657. */
  658. notifyKickedOut(kicked: Object, kicker: Object) {
  659. this._sendEvent({
  660. name: 'participant-kicked-out',
  661. kicked,
  662. kicker
  663. });
  664. }
  665. /**
  666. * Notify external application of the current meeting requiring a password
  667. * to join.
  668. *
  669. * @returns {void}
  670. */
  671. notifyOnPasswordRequired() {
  672. this._sendEvent({ name: 'password-required' });
  673. }
  674. /**
  675. * Notify external application (if API is enabled) that the screen sharing
  676. * has been turned on/off.
  677. *
  678. * @param {boolean} on - True if screen sharing is enabled.
  679. * @param {Object} details - Additional information about the screen
  680. * sharing.
  681. * @param {string} details.sourceType - Type of device or window the screen
  682. * share is capturing.
  683. * @returns {void}
  684. */
  685. notifyScreenSharingStatusChanged(on: boolean, details: Object) {
  686. this._sendEvent({
  687. name: 'screen-sharing-status-changed',
  688. on,
  689. details
  690. });
  691. }
  692. /**
  693. * Notify external application (if API is enabled) that the dominant speaker
  694. * has been turned on/off.
  695. *
  696. * @param {string} id - Id of the dominant participant.
  697. * @returns {void}
  698. */
  699. notifyDominantSpeakerChanged(id: string) {
  700. this._sendEvent({
  701. name: 'dominant-speaker-changed',
  702. id
  703. });
  704. }
  705. /**
  706. * Notify external application (if API is enabled) that the conference
  707. * changed their subject.
  708. *
  709. * @param {string} subject - Conference subject.
  710. * @returns {void}
  711. */
  712. notifySubjectChanged(subject: string) {
  713. this._sendEvent({
  714. name: 'subject-change',
  715. subject
  716. });
  717. }
  718. /**
  719. * Notify external application (if API is enabled) that tile view has been
  720. * entered or exited.
  721. *
  722. * @param {string} enabled - True if tile view is currently displayed, false
  723. * otherwise.
  724. * @returns {void}
  725. */
  726. notifyTileViewChanged(enabled: boolean) {
  727. this._sendEvent({
  728. name: 'tile-view-changed',
  729. enabled
  730. });
  731. }
  732. /**
  733. * Disposes the allocated resources.
  734. *
  735. * @returns {void}
  736. */
  737. dispose() {
  738. if (this._enabled) {
  739. this._enabled = false;
  740. APP.conference.removeListener(
  741. JitsiMeetConferenceEvents.DESKTOP_SHARING_ENABLED_CHANGED,
  742. onDesktopSharingEnabledChanged);
  743. }
  744. }
  745. }
  746. export default new API();