Skip to content

Instantly share code, notes, and snippets.

@phpmaps
Created March 4, 2023 17:23
Show Gist options
  • Save phpmaps/09b55503d1c42a6650576018e8660b30 to your computer and use it in GitHub Desktop.
Save phpmaps/09b55503d1c42a6650576018e8660b30 to your computer and use it in GitHub Desktop.
Camera react-native-webview
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React from 'react';
import { WebView } from 'react-native-webview';
//https://simpl.info/getusermedia/sources/
//https://demo-onboarding.incodesmile.com/incode_internal310/flow/64023c3cabf419406093dab2?region=ALL
//https://davidwalsh.name/demo/camera.php
//https://incodetech-govcheck.s3.us-west-2.amazonaws.com/incode-camera-iframe.html
function App(): JSX.Element {
return (
<WebView
useWebKit
originWhitelist={['*']}
allowsInlineMediaPlayback
bounces={true}
mediaPlaybackRequiresUserAction={false}
mediaCapturePermissionGrantType="grantIfSameHostElsePrompt"
source={{
uri: 'https://incodetech-govcheck.s3.us-west-2.amazonaws.com/incode-camera-iframe.html'
}}
startInLoadingState
scalesPageToFit
javaScriptEnabledAndroid={true}
javaScriptEnabled={true}
style={{ flex: 1 }}
/>
)
}
export default App;
@phpmaps
Copy link
Author

phpmaps commented Mar 4, 2023

This project was created using the react-native-community CLI, @react-native-community/cli.

npx react-native init camera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment