- Install NodeJS on you machine. Download Link
- Clone kaltura-player-rn in your machine or download the source code.
- We have Example app which contains various test medias and you can 'test your media' as well in this app.
- We are using YARN package manager in the document. Feel free to use your favourite.
- Install XCode and Android Studio (Version Dolphin) for the development.
- About Kaltura Player
- Source Code
- RN bridge build environment
- Example Test App build environment
- Build RN bridge with Example app in your local machine
- Test your media
Kaltura Player is based on Google ExoPlayer in Android and AVPlayer in iOS. Along with the content playback, it supports Advertisements playback, VR/360 media playback, Chromecast(Not Supported Currently), Offline Media Playback(Not Supported Currently) and reknowned Analytics plugin (NPAW Youbora). If you are a Kaltura BE customer then you can use our Providers plugins which helps in getting the media details from Kaltura BE.
-
Kaltura Player Android contains following Native SDK
-
Kaltura Player iOS contains following Native SDK
Kaltura Player RN SDK gives the media playback, VR/360 media playback and Offline media playback(Not Supported Currently). If you want to use other plugins like IMA, Youbora, Googlecast then you need to add it as dependency in your FE app's build.gradle
or pod
file for Android and iOS. Latest versions are there in Maven or Cocoapods and mentioned on the Github repos as well.
It contains the native source code for iOS and Android platforms. We are using our Native SDKs Kaltura Player Android and Kaltura Player iOS for this react native SDK.
It contains the react native bridge code which constains the APIs which as a React Native FE apps will eventually be calling. It communicates to the relevant platform to call the underlying Native Player (iOS and Android).
It contains a test app which contains a Test JSON. Currently this JSON has our in house or open media streams. You can pass your media stream URLs or IDs in this JSON and it will be visible in the mobile screen.
- Open the project folder in your favourite IDE. We are giving example here with Visual Studio Code IDE.
- Stand on the root directory and call
yarn install
. It will fetch all the relevant dependencies in your local machine innode_modules
root folder.
- Navigate to
example
folder and callyarn install
. It will fetch all the relevant dependencies in your local machine undernode_modules
example folder. - Source code for the test app is in
./src
folder.
-
- Open Android Studio and click on File -> Open then choose
./example/android
folder. - Let it build. After some time, on left side pane, you should see project files. If there are any build errors, please try to fix it. These build errors could be related to the Android Studio and Gradle version you are using. We suggest to use Android Studio (Dolphin or later version) and Gradle version 7+.
- Open Android Studio and click on File -> Open then choose
-
- Navigate to
example -> ios
folder and run the following,
cd example/ios pod install
If you are using M1 mac then do the following,
cd example sudo arch -x86_64 gem install ffi cd ios arch -x86_64 pod install
- Now you can open the workspace in XCode and can build the project.
- Navigate to
In case if you are want to develop Kaltura Player RN SDK then you can setup locally in 'example' app.
-
Remove
"kaltura-player-rn": "x.x.x",
from thekaltura-player-rn/example/package.json
config file so you will be able modify locally the library code -
cd root_folder OR path to `kaltura-player-rn` in your system yarn link cd root_folder/example OR path to `example` app yarn link "kaltura-player-rn"
There is a chance that linking will not work the try adding
kaltura-player-rn
manually using.cd root_folder/example OR path to `example` app yarn add path to `kaltura-player-rn` in your system
-
-
If you want to change the Native Android code then inorder to show
kaltura-player-rn
in Android Studio. You need to open project levelsettings.gradle
in Android Studio, add the following.include ':kaltura-player-rn' project(':kaltura-player-rn').projectDir = new File(rootProject.projectDir, '../../android')
If you don't use the local
kaltura-player-rn
and instead you use package fromnode_modules
as given below then your changes will not appear in your source control. If you want to raise a pull request then it will be difficult because your local changes are limited to thenode_modules
.include ':kaltura-player-rn' project(':kaltura-player-rn').projectDir = new File(rootProject.projectDir, '../node_modules/kaltura-player-rn/android')
-
update the app buil.gardle to consulme the kaltura player locally ->
implementation project(':kaltura-player-rn')
-
Please make sure that Android Studio Java version is on Java-11. You can check in Preference -> Build,Execution,Deployment -> Build Tools -> Gradle. Then choose Gradle SDK. Choose Java-11 from the dropdown if not selected then press Apply and OK.. In case if Java-11 is not installed in your machine, please try installing it from here.
-
-
- Open 'Podfile' in 'example -> ios'.
- Uncomment
pod 'RNKalturaPlayer', :path => '../..'
from this file. - Run
pod update
.