---
title: "Offline Video DRM for Course Apps | Kinescope"
description: "Let students download lessons in your Android app and watch them offline. Kinescope’s SDK saves one quality with a Widevine offline licence; a copied file won’t play."
url: https://kinescope.com/solutions/offline-video-drm
---

# Offline video with DRM for your course app

Students download lessons in your Android app and watch them with no signal. The video stays encrypted with Widevine and plays only inside your app on the phone that downloaded it.

[Start for free](https://app.kinescope.io/user/create?lang=en)[Book a demo](https://calendly.com/derrenkinescope)

## How an offline download works

### The app gets an offline licence

Kinescope’s Widevine licence server issues an offline licence for the video, and the SDK keeps it on the phone together with the lesson.

### One quality, in the background

The SDK lists the video’s qualities and saves the one the student picks, such as 720p, instead of the whole adaptive ladder. A download service keeps going when the student leaves the screen and reports progress to your app.

### Plays offline, stays encrypted

Playback reads the saved segments, and Widevine on the phone decrypts them with the stored licence. A copied file has no licence and does not play.

## What works on each platform

Download for offline

Offline DRM

Android, Kotlin SDK

HLS and DASH, one chosen quality

Widevine offline licence

Flutter on Android

One chosen quality

Widevine offline licence

iOS, Swift SDK

Only videos without DRM

Not in the SDK yet: FairPlay keys are requested for streaming only

React Native

No offline API

—

Web browser

Protected video can’t be saved for offline playback

—

## Add offline downloads to your app

Code from the SDK documentation. Swap in your video IDs.

1.  ### Add the Android SDK

    The player, offline downloads and Widevine come in one dependency from Maven Central.

    build.gradle

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

2.  ### Start the download pipeline

    Call it once at app start; it also registers the background download service.

    Kotlin

    ```
    DownloadVideoOffline.initialize(context)
    ```

3.  ### Get the licence and save the video

    The SDK reads the Widevine data from the stream, requests the offline licence and downloads the segments with its `keySetId`.

    Kotlin

    ```
    drmHelper.attachToPlayer(exoPlayer, videoData) { data, pssh ->
      drmConfigurator.downloadOfflineLicense(
        context, data, pssh,
      ) { keySetId ->
        val request = DownloadRequest
          .Builder(contentId, manifestUri)
          .setMimeType(MimeTypes.APPLICATION_M3U8)
          .setKeySetId(keySetId)
          .build()
        DownloadVideoOffline.startDownload(context, request)
      }
    }
    ```

4.  ### Or do the same from Flutter

    On Android the Flutter plugin uses the native SDK: list qualities, download one, play it offline.

    Dart

    ```
    final downloads = KinescopeOfflineDownload.instance;
    final qualities = await downloads.listDownloadQualities('yourVideoId');
    final info = await downloads.downloadVideo(
      'yourVideoId',
      videoHeightPx: qualities.first.height,
    );

    KinescopeOfflinePlayer(contentId: info.contentId);
    ```


## Documentation

### Android

-   [Offline downloads and Widevine](https://github.com/kinescope/kotlin-kinescope-player/blob/main/docs/offline-downloads.md)
-   [Kotlin SDK on GitHub](https://github.com/kinescope/kotlin-kinescope-player)

### Flutter

-   [Android: offline and DRM](https://github.com/kinescope/flutter-kinescope-player/blob/main/doc/android-native.md)
-   [Flutter SDK on GitHub](https://github.com/kinescope/flutter-kinescope-player)

### iOS and DRM

-   [iOS downloads and FairPlay](https://github.com/kinescope/ios-kinescope-player/blob/master/DOCUMENTATION.md)
-   [DRM encryption docs](https://docs.kinescope.com/content-protection/drm-encryption/)

## DRM is included in the plan

Widevine and FairPlay come with every paid plan, and Kinescope runs the licence servers. Your app adds offline downloads with the SDK.

[Start for free](https://app.kinescope.io/user/create?lang=en)[DRM video hosting](https://kinescope.com/solutions/video-hosting-drm)

-   Paid plans from €10 a month
-   No per-licence fee
-   100 minutes of storage and 200 GB of traffic a month free

## FAQ

Can’t find the answer you need? Check out our [Help Center](https://docs.kinescope.com/).

Offline DRM needs a native app: the player saves the encrypted video on the device together with an offline licence from the DRM provider, and the device’s DRM module decrypts it without a connection. Kinescope does this on Android with Widevine through its Kotlin and Flutter SDKs, with the licence server run by Kinescope.

No. Browsers can play DRM-protected video but don’t let a web page save it for offline playback. Offline viewing of protected lessons needs a mobile app with the Kinescope SDK.

Not yet. The iOS SDK downloads HLS video and plays FairPlay-protected video online, but it requests FairPlay keys for streaming only, so protected lessons can’t be saved for offline viewing on iPhone today. For an iOS-heavy audience, [book a call with our team](https://calendly.com/derrenkinescope).

The SDK saves one quality, not every quality the video has. At 720p and about 3 Mbps, an hour of video is roughly 1.4 GB; the student or your app picks a lower quality to save space. Work out other sizes with the [bitrate calculator](https://kinescope.com/tools/video-bitrate-calculator).
