Integrated with KSYStreamer SDK,react-native-streamer is a live streaming framework supporting RTMP,Network Auto Adapt,Beauty Filter,Beauty Voice,Software/Hardware Encoder etc.
- Install
react-native-streamer
latest stable version.
yarn add react-native-streamer
- Add the following in
android/settings.gradle
.
include ':react-native-streamer'
project(':react-native-streamer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-streamer/android/app/')
- Update project dependencies in
android/app/build.gradle
.
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+"
compile project(':react-native-streamer')
}
- Add the package in
MainApplication.java
.
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ReactNativeStreamerPackage() // add this line
);
}
- Refresh Gradle project.
- Install
react-native-streamer
latest stable version.
yarn add react-native-streamer
-
In Xcode, in Project Navigator (left pane), right-click on the
Libraries
>Add files to [project name]
. Add./node_modules/react-native-navigation/ios/ReactNativeNavigation.xcodeproj
-
In Xcode, in Project Navigator (left pane), click on your project (top), then click on your target row (on the "project and targets list", which is on the left column of the right pane) and select the
Build Phases
tab (right pane). In theLink Binary With Libraries
section addlibReactNativeStreamer.a
-
In Xcode, in Project Navigator (left pane), click on your project (top), then click on your project row (on the "project and targets list") and select the
Build Settings
tab (right pane). In theHeader Search Paths
section add$(SRCROOT)/../node_modules/react-native-streamer/ios
. Make sure on the right to mark this new pathrecursive
-
Download KSYSDK in
release
-
In Xcode, in Project Navigator (left pane), click on
ReactNativeNavigation.xcodeproj
, then click on your project row (on the "project and targets list") and select theBuild Phases
tab (right pane). In theLink Binary With Libraries
section addGPUImage.framework
andlibksygpulive.framework
-
In Xcode, in Project Navigator (left pane), click on your project (top), then click on your target row (on the "project and targets list", which is on the left column of the right pane) and select the
Build Phases
tab (right pane). In theEmbed Frameworks
section addGPUImage.framework
andlibksygpulive.framework
-
Run you project