您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.js 987B

1234567891011121314151617181920212223242526
  1. // @flow
  2. import { NativeModules } from 'react-native';
  3. import { getAppProp } from '../../base/app';
  4. /**
  5. * Sends a specific event to the native counterpart of the External API. Native
  6. * apps may listen to such events via the mechanisms provided by the (native)
  7. * mobile Jitsi Meet SDK.
  8. *
  9. * @param {Object} store - The redux store.
  10. * @param {string} name - The name of the event to send.
  11. * @param {Object} data - The details/specifics of the event to send determined
  12. * by/associated with the specified {@code name}.
  13. * @returns {void}
  14. */
  15. export function sendEvent(store: Object, name: string, data: Object) {
  16. // The JavaScript App needs to provide uniquely identifying information to
  17. // the native ExternalAPI module so that the latter may match the former to
  18. // the native view which hosts it.
  19. const externalAPIScope = getAppProp(store, 'externalAPIScope');
  20. externalAPIScope
  21. && NativeModules.ExternalAPI.sendEvent(name, data, externalAPIScope);
  22. }