Aucune description

AgoraView.native.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const tslib_1 = require("tslib");
  4. const react_1 = tslib_1.__importDefault(require("react"));
  5. const react_native_1 = require("react-native");
  6. /**
  7. * Import RCTAgoraView from native binding.
  8. *
  9. * This @object is used to bridge native layer between react layer.
  10. */
  11. const RCTAgoraView = react_native_1.requireNativeComponent("RCTAgoraView");
  12. /**
  13. * AgoraView is the render layer for rendering video stream
  14. *
  15. * This class is used to rendering native sdk stream
  16. *
  17. * @props {@link AgoraViewProps}
  18. */
  19. class AgoraView extends react_1.default.Component {
  20. /**
  21. * render
  22. *
  23. * It would render view for VideoStream
  24. */
  25. render() {
  26. return (react_1.default.createElement(RCTAgoraView, Object.assign({}, this.getHTMLProps())));
  27. }
  28. /**
  29. * getHTMLProps
  30. *
  31. * get agora view props
  32. */
  33. getHTMLProps() {
  34. let htmlProps = {};
  35. for (let key in this.props) {
  36. htmlProps[key] = this.props[key];
  37. }
  38. return htmlProps;
  39. }
  40. }
  41. exports.default = AgoraView;
  42. //# sourceMappingURL=AgoraView.native.js.map