badge   badge   badge Android player is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

Project description

Easily integrate a video player for videos from in your Android application.

Getting started



In your module build.gradle, add the following code in dependencies:

dependencies {
    implementation 'video.api:android-player:1.0.0'


In your AndroidManifest.xml, add the following code in <manifest>:

<uses-permission android:name="android.permission.INTERNET" />

Retrieve your video Id

At this point, you must have uploaded a least one video to your account. If you haven’t see how to upload a video. You’ll need a video Id to use this component and play a video from To get yours, follow these steps:

  1. Log into your account or create one here.
  2. Copy your API key (sandbox or production if you are subscribed to one of our plan).
  3. Go to the official documentation.
  4. Log into your account in the top right corner. If it’s already done, be sure it’s the account you want to use.
  5. Go to API Reference -> Videos -> List all videos
  6. On the right, be sure the “Authentication” section contains the API key you want to use.
  7. Generate your upload token by clicking the “Try It!” button in the right section
  8. Copy the “videoId” value of one of elements of the response in the right section.

Alternatively, you can find your video Id in the video details of your dashboard.

Code sample

  1. Add a StyledPlayerView to your Activity/Fragment layout:

    app:show_subtitle_button="true" />

You can customize the StyledPlayerView according to your application design.

  1. Implements the Player.Listener interface:

val playerListener = object : ApiVideoPlayer.Listener {
    override fun onError(error: Exception) {
        Log.e(TAG, "An error happened", error)
    override fun onReady() {
        Log.I(TAG, "Player is ready")
  1. Instantiate the ApiVideoPlayer in an your Activity/Fragment:

val playerView = findViewById<StyledPlayerView>(

val player = ApiVideoPlayer(

Sample application

A demo application demonstrates how to use player. See /example folder.

On the first run, you will have to set your video Id:

  1. Click on the FloatingActionButton -> Settings
  2. Replace “YOUR_VIDEO_ID” by your video Id



We are using external library



If you have any questions, ask us here: Or use [Issues].


View Github