[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
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

Thu Sep 13 2018

How to setup Bitmovin iOS SDK with EZDRM 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.

iOS SDK (Swift, Fairplay DRM)Link Icon

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

1let fpsConfig = FairplayConfiguration(license: licenseUrl, certificateURL: certificateUrl)
2
3fpsConfig.licenseRequestHeaders = ["content-type": "application/octet-stream"]
4
5fpsConfig.prepareContentId = { (contentId: String) -> String in
6 let part1 = contentId.components(separatedBy: ";")[1]
7 let part2 = part1.components(separatedBy: "?")[0]
8 return part2
9}
10
11fpsConfig.prepareMessage = { (data: Data, contentId: String) -> Data in
12 return data
13}
14
15psConfig.prepareLicense = { (data: Data) -> Data in
16 return data
17}

Give us feedback