logo

How to enable -experimental- native rendering on Android

This how-to guide describes how to implement experimental native rendering using the THEOplayer Android SDK.

Prerequirements

In order to enable native rendering on Android, make sure you are at least using version 2.42.2 or higher.

Before you start, add the following transitive theoplayer dependency to the build.gradle file:

dependencies {
    // other dependencies..
    implementation 'com.google.android.exoplayer:exoplayer:2.6.1'
}

Code example

The snippet below configures the THEOplayer a source description that will render the media natively

private void playSourceWithExperimentalRendering(String src) {
    tpv.getPlayer().setSource(sourceDescription(
        typedSource(src)
            .setExperimentalRenderingEnabled(true)
            .build()
    ).build())
}

Note: Important reminder that this is an experimental feature.

Note: Experimental rendering can only be used for playback of DASH streams

github
Make sure to follow us on GitHub!
THEO-logo-white
twitter
facebook
linkedin
Copyright © 2020. All Rights Reserved.
Leuven
New York
San Francisco
Singapore
Barcelona