react-native-plstream
v1.0.16
Published
Qiniu PLStreamingKit for react-native
Downloads
3
Maintainers
Readme
@anren/react-native-plstream
安装
npm install react-native-plstream
react-native link react-native-plstream
rnpm已经集成进react-native-cli,建议使用 react-native link
for ios
ios需要添加添加相应库的支持,步骤如下:
- 打开xcode工程
- Build Phases-> Link Binary With Libraries ->点加号
- 依次添加 libiconv、libresolv
for android
AndroidManifest.xml中添加以下permission及feature
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
更改MainApplication
//将import anren.reactplstreamingkit.PLStreamingPackage;
//替换为import com.anrenmind.plstream.PLStreamingPackage;
更改settings.gradle
//添加以下代码:
include ':@anren/react-native-plstream'
project(':@anren/react-native-plstream').projectDir = new File(rootProject.projectDir, '../node_modules/@anren/react-native-plstream/android')
使用说明
参见sample
####注意当前版本为流程测试版,还有很多bug待修复