---
title: "Android video player SDK with offline DRM | Kinescope"
description: "Kotlin SDK for Android: an ExoPlayer-based player with HLS, DASH, live and Widevine DRM, offline downloads, a vertical Shorts feed and Chromecast in one dependency."
url: https://kinescope.com/developers/android-video-player-sdk
---

# Android video player SDK with offline DRM and Shorts

One Kotlin dependency gives your Android app a Kinescope player, a vertical Shorts feed and offline downloads with Widevine DRM. The player plays HLS, DASH and live streams and supports picture-in-picture, Chromecast and Android TV.

[Start for free](https://app.kinescope.io/user/create?lang=en)[View on GitHub](https://github.com/kinescope/kotlin-kinescope-player)

## Quick start

Install io.kinescope:kotlin-kinescope-player and play your first video. Commands and code are from the package README.

1.  ### Add the dependency

    The SDK is published on Maven Central. New projects should not use JitPack.

    build.gradle

    ```
    implementation 'io.kinescope:kotlin-kinescope-player:0.1.20'
    ```

2.  ### Add the player view

    Place `KinescopePlayerView` in your layout.

    layout.xml

    ```
    <io.kinescope.sdk.view.KinescopePlayerView
        android:id="@+id/player_view"
        android:layout_width="match_parent"
        android:layout_height="250dp" />
    ```

3.  ### Create the player and load a video

    Create `KinescopeVideoPlayer`, attach it to the view and load a video by ID. With `autoplay` on, playback starts after loading.

    kotlin

    ```
    val options = KinescopePlayerOptions().apply {
        accentColor = "#6161FC"
        syncLegacyChromeFlags()
    }
    val kinescopePlayer = KinescopeVideoPlayer(context, options)

    playerView.setPlayer(kinescopePlayer)
    playerView.applyTemplateOptions()

    kinescopePlayer.loadVideo(videoId, onSuccess = { video ->
        if (!kinescopePlayer.kinescopePlayerOptions.autoplay) {
            kinescopePlayer.play()
        }
    }, onFailed = { it?.printStackTrace() })
    ```


## What is in the Android SDK

### Player

HLS, DASH and live streams with a ready UI: seek bar, chapters, fullscreen, picture-in-picture, pinch-to-zoom and a settings menu for quality, speed, audio and subtitles.

### Widevine DRM

Plays DRM-protected video. Pass `drmAuthToken` when your authorization backend approves each play.

### Offline downloads

`DownloadVideoOffline` and `VideoDownloadService` save HLS and DASH videos with Widevine DRM for playback without a connection.

### Shorts feed

A vertical feed in the TikTok style with a player pool and adaptive preload and cache. Plug in your own feed API through `KinescopeVideoProvider`.

### Chromecast and Android TV

Cast to a TV through the Kinescope receiver, with position sync on connect and disconnect. Android TV and other Google Cast receivers work as targets.

### Dashboard API helper

`KinescopeApiHelper` reads the video catalog and manages player templates through `api.kinescope.io`.

## ExoPlayer on its own vs the Kinescope SDK

The SDK runs on ExoPlayer. Here is what you would otherwise build around it yourself.

|  | ExoPlayer on its own | Kinescope Android SDK |
| --- | --- | --- |
| HLS, DASH and live playback | ✓ built in | ✓ ExoPlayer inside |
| Hosting, transcoding and CDN | ✗ your own backend | ✓ Kinescope platform |
| Widevine DRM | ✓ playback; license server is yours | ✓ licenses from Kinescope, drmAuthToken for your backend |
| Player UI: settings, chapters, PiP, cast | ✗ basic PlayerView, the rest you build | ✓ ready, with templates from the dashboard |
| Offline downloads with DRM | ✓ DownloadManager; offline licenses are yours | ✓ DownloadVideoOffline and VideoDownloadService |
| Vertical Shorts feed | ✗ build it yourself | ✓ player pool, preload and cache |
| Viewing analytics | ✗ your own pipeline | ✓ Kinescope analytics |

ExoPlayer on its own

HLS, DASH and live playback

✓ built in

Hosting, transcoding and CDN

✗ your own backend

Widevine DRM

✓ playback; license server is yours

Player UI: settings, chapters, PiP, cast

✗ basic PlayerView, the rest you build

Offline downloads with DRM

✓ DownloadManager; offline licenses are yours

Vertical Shorts feed

✗ build it yourself

Viewing analytics

✗ your own pipeline

Kinescope Android SDK

HLS, DASH and live playback

✓ ExoPlayer inside

Hosting, transcoding and CDN

✓ Kinescope platform

Widevine DRM

✓ licenses from Kinescope, drmAuthToken for your backend

Player UI: settings, chapters, PiP, cast

✓ ready, with templates from the dashboard

Offline downloads with DRM

✓ DownloadVideoOffline and VideoDownloadService

Vertical Shorts feed

✓ player pool, preload and cache

Viewing analytics

✓ Kinescope analytics

## The platform behind the SDK

### Upload and transcoding

Upload through the dashboard, the API or resumable TUS upload. Every video is encoded into adaptive renditions up to 4K. [Video hosting](https://kinescope.com/products/video-hosting)

### Own CDN

Kinescope delivers the streams your app plays from its own CDN, with points of presence in Latin America, the United States, Europe and the CIS. [Video CDN](https://kinescope.com/products/content-delivery-network)

### DRM on the Super plan

Widevine and FairPlay licenses are included on the Super plan. Your backend can approve each play. [DRM video hosting](https://kinescope.com/solutions/video-hosting-drm)

### Live streams

Send RTMP or sRTMP from OBS, vMix or a hardware encoder and keep an automatic recording. The SDK players show the stream live. [Live streaming](https://kinescope.com/products/streaming)

### Analytics

Views, watch depth and drop-off points for every video. Pass your user ID from the app to see data per viewer. [Video analytics](https://kinescope.com/products/video-analytics)

### Pay as you go

Start on the free plan with 100 minutes of video and 200 GB of traffic a month. Paid usage: storage and delivery from €0.03/GB, processing €0.01/min. [Pricing](https://kinescope.com/pricing)

## Documentation

Every guide for this SDK in its repository, on GitHub.

### Player

-   [Player options](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/player-options.md)
-   [Customization](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/customization.md)
-   [Player chrome](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/player-chrome.md)
-   [Settings menu](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/settings-menu.md)
-   [Subtitles](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/subtitles-and-settings.md)

### Playback modes

-   [Live](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/live.md)
-   [Local playback](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/local-playback.md)
-   [Fullscreen](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/fullscreen.md)
-   [Picture-in-picture](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/picture-in-picture.md)

### Casting

-   [Chromecast](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/chromecast.md)
-   [Android TV](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/android-tv.md)

### Offline

-   [HLS and DASH downloads with Widevine](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/offline-downloads.md)
-   [Offline DRM for course apps](https://kinescope.com/solutions/offline-video-drm)

### Shorts feed

-   [Quick start](https://github.com/kinescope/kotlin-kinescope-player/blob/main/kotlin-kinescope-shorts/QUICK_START.md)
-   [Library usage guide](https://github.com/kinescope/kotlin-kinescope-player/blob/main/kotlin-kinescope-shorts/LIBRARY_USAGE_GUIDE.md)
-   [Feed API](https://github.com/kinescope/kotlin-kinescope-player/blob/main/kotlin-kinescope-shorts/API_USAGE_GUIDE.md)

### Analytics and API

-   [Analytics](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/analytics.md)
-   [Player templates API](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/dashboard-api.md)
-   [Demo app](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/demo-app.md)

## FAQ

Can’t find the answer you need? Check out our [All developer tools](https://kinescope.com/developers).

Yes. The player runs on ExoPlayer with a native Kinescope UI on top, so you get ExoPlayer playback without building the UI, DRM and download pipeline yourself.

On Maven Central under io.kinescope. JitPack is no longer supported for new projects; existing JitPack pins may keep working.

Yes. The SDK downloads HLS and DASH videos with Widevine DRM through Android DownloadManager and plays them without a connection.

Yes. The repository has a demo APK and an app module to try the player, templates, Shorts, online and offline DRM and casting before you integrate.
