react-native-webrtc-ar-session
Capturing ARKit scene (Like react-native-arkit
) into react-native-webrtc
video stream.
Installation
- Required use the react-native-webrtc patch. (You can use
patch-package
) - Add dependency with
yarn add react-native-webrtc-ar-session
- You may need to run
react-native link react-native-webrtc-ar-session
or autolinking.
Usage
After using this react-native-webrtc patch, we need to set ar: true
in video
property of mediaDevices.getUserMedia(...)
. (See the example)
// Check the device is support AR World Tracking // Start capturing <ARKit /> view into WebRTC video stream// You can call it after WebRTC and ARKit view is ready
react-native-arkit
Use another ARSCNView instead of You can have native ARSCNView setup without react-native-arkit
:
// Add to your header file ;