zego-express-engine-reactnative
Version:
React Native Zego Express Video for Android & iOS
26 lines (25 loc) • 837 B
JavaScript
//@ts-expect-error
import React, { Component } from 'react';
//@ts-expect-error
import { requireNativeComponent, Platform } from 'react-native';
const ZegoView = requireNativeComponent('RCTZegoView');
const ZegoSurfaceViewManager = Platform.select({
ios: ZegoView,
android: requireNativeComponent('RCTZegoSurfaceView'), // * android.view.SurfaceView
});
const ZegoTextureViewManager = Platform.select({
ios: ZegoView,
android: requireNativeComponent('RCTZegoTextureView'), // * android.view.TextureView
});
export class ZegoSurfaceView extends Component {
render() {
//@ts-expect-error
return <ZegoSurfaceViewManager {...this.props}/>;
}
}
export class ZegoTextureView extends Component {
render() {
//@ts-expect-error
return <ZegoTextureViewManager {...this.props}/>;
}
}