Integration with Exoplayer (Android)

The Teltoo ExoPlayer library provides a way to create instances of MediaSource which can be directly used to call the prepare method of the ExoPlayer classes.

So to activate Teltoo, use the TeltooFactory class to create MediaSource instances instead of HlsMediaSource , DashMediaSource or SsMediaSource .

Teltoo Exoplayer library runs on the same process the application does. There are no other system processes launched by Teltoo SDK. Therefore, Teltoo will remain active, connected and seeding content as long as the player is playing the video stream. In other words Teltoo lifecycle is tied to the MediaSource object.

Follow the steps below to complete the integration:

1. Add the Teltoo Android repository and SDK dependency to the project build.gradle file, ie:

repositories {
maven { url "" }

dependencies {
implementation 'com.teltoo:exoplayer:+'

2. Set the Teltoo ApiKey as a meta-data in the application manifest (AndroidManifest.xml):


3. Set up the player:

Create a TeltooExoplayer Factory:

TeltooExoplayer.Factory teltooFactory = new

Create the MediaSource:

MediaSource teltooSource =

Prepare the ExoPlayer instance:


Optionally add a listener to receive Teltoo status information:

teltooFactory.addListener(new Teltoo.EventListener() {
       public void onError(String description) {
           Log.e (TAG, "TELTOO: error: "+description);

       public void onState(boolean connected) {
           Log.d (TAG, "TELTOO: connected: "+connected);

       public void onMessage(String message) {
           Log.d (TAG, "TELTOO: message: "+message);

       public void onStats(int connectedPeers, int totalBytesReceived, int p2pBytesReceived, int cacheBytes, int requestWithoutTeltoo) {
           Log.d (TAG, "TELTOO: stats: peers:"+connectedPeers+" p2p bytes:"+p2pBytesReceived);

Teltoo Android SDK is built using Android NDK, and it is compatible with all Android architectures. It is possible to create different application APK files for every architecture in order to reduce the application size. Check the link below or contact us for further information.

Copied to Clipboard