설명 없음

AgoraView.native.js 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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("RCTAgoraVideoView");
  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. * @descrption AgoraViewProps has four properties.
  20. * @property number: mode, this property will setup video render mode. there is two avaliable mode {hidden: 1, fit: 2}, you could see more details [https://docs.agora.io/en/Interactive%20Broadcast/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#ac08882c4d0ec47b329900df169493673](#here)
  21. * @property boolean: showLocalVideo, this property will render local video, NOTICE: IF YOU SET showLocalVideo YOU CANNOT SET remoteUid
  22. * @property number: remoteUid, this property will render video with remote uid, NOTICE: IF YOU SET remoteUid YOU CANNOT SET showLocalVideo
  23. * @property boolean: zOrderMediaOverlay, this property will working for android side and it likes zIndex behaviour on web side.
  24. */
  25. class AgoraView extends react_1.default.Component {
  26. /**
  27. * render
  28. *
  29. * It would render view for VideoStream
  30. */
  31. render() {
  32. return (react_1.default.createElement(RCTAgoraView, Object.assign({}, this.getHTMLProps())));
  33. }
  34. /**
  35. * getHTMLProps
  36. *
  37. * get agora view props
  38. */
  39. getHTMLProps() {
  40. let htmlProps = {};
  41. for (let key in this.props) {
  42. htmlProps[key] = this.props[key];
  43. }
  44. return htmlProps;
  45. }
  46. }
  47. exports.default = AgoraView;
  48. //# sourceMappingURL=AgoraView.native.js.map