react-native-beautiful-video-recorder 视频记录器组件
来源:互联网 发布:sql join用法 编辑:程序博客网 时间:2024/05/21 14:06
视频记录器组件,扩展自react-native-camera。适配iOS和Android。
https://github.com/phuochau/react-native-beautiful-video-recorder
特性:
- 在iOS和Android上记录视频
- 在iOS上将MOV转换为MP4。因此Android&iOS都会返回MP4格式。
安装
npm i --save react-native-beautiful-video-recorderreact-native link
配置
iOS
使用iOS 10或者更高的版本,你需要将"Privacy - Camera Usage Description"键添加到项目的info.plist。这将会在'your_project/ios/your_project/Info.plist'中找到。添加下列代码:
<key>NSCameraUsageDescription</key><string>Your message to user when the camera is accessed for the first time</string><!-- Include this only if you are planning to use the microphone for video recording --><key>NSMicrophoneUsageDescription</key><string>Your message to user when the microsphone is accessed for the first time</string>
Android
在Android Manifest中添加权限
<uses-permission android:name="android.permission.RECORD_AUDIO"/><uses-permission android:name="android.permission.RECORD_VIDEO"/><uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
使用方法
import VideoRecorder from 'react-native-beautiful-video-recorder';....start = () => {this.videoRecorder.open((data) => {console.log('captured data', data);});}render() {return (<View>...... <TouchableOpacity onPress={this.start}> <Text>Start</Text> </TouchableOpacity> <VideoRecorder ref={(ref) => { this.videoRecorder = ref; }} compressQuality={'medium'} /> // quality will be 'low', 'medium' or 'high'</View>);}
0 0
- react-native-beautiful-video-recorder 视频记录器组件
- react-native播放视频组件 react-native-video的用法
- RN开源播放器Video组件(react-native-video)
- React Native开源播放器Video组件(react-native-video)
- RN开源组件react-native-video的用法
- react-native-video error
- react native video
- Performance Recorder性能记录器
- React Native 组件生命周期
- react-native 自定义组件
- React native Image组件
- react native 组件生命周期
- react-native 组件demo
- react-native组件笔记
- React Native--组件Component
- React Native基础组件
- [React-Native]常用组件
- React Native组件生命周期
- mysql在linux下的安装
- String ,StringBuffer ,StringBuild 区别
- 脏读、幻读、不可重复读 小结
- 每天一个Linux命令-sed
- DropDownList获取value与text
- react-native-beautiful-video-recorder 视频记录器组件
- Different type of processor
- Docker多步构建更小的Java镜像
- ab参数详解
- php Fatal error: Maximum execution time of 30 seconds exceeded解决方案
- ASP.NET CORE基础教程(二)-中间件
- 【量化课堂】海龟策略
- if(!(Equals和==)&& !内存分配问题 )
- Activity启动后EditText是否自动弹出输入法虚拟键盘(软键盘)的问题