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

index.native.js 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. // @flow
  2. // FIXME The bundler-related (and the browser-related) polyfills were born at
  3. // the very early days of prototyping the execution of lib-jitsi-meet on
  4. // react-native. Today, the feature base/lib-jitsi-meet should not be
  5. // responsible for such polyfills because it is not the only feature relying on
  6. // them. Additionally, the polyfills are usually necessary earlier than the
  7. // execution of base/lib-jitsi-meet (which is understandable given that the
  8. // polyfills are globals). The remaining problem to be solved here is where to
  9. // collect the polyfills' files.
  10. import './features/base/lib-jitsi-meet/native/polyfills-bundler';
  11. import React, { PureComponent } from 'react';
  12. import { AppRegistry } from 'react-native';
  13. import { App } from './features/app';
  14. import { IncomingCallApp } from './features/mobile/incoming-call';
  15. /**
  16. * The type of the React {@code Component} props of {@link Root}.
  17. */
  18. type Props = {
  19. /**
  20. * The URL, if any, with which the app was launched.
  21. */
  22. url: Object | string
  23. };
  24. /**
  25. * React Native doesn't support specifying props to the main/root component (in
  26. * the JS/JSX source code). So create a wrapper React Component (class) around
  27. * features/app's App instead.
  28. *
  29. * @extends Component
  30. */
  31. class Root extends PureComponent<Props> {
  32. /**
  33. * Implements React's {@link Component#render()}.
  34. *
  35. * @inheritdoc
  36. * @returns {ReactElement}
  37. */
  38. render() {
  39. return (
  40. <App
  41. { ...this.props } />
  42. );
  43. }
  44. }
  45. // Register the main/root Component of JitsiMeetView.
  46. AppRegistry.registerComponent('App', () => Root);
  47. // Register the main/root Component of IncomingCallView.
  48. AppRegistry.registerComponent('IncomingCallApp', () => IncomingCallApp);