Low level API for SRT library on Android. SRT is an open source transport technology that optimizes streaming performance across unpredictable networks. More information on https://github.com/Haivision/srt.
Get SRT Wrapper lastest artifacts on jitpack.io
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.ThibaultBee:SRTWrapper:0.8.0'
}
To test Android SR Wrapper, you will need 2 Android devices: one client and one server. On the server side, configure listening IP to "0.0.0.0" or to server ethernet IP. On the client side, configure connecting IP to server IP. The port must be the same value for both.
In examples folder. Examples are the SRT Android Wrapper counterpart of SRT examples folder. You will find both client and server examples.
In chat folder. Chat is an SRT utility to send and receive messages. It provides both a client and a server.
As Android SRT Wrapper is a wrapper (obvioulsy) for API documentation refers to SRT API documentation. You must create a Srt object before calling any other API. It will load SRT, ssl and crypto libraries.
You need to add the INTERNET permission in your AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
To use, sendFile and recvFile, you might also add READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
For Android > 6.0, you have to request permissions at runtime.
As it downloads and builds SRT, OpenSSL (ssl and crypto) libraries, first compilation will take a while. Android SRT Wrapper is designed to build on a Linux platform. As OpenSSL is really tricky to cross-compile on Windows, you can't build on Windows.