[object Object] Icon

Learn how to create, start, manage and modify Encodings

[object Object] Icon

Learn how to create, start, manage and modify Players

[object Object] Icon

Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Tue Dec 11 2018

How to setup Bitmovin Android SDK with DRM Today content

OverviewLink Icon

Nearly every DRM license provider does have customized DRM workflow in place, which is different to the default approach, especially when it comes to Fairplay DRM. In order to support those custom requirements, each Bitmovin native SDK does support the same customizable callbacks as the HTML5 player, so you can adjust the DRM requests to the needs of your DRM provider accordingly.

If you are not yet familiar with the Bitmovin SDK, please see the related blog post and have a look at the demo applications available in our iOS sample applications or Android sample applications repository.

Android SDK using DRMToday (Java, Widevine DRM)Link Icon

This example is based on "BasicDRMPlayback" which is available in its sample application repository.

1WidevineConfiguration widevineConfiguration =
2 (WidevineConfiguration) new DRMConfiguration.Builder()
3 .uuid(WidevineConfiguration.UUID)
4 .licenseUrl("https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/")
5 .putHttpHeader("dt-custom-data","YOUR_CUSTOM_DATA_HERE")
6 .build();
7widevineConfiguration.setPrepareLicenseCallback(new PrepareLicenseCallback()
9 @Override
10 public byte[] prepareLicense(byte[] licenseResponse)
11 {
12 String json = new String(licenseResponse);
13 try
14 {
15 JSONObject jsonObject = new JSONObject(json);
16 String license = jsonObject.getString("license");
17 return android.util.Base64.decode(license, android.util.Base64.DEFAULT);
18 }
19 catch (JSONException e)
20 {
21 e.printStackTrace();
22 }
23 return new byte[0];
24 }
26SourceItem sourceItem = new SourceItem("https://path/to/your-dash-manifest.mpd");
28sourceConfiguration = new SourceConfiguration();

Give us feedback