Important
This repository is now archived.
All membrane-webrtc-android
functionality is now available as part of android-client-sdk
The repository consists of 2 components:
MembraneRTC
- Standalone Membrane WebRTC client fully compatible withMembrane RTC Engine
bases on a web version responsible for exchanging media events and receiving media streams which then can be presented to the usersapp
- Demo application utilizingMembraneRTC
client
The main goal of the client was to be as similar to web version as possible. Just like with web client, the native mobile client is pretty raw. It is as low level as possible without exposing any of WebRTC details. It is user's responsibility to keep track of all peers in the room and their corresponding tracks. The client's responsibility is just to notify the user about all the changes regarding the underlying session with the backend server.
What user needs to do is just to provide config necessary for client connection, create local tracks (audio, video or screencast)
start the client and listen for any changes via MembraneRTCListener
interface.
The demo application consists of 2 activities:
MainActivity.kt
- a room joining screen with 2 inputs for room's name, and participant's display name, and a single join button that when pressed will start the the room activityRoomActivity.kt
- the proper room's activity with participant's controls and participants' video feeds
The user has the following control buttons at hand:
- microphone mute/unmute toggle
- camera video enable/disable toggle
- leave call button
- front/back camera switch
- screencast toggle
API documentation is available here
The only required constant is the media server's URL that can be found at the top of MainActivity.kt
.
Add jitpack repo to your build.gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add the dependency:
dependencies {
implementation 'com.github.membraneframework:membrane-webrtc-android:5.0.0'
}
- Run
./scripts/init.sh
in the main directory to install ktlint and release-it and set up git hooks - Set
VIDEOROOM_URL
in~/.gradle/gradle.properties
to your dev backend. - Run
./gradlew :MembraneRTC:testDebugUnitTest
to run unit tests. - Run
release-it
to release. Follow the prompts, it should add a commit and a git tag and jitpack should pick it up automatically and put the new version in the jitpack repo.
This project is highly inspired by the LiveKit project and their implementation of the Android SDK and reuses a lot of their implemented solutions (mainly dealing with WebRTC SDK while the signalling got completely replaced with an internal solution).
This project has been built and is maintained thanks to the support from dscout and Software Mansion.