Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.props.nativeRef_EXPERIMENTAL(nativeRef);
}
this.nativeRef = nativeRef;
};
_onSurfaceCreate = ({ nativeEvent: { exglCtxId } }: SurfaceCreateEvent) => {
const gl = getGl(exglCtxId);
this.exglCtxId = exglCtxId;
if (this.props.onContextCreate) {
this.props.onContextCreate(gl);
}
};
static NativeView = requireNativeViewManager('ExponentGLView', GLView);
startARSessionAsync() {
return ExponentGLViewManager.startARSessionAsync(findNodeHandle(this.nativeRef));
}
async createCameraTextureAsync(cameraRef: React.Node) {
const { exglCtxId } = this;
if (!exglCtxId) {
throw new Error('GLView\'s surface is not created yet!');
}
const cameraTag = findNodeHandle(cameraRef);
const { exglObjId } = await ExponentGLObjectManager.createCameraTextureAsync(
exglCtxId,
cameraTag
return newProps;
}
_convertProp(value: *, key: string): * {
if (typeof value === 'string' && Camera.ConversionTables[key]) {
return Camera.ConversionTables[key][value];
}
return value;
}
}
export const Constants = Camera.Constants;
const ExponentCamera = requireNativeViewManager('ExponentCamera', Camera);
testDeviceID={this.props.testDeviceID}
onSizeChange={this._handleSizeChange}
onAdViewDidReceiveAd={this.props.onAdViewDidReceiveAd}
onDidFailToReceiveAdWithError={this._handleDidFailToReceiveAdWithError}
onAdViewWillPresentScreen={this.props.onAdViewWillPresentScreen}
onAdViewWillDismissScreen={this.props.onAdViewWillDismissScreen}
onAdViewDidDismissScreen={this.props.onAdViewDidDismissScreen}
onAdViewWillLeaveApplication={this.props.onAdViewWillLeaveApplication}
onAdmobDispatchAppEvent={this.props.onAdMobDispatchAppEvent}
/>
);
}
}
const ExpoBannerView = requireNativeViewManager('ExpoAdsPublisherBannerView', PublisherBanner);
}
return value;
}
}
function flipCameraStyle(shouldFlip) {
if (shouldFlip) {
return { transform: 'rotateY(180deg)' };
}
return { transform: 'none' };
}
let ExponentCamera = null;
if (Platform.OS !== 'web') {
ExponentCamera = requireNativeViewManager('ExponentCamera', Camera);
}
export const Constants = Camera.Constants;
bannerSize={this.props.bannerSize}
testDeviceID={this.props.testDeviceID}
onSizeChange={this._handleSizeChange}
onAdViewDidReceiveAd={this.props.onAdViewDidReceiveAd}
onDidFailToReceiveAdWithError={this._handleDidFailToReceiveAdWithError}
onAdViewWillPresentScreen={this.props.onAdViewWillPresentScreen}
onAdViewWillDismissScreen={this.props.onAdViewWillDismissScreen}
onAdViewDidDismissScreen={this.props.onAdViewDidDismissScreen}
onAdViewWillLeaveApplication={this.props.onAdViewWillLeaveApplication}
/>
);
}
}
const ExpoBannerView = requireNativeViewManager('ExpoAdsAdMobBannerView', AdMobBanner);
convertNativeProps(props: Props) {
const newProps = mapValues(props, this.convertProp);
return newProps;
}
convertProp(value: *, key: string): * {
if (typeof value === 'string' && BarCodeScanner.ConversionTables[key]) {
return BarCodeScanner.ConversionTables[key][value];
}
return value;
}
}
export const Constants = BarCodeScanner.Constants;
const ExpoBarCodeScannerView = requireNativeViewManager('ExpoBarCodeScannerView', BarCodeScanner);