के साथ एक वीडियो रिकॉर्ड करने के लिए कैसे करें, इसलिए मैं एक परियोजना पर काम कर रहा था जिसने https://github.com/lwansbrough/react-native-camera से प्रतिक्रिया-मूल वीडियो कैमरा का उपयोग किया था और यह काम कर रहा था। घटक वीडियो लेगा और डेटा एक्सकोड के कंसोल में प्रिंट करेगा। दुर्भाग्य से मैंने अपने कंप्यूटर पर इस फ़ाइल और कुछ अन्य लोगों को खो दिया और ऐप को स्क्रैच से वापस शुरू कर रहा हूं। मैं वीडियो रिकॉर्डिंग क्षमताओं के साथ कैमरे को फिर से बनाने का प्रयास कर रहा हूं लेकिन इसे काम पर नहीं ला सकता। क्या कोई जानता है कि मैं क्या गलत कर रहा हूं क्योंकि मुझे इसे समझने की प्रतीत नहीं होती है। जब मैं कैप्चर मोड को कैमरे में बदलता हूं तो डेटा प्रिंट हो जाएगा लेकिन वीडियो के लिए कुछ भी नहीं होगा।प्रतिक्रिया-देशी-कैमरा
let startVideo = false;
class VideoCamera extends Component {
constructor() {
super()
this.state = {
captureMode: Camera.constants.CaptureMode.video,
}
}
render() {
return (
<Camera
captureMode={this.state.captureMode}
ref="camera"
style={styles.container}
>
<TouchableHighlight
onPressIn={this._startRecord.bind(this)}
onPressOut={this._endVideo.bind(this)}
>
<Icon
name={'video-camera'}
size={40}
style={styles.recordButton}
/>
</TouchableHighlight>
</Camera>
)
}
_startRecord() {
startVideo = setTimeout(this._recordVideo.bind(this), 50)
}
_recordVideo() {
this.refs.camera.capture({})
.then((data) => console.log(data))
.catch((err) => console.log(err))
}
_endVideo() {
this.refs.camera.stopCapture()
}
}
http://stackoverflow.com/questions/37960958/how-do-i-access-the-react-native-cameras-video-capabilities – Tarun