Examples in using the react-native-red5pro React Native component library.
You will need a Red5 Pro SDK License and a Red5 Pro Server in order to use this component.
Sign up for a free trial!
The following examples are deployed to an iPhone using the suggested running operations.
Additionally, a Red5 Pro Server has been deployed locally and is accessible at the IP address of 10.0.0.10 and the Red5 Pro Mobile SDK license is YOU-RLIC-ENSE-1234. You will ned to change both of these to where you Red5 Pro Server is deployed and your personal Red5 Pro Mobile SDK License, respectively.
Note: Because of React Native's debugger defaulting to
8081and the default unsecure websocket port of Red5 Pro being8081, you may need to re-define one or the other ports if developing locally.
You will need to install the required dependencies prior to running the examples. To do so, issue the following command in a terminal within this directory:
$ npm installYou can launch these examples onto your target device(s) doing the following:
$ cd ios
$ pod install- Download the latest Red5 Pro iOS SDK and add it to a directory you know where to find (such as
example/Red5ProVideoViewExample/Frameworks). - Open the
xcworkspacein Xcode - it is generate frompod install. - Click on the
Podsproject in left-side navigator. - Select the
R5VideoViewtarget listed. - Select
Build Settings. - In the
Searchfilter, enterFrameworks. - Under
Search Paths > Framework Search Paths, enter in the relative or absolute path to the directory containing the Red5 Pro SDK download (hint: it is easier to drag the directory and drop it on the callout). - Click on
Red5ProVideoViewExampleproject in navigator. - Click on
Red5ProVideoViewExampletarget listed. - Select
Build Settings. - In the
Searchfilter, enterFrameworks. - If not pointing to the SDK correctly, under
Search Paths > Framework Search Paths, enter in the relative or absolute path to the directory containing the Red5 Pro SDK download (e.g., Step #6). - Tether an iPhone to your computer.
- Make sure it is selected in Xcode as the target for the scheme build.
- Build and deploy the React Native app to the iPhone.
- Several terminal windows and alerts will pop up. Accept them and let them do their thing.
- Once the app launches, fill in the
host,licenseandstream namefields and test theSubscribeandPublishexamples.
Be sure you have a device tethered, then issue the following:
$ cd android- Download and unzip the Red5 Pro Android SDK.
- Create a
libsdirectory inexample/Red5ProVideoViewExample/android/app. - Drop the
red5streaming.jarfile in the libs directory created in Step #2. - Drag the
jniLibsfolder from the SDK intoexample/Red5ProVideoViewExample/android/app/src/main. - Open Android Studio.
- Select
File > New > Import Project. - In the file navigator, navigate to
example/Red5ProVideoViewExampleand select theandroiddirectory. - Click
Open. - Allow Gradle to Sync.
- Tether an Android device to your computer.
- Open a Terminal window and
cdintoexample/Red5ProVideoViewExample. - Issue the following command:
npx react-native run-android. - Once the app launches, fill in the
host,licenseandstream namefields and test theSubscribeandPublishexamples.
This project was bootstrapped with Create React Native App.

