You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

external_api.js 23KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. import EventEmitter from 'events';
  2. import { urlObjectToString } from '../../../react/features/base/util/uri';
  3. import {
  4. PostMessageTransportBackend,
  5. Transport
  6. } from '../../transport';
  7. import electronPopupsConfig from './electronPopupsConfig.json';
  8. const logger = require('jitsi-meet-logger').getLogger(__filename);
  9. const ALWAYS_ON_TOP_FILENAMES = [
  10. 'css/all.css', 'libs/alwaysontop.min.js'
  11. ];
  12. /**
  13. * Maps the names of the commands expected by the API with the name of the
  14. * commands expected by jitsi-meet
  15. */
  16. const commands = {
  17. avatarUrl: 'avatar-url',
  18. displayName: 'display-name',
  19. email: 'email',
  20. hangup: 'video-hangup',
  21. submitFeedback: 'submit-feedback',
  22. toggleAudio: 'toggle-audio',
  23. toggleChat: 'toggle-chat',
  24. toggleFilmStrip: 'toggle-film-strip',
  25. toggleShareScreen: 'toggle-share-screen',
  26. toggleVideo: 'toggle-video'
  27. };
  28. /**
  29. * Maps the names of the events expected by the API with the name of the
  30. * events expected by jitsi-meet
  31. */
  32. const events = {
  33. 'avatar-changed': 'avatarChanged',
  34. 'audio-availability-changed': 'audioAvailabilityChanged',
  35. 'audio-mute-status-changed': 'audioMuteStatusChanged',
  36. 'display-name-change': 'displayNameChange',
  37. 'email-change': 'emailChange',
  38. 'feedback-submitted': 'feedbackSubmitted',
  39. 'incoming-message': 'incomingMessage',
  40. 'outgoing-message': 'outgoingMessage',
  41. 'participant-joined': 'participantJoined',
  42. 'participant-left': 'participantLeft',
  43. 'video-ready-to-close': 'readyToClose',
  44. 'video-conference-joined': 'videoConferenceJoined',
  45. 'video-conference-left': 'videoConferenceLeft',
  46. 'video-availability-changed': 'videoAvailabilityChanged',
  47. 'video-mute-status-changed': 'videoMuteStatusChanged',
  48. 'screen-sharing-status-changed': 'screenSharingStatusChanged'
  49. };
  50. /**
  51. * Last id of api object
  52. * @type {number}
  53. */
  54. let id = 0;
  55. /**
  56. * Adds given number to the numberOfParticipants property of given APIInstance.
  57. *
  58. * @param {JitsiMeetExternalAPI} APIInstance - The instance of the API.
  59. * @param {int} number - The number of participants to be added to
  60. * numberOfParticipants property (this parameter can be negative number if the
  61. * numberOfParticipants should be decreased).
  62. * @returns {void}
  63. */
  64. function changeParticipantNumber(APIInstance, number) {
  65. APIInstance._numberOfParticipants += number;
  66. }
  67. /**
  68. * Generates the URL for the iframe.
  69. *
  70. * @param {string} domain - The domain name of the server that hosts the
  71. * conference.
  72. * @param {string} [options] - Another optional parameters.
  73. * @param {Object} [options.configOverwrite] - Object containing configuration
  74. * options defined in config.js to be overridden.
  75. * @param {Object} [options.interfaceConfigOverwrite] - Object containing
  76. * configuration options defined in interface_config.js to be overridden.
  77. * @param {string} [options.jwt] - The JWT token if needed by jitsi-meet for
  78. * authentication.
  79. * @param {boolean} [options.noSSL] - If the value is true https won't be used.
  80. * @param {string} [options.roomName] - The name of the room to join.
  81. * @returns {string} The URL.
  82. */
  83. function generateURL(domain, options = {}) {
  84. return urlObjectToString({
  85. ...options,
  86. url:
  87. `${options.noSSL ? 'http' : 'https'}://${
  88. domain}/#jitsi_meet_external_api_id=${id}`
  89. });
  90. }
  91. /**
  92. * Parses the arguments passed to the constructor. If the old format is used
  93. * the function translates the arguments to the new format.
  94. *
  95. * @param {Array} args - The arguments to be parsed.
  96. * @returns {Object} JS object with properties.
  97. */
  98. function parseArguments(args) {
  99. if (!args.length) {
  100. return {};
  101. }
  102. const firstArg = args[0];
  103. switch (typeof firstArg) {
  104. case 'string': // old arguments format
  105. case undefined: // eslint-disable-line no-case-declarations
  106. // not sure which format but we are trying to parse the old
  107. // format because if the new format is used everything will be undefined
  108. // anyway.
  109. const [
  110. roomName,
  111. width,
  112. height,
  113. parentNode,
  114. configOverwrite,
  115. interfaceConfigOverwrite,
  116. noSSL,
  117. jwt,
  118. onload
  119. ] = args;
  120. return {
  121. roomName,
  122. width,
  123. height,
  124. parentNode,
  125. configOverwrite,
  126. interfaceConfigOverwrite,
  127. noSSL,
  128. jwt,
  129. onload
  130. };
  131. case 'object': // new arguments format
  132. return args[0];
  133. default:
  134. throw new Error('Can\'t parse the arguments!');
  135. }
  136. }
  137. /**
  138. * Compute valid values for height and width. If a number is specified it's
  139. * treated as pixel units. If the value is expressed in px, em, pt or
  140. * percentage, it's used as is.
  141. *
  142. * @param {any} value - The value to be parsed.
  143. * @returns {string|undefined} The parsed value that can be used for setting
  144. * sizes through the style property. If invalid value is passed the method
  145. * retuns undefined.
  146. */
  147. function parseSizeParam(value) {
  148. let parsedValue;
  149. // This regex parses values of the form 100px, 100em, 100pt or 100%.
  150. // Values like 100 or 100px are handled outside of the regex, and
  151. // invalid values will be ignored and the minimum will be used.
  152. const re = /([0-9]*\.?[0-9]+)(em|pt|px|%)$/;
  153. if (typeof value === 'string' && String(value).match(re) !== null) {
  154. parsedValue = value;
  155. } else if (typeof value === 'number') {
  156. parsedValue = `${value}px`;
  157. }
  158. return parsedValue;
  159. }
  160. /**
  161. * The IFrame API interface class.
  162. */
  163. export default class JitsiMeetExternalAPI extends EventEmitter {
  164. /**
  165. * Constructs new API instance. Creates iframe and loads Jitsi Meet in it.
  166. *
  167. * @param {string} domain - The domain name of the server that hosts the
  168. * conference.
  169. * @param {Object} [options] - Optional arguments.
  170. * @param {string} [options.roomName] - The name of the room to join.
  171. * @param {number|string} [options.width] - Width of the iframe. Check
  172. * parseSizeParam for format details.
  173. * @param {number|string} [options.height] - Height of the iframe. Check
  174. * parseSizeParam for format details.
  175. * @param {DOMElement} [options.parentNode] - The node that will contain the
  176. * iframe.
  177. * @param {Object} [options.configOverwrite] - Object containing
  178. * configuration options defined in config.js to be overridden.
  179. * @param {Object} [options.interfaceConfigOverwrite] - Object containing
  180. * configuration options defined in interface_config.js to be overridden.
  181. * @param {boolean} [options.noSSL] - If the value is true https won't be
  182. * used.
  183. * @param {string} [options.jwt] - The JWT token if needed by jitsi-meet for
  184. * authentication.
  185. * @param {string} [options.onload] - The onload function that will listen
  186. * for iframe onload event.
  187. * @param {Array<Object>} [options.invitees] - Array of objects containing
  188. * information about new participants that will be invited in the call.
  189. */
  190. constructor(domain, ...args) {
  191. super();
  192. const {
  193. roomName = '',
  194. width = '100%',
  195. height = '100%',
  196. parentNode = document.body,
  197. configOverwrite = {},
  198. interfaceConfigOverwrite = {},
  199. noSSL = false,
  200. jwt = undefined,
  201. onload = undefined,
  202. invitees
  203. } = parseArguments(args);
  204. this._parentNode = parentNode;
  205. this._url = generateURL(domain, {
  206. configOverwrite,
  207. interfaceConfigOverwrite,
  208. jwt,
  209. noSSL,
  210. roomName
  211. });
  212. this._createIFrame(height, width, onload);
  213. this._transport = new Transport({
  214. backend: new PostMessageTransportBackend({
  215. postisOptions: {
  216. scope: `jitsi_meet_external_api_${id}`,
  217. window: this._frame.contentWindow
  218. }
  219. })
  220. });
  221. if (Array.isArray(invitees) && invitees.length > 0) {
  222. this.invite(invitees);
  223. }
  224. this._isLargeVideoVisible = true;
  225. this._numberOfParticipants = 0;
  226. this._participants = {};
  227. this._myUserID = undefined;
  228. this._onStageParticipant = undefined;
  229. this._setupListeners();
  230. id++;
  231. }
  232. /**
  233. * Creates the iframe element.
  234. *
  235. * @param {number|string} height - The height of the iframe. Check
  236. * parseSizeParam for format details.
  237. * @param {number|string} width - The with of the iframe. Check
  238. * parseSizeParam for format details.
  239. * @param {Function} onload - The function that will listen
  240. * for onload event.
  241. * @returns {void}
  242. *
  243. * @private
  244. */
  245. _createIFrame(height, width, onload) {
  246. const frameName = `jitsiConferenceFrame${id}`;
  247. this._frame = document.createElement('iframe');
  248. this._frame.allow = 'camera; microphone';
  249. this._frame.src = this._url;
  250. this._frame.name = frameName;
  251. this._frame.id = frameName;
  252. this._setSize(height, width);
  253. this._frame.setAttribute('allowFullScreen', 'true');
  254. this._frame.style.border = 0;
  255. if (onload) {
  256. // waits for iframe resources to load
  257. // and fires event when it is done
  258. this._frame.onload = onload;
  259. }
  260. this._frame = this._parentNode.appendChild(this._frame);
  261. }
  262. /**
  263. * Returns arrays with the all resources for the always on top feature.
  264. *
  265. * @returns {Array<string>}
  266. */
  267. _getAlwaysOnTopResources() {
  268. const iframeWindow = this._frame.contentWindow;
  269. const iframeDocument = iframeWindow.document;
  270. let baseURL = '';
  271. const base = iframeDocument.querySelector('base');
  272. if (base && base.href) {
  273. baseURL = base.href;
  274. } else {
  275. const { protocol, host } = iframeWindow.location;
  276. baseURL = `${protocol}//${host}`;
  277. }
  278. return ALWAYS_ON_TOP_FILENAMES.map(
  279. filename => (new URL(filename, baseURL)).href
  280. );
  281. }
  282. /**
  283. * Returns the id of the on stage participant.
  284. *
  285. * @returns {string} - The id of the on stage participant.
  286. */
  287. _getOnStageParticipant() {
  288. return this._onStageParticipant;
  289. }
  290. /**
  291. * Getter for the large video element in Jitsi Meet.
  292. *
  293. * @returns {HTMLElement|undefined} - The large video.
  294. */
  295. _getLargeVideo() {
  296. const iframe = this.getIFrame();
  297. if (!this._isLargeVideoVisible
  298. || !iframe
  299. || !iframe.contentWindow
  300. || !iframe.contentWindow.document) {
  301. return;
  302. }
  303. return iframe.contentWindow.document.getElementById('largeVideo');
  304. }
  305. /**
  306. * Sets the size of the iframe element.
  307. *
  308. * @param {number|string} height - The height of the iframe.
  309. * @param {number|string} width - The with of the iframe.
  310. * @returns {void}
  311. *
  312. * @private
  313. */
  314. _setSize(height, width) {
  315. const parsedHeight = parseSizeParam(height);
  316. const parsedWidth = parseSizeParam(width);
  317. if (parsedHeight !== undefined) {
  318. this._frame.style.height = parsedHeight;
  319. }
  320. if (parsedWidth !== undefined) {
  321. this._frame.style.width = parsedWidth;
  322. }
  323. }
  324. /**
  325. * Setups listeners that are used internally for JitsiMeetExternalAPI.
  326. *
  327. * @returns {void}
  328. *
  329. * @private
  330. */
  331. _setupListeners() {
  332. this._transport.on('event', ({ name, ...data }) => {
  333. const userID = data.id;
  334. switch (name) {
  335. case 'video-conference-joined':
  336. this._myUserID = userID;
  337. this._participants[userID] = {
  338. avatarURL: data.avatarURL
  339. };
  340. // eslint-disable-next-line no-fallthrough
  341. case 'participant-joined': {
  342. this._participants[userID] = this._participants[userID] || {};
  343. this._participants[userID].displayName = data.displayName;
  344. this._participants[userID].formattedDisplayName
  345. = data.formattedDisplayName;
  346. changeParticipantNumber(this, 1);
  347. break;
  348. }
  349. case 'participant-left':
  350. changeParticipantNumber(this, -1);
  351. delete this._participants[userID];
  352. break;
  353. case 'display-name-change': {
  354. const user = this._participants[userID];
  355. if (user) {
  356. user.displayName = data.displayname;
  357. user.formattedDisplayName = data.formattedDisplayName;
  358. }
  359. break;
  360. }
  361. case 'email-change': {
  362. const user = this._participants[userID];
  363. if (user) {
  364. user.email = data.email;
  365. }
  366. break;
  367. }
  368. case 'avatar-changed': {
  369. const user = this._participants[userID];
  370. if (user) {
  371. user.avatarURL = data.avatarURL;
  372. }
  373. break;
  374. }
  375. case 'on-stage-participant-changed':
  376. this._onStageParticipant = userID;
  377. this.emit('largeVideoChanged');
  378. break;
  379. case 'large-video-visibility-changed':
  380. this._isLargeVideoVisible = data.isVisible;
  381. this.emit('largeVideoChanged');
  382. break;
  383. case 'video-conference-left':
  384. changeParticipantNumber(this, -1);
  385. delete this._participants[this._myUserID];
  386. break;
  387. }
  388. const eventName = events[name];
  389. if (eventName) {
  390. this.emit(eventName, data);
  391. return true;
  392. }
  393. return false;
  394. });
  395. }
  396. /**
  397. * Adds event listener to Meet Jitsi.
  398. *
  399. * @param {string} event - The name of the event.
  400. * @param {Function} listener - The listener.
  401. * @returns {void}
  402. *
  403. * @deprecated
  404. * NOTE: This method is not removed for backward comatability purposes.
  405. */
  406. addEventListener(event, listener) {
  407. this.on(event, listener);
  408. }
  409. /**
  410. * Adds event listeners to Meet Jitsi.
  411. *
  412. * @param {Object} listeners - The object key should be the name of
  413. * the event and value - the listener.
  414. * Currently we support the following
  415. * events:
  416. * incomingMessage - receives event notifications about incoming
  417. * messages. The listener will receive object with the following structure:
  418. * {{
  419. * 'from': from,//JID of the user that sent the message
  420. * 'nick': nick,//the nickname of the user that sent the message
  421. * 'message': txt//the text of the message
  422. * }}
  423. * outgoingMessage - receives event notifications about outgoing
  424. * messages. The listener will receive object with the following structure:
  425. * {{
  426. * 'message': txt//the text of the message
  427. * }}
  428. * displayNameChanged - receives event notifications about display name
  429. * change. The listener will receive object with the following structure:
  430. * {{
  431. * jid: jid,//the JID of the participant that changed his display name
  432. * displayname: displayName //the new display name
  433. * }}
  434. * participantJoined - receives event notifications about new participant.
  435. * The listener will receive object with the following structure:
  436. * {{
  437. * jid: jid //the jid of the participant
  438. * }}
  439. * participantLeft - receives event notifications about the participant that
  440. * left the room.
  441. * The listener will receive object with the following structure:
  442. * {{
  443. * jid: jid //the jid of the participant
  444. * }}
  445. * video-conference-joined - receives event notifications about the local
  446. * user has successfully joined the video conference.
  447. * The listener will receive object with the following structure:
  448. * {{
  449. * roomName: room //the room name of the conference
  450. * }}
  451. * video-conference-left - receives event notifications about the local user
  452. * has left the video conference.
  453. * The listener will receive object with the following structure:
  454. * {{
  455. * roomName: room //the room name of the conference
  456. * }}
  457. * screenSharingStatusChanged - receives event notifications about
  458. * turning on/off the local user screen sharing.
  459. * The listener will receive object with the following structure:
  460. * {{
  461. * on: on //whether screen sharing is on
  462. * }}
  463. * readyToClose - all hangup operations are completed and Jitsi Meet is
  464. * ready to be disposed.
  465. * @returns {void}
  466. *
  467. * @deprecated
  468. * NOTE: This method is not removed for backward comatability purposes.
  469. */
  470. addEventListeners(listeners) {
  471. for (const event in listeners) { // eslint-disable-line guard-for-in
  472. this.addEventListener(event, listeners[event]);
  473. }
  474. }
  475. /**
  476. * Removes the listeners and removes the Jitsi Meet frame.
  477. *
  478. * @returns {void}
  479. */
  480. dispose() {
  481. this._transport.dispose();
  482. this.removeAllListeners();
  483. if (this._frame) {
  484. this._frame.parentNode.removeChild(this._frame);
  485. }
  486. }
  487. /**
  488. * Executes command. The available commands are:
  489. * displayName - sets the display name of the local participant to the value
  490. * passed in the arguments array.
  491. * toggleAudio - mutes / unmutes audio with no arguments.
  492. * toggleVideo - mutes / unmutes video with no arguments.
  493. * toggleFilmStrip - hides / shows the filmstrip with no arguments.
  494. * If the command doesn't require any arguments the parameter should be set
  495. * to empty array or it may be omitted.
  496. *
  497. * @param {string} name - The name of the command.
  498. * @returns {void}
  499. */
  500. executeCommand(name, ...args) {
  501. if (!(name in commands)) {
  502. logger.error('Not supported command name.');
  503. return;
  504. }
  505. this._transport.sendEvent({
  506. data: args,
  507. name: commands[name]
  508. });
  509. }
  510. /**
  511. * Executes commands. The available commands are:
  512. * displayName - sets the display name of the local participant to the value
  513. * passed in the arguments array.
  514. * toggleAudio - mutes / unmutes audio. no arguments
  515. * toggleVideo - mutes / unmutes video. no arguments
  516. * toggleFilmStrip - hides / shows the filmstrip. no arguments
  517. * toggleChat - hides / shows chat. no arguments.
  518. * toggleShareScreen - starts / stops screen sharing. no arguments.
  519. *
  520. * @param {Object} commandList - The object with commands to be executed.
  521. * The keys of the object are the commands that will be executed and the
  522. * values are the arguments for the command.
  523. * @returns {void}
  524. */
  525. executeCommands(commandList) {
  526. for (const key in commandList) { // eslint-disable-line guard-for-in
  527. this.executeCommand(key, commandList[key]);
  528. }
  529. }
  530. /**
  531. * Check if the audio is available.
  532. *
  533. * @returns {Promise} - Resolves with true if the audio available, with
  534. * false if not and rejects on failure.
  535. */
  536. isAudioAvailable() {
  537. return this._transport.sendRequest({
  538. name: 'is-audio-available'
  539. });
  540. }
  541. /**
  542. * Invite people to the call.
  543. *
  544. * @param {Array<Object>} invitees - The invitees.
  545. * @returns {Promise} - Resolves on success and rejects on failure.
  546. */
  547. invite(invitees) {
  548. if (!Array.isArray(invitees) || invitees.length === 0) {
  549. return Promise.reject(new TypeError('Invalid Argument'));
  550. }
  551. return this._transport.sendRequest({
  552. name: 'invite',
  553. invitees
  554. });
  555. }
  556. /**
  557. * Returns the audio mute status.
  558. *
  559. * @returns {Promise} - Resolves with the audio mute status and rejects on
  560. * failure.
  561. */
  562. isAudioMuted() {
  563. return this._transport.sendRequest({
  564. name: 'is-audio-muted'
  565. });
  566. }
  567. /**
  568. * Returns the avatar URL of a participant.
  569. *
  570. * @param {string} participantId - The id of the participant.
  571. * @returns {string} The avatar URL.
  572. */
  573. getAvatarURL(participantId) {
  574. const { avatarURL } = this._participants[participantId] || {};
  575. return avatarURL;
  576. }
  577. /**
  578. * Returns the display name of a participant.
  579. *
  580. * @param {string} participantId - The id of the participant.
  581. * @returns {string} The display name.
  582. */
  583. getDisplayName(participantId) {
  584. const { displayName } = this._participants[participantId] || {};
  585. return displayName;
  586. }
  587. /**
  588. * Returns the email of a participant.
  589. *
  590. * @param {string} participantId - The id of the participant.
  591. * @returns {string} The email.
  592. */
  593. getEmail(participantId) {
  594. const { email } = this._participants[participantId] || {};
  595. return email;
  596. }
  597. /**
  598. * Returns the formatted display name of a participant.
  599. *
  600. * @param {string} participantId - The id of the participant.
  601. * @returns {string} The formatted display name.
  602. */
  603. _getFormattedDisplayName(participantId) {
  604. const { formattedDisplayName }
  605. = this._participants[participantId] || {};
  606. return formattedDisplayName;
  607. }
  608. /**
  609. * Returns the iframe that loads Jitsi Meet.
  610. *
  611. * @returns {HTMLElement} The iframe.
  612. */
  613. getIFrame() {
  614. return this._frame;
  615. }
  616. /**
  617. * Returns the number of participants in the conference. The local
  618. * participant is included.
  619. *
  620. * @returns {int} The number of participants in the conference.
  621. */
  622. getNumberOfParticipants() {
  623. return this._numberOfParticipants;
  624. }
  625. /**
  626. * Check if the video is available.
  627. *
  628. * @returns {Promise} - Resolves with true if the video available, with
  629. * false if not and rejects on failure.
  630. */
  631. isVideoAvailable() {
  632. return this._transport.sendRequest({
  633. name: 'is-video-available'
  634. });
  635. }
  636. /**
  637. * Returns the audio mute status.
  638. *
  639. * @returns {Promise} - Resolves with the audio mute status and rejects on
  640. * failure.
  641. */
  642. isVideoMuted() {
  643. return this._transport.sendRequest({
  644. name: 'is-video-muted'
  645. });
  646. }
  647. /**
  648. * Removes event listener.
  649. *
  650. * @param {string} event - The name of the event.
  651. * @returns {void}
  652. *
  653. * @deprecated
  654. * NOTE: This method is not removed for backward comatability purposes.
  655. */
  656. removeEventListener(event) {
  657. this.removeAllListeners(event);
  658. }
  659. /**
  660. * Removes event listeners.
  661. *
  662. * @param {Array<string>} eventList - Array with the names of the events.
  663. * @returns {void}
  664. *
  665. * @deprecated
  666. * NOTE: This method is not removed for backward comatability purposes.
  667. */
  668. removeEventListeners(eventList) {
  669. eventList.forEach(event => this.removeEventListener(event));
  670. }
  671. /**
  672. * Returns the configuration for electron for the windows that are open
  673. * from Jitsi Meet.
  674. *
  675. * @returns {Promise<Object>}
  676. *
  677. * NOTE: For internal use only.
  678. */
  679. _getElectronPopupsConfig() {
  680. return Promise.resolve(electronPopupsConfig);
  681. }
  682. }