我正在尝试在React-native应用程序中实现相机 . 该应用程序的目标是录制视频并上传,然后从手机中删除它 . 我设法使用react-native-camera录制视频 .

React-native-camera返回录制视频的路径 . 我尝试将此路径放在react-native-video中 . 但这会使应用程序崩溃 . 我是否必须使用react-native-fs之类的东西加载视频以反应原生视频或我该怎么做?

这会导致应用程序崩溃,即使this.props.file.path具有在Android上看起来像这样的录制视频的路径:

文件:///storage/emulated/0/Pictures/Vid_xxxxxxx_xxxxx.mp4

<Video source={{uri : this.props.file.path}}
                   style={styles.fullScreen}
                   rate={1.0}
                   volume={1.0}
                   muted={false}
                   resizeMode={"cover"}
                   onEnd={() => { console.log('Done!') }}
                   repeat={true} />
                   <StatusBar navigator={this.props.navigator} next={this.go.bind(this)}/>

如果我将视频保存到cameraRoll它就像预期的那样 .