<DRM video on iOS Flutter> has error this Source Error. This content is not authorized

Product

Player

Question

Hello, Bitmovin Flutter team.
We want to play DRM Contents on Flutter project.
While playing DRM videos on iOS I am facing this error. The video is encoded via Pallycon. It works perfectly fine on Android.
But we can’t play DRM contents on iOS.

I developed drm configuration on flutter. (Please see below code)

And I gave you detail error message

[BMP] [Source] [Error] Content key request failed with error: The operation couldn’t be completed. (OSStatus error -42681.) [Data code: -42681, message: The operation couldn’t be completed. (OSStatus error -42681.), underlying error: Error Domain=NSOSStatusErrorDomain Code=-42681 “(null)”]

I don’t know why “Source Error. This content is not authorized.” error.
Please check our problem.

Map<String, String> _fairPlayHeaders(String pallyconToken) {
return { 'pallycon-customdata-v2': pallyconToken,
        'Content-Type': 'application/octet-stream' };
      }

fairplay: FairplayConfig(
          licenseUrl: 'https://license.pallycon.com/ri/licenseManager.do',
          certificateUrl:
            'https://license-global.pallycon.com/ri/fpsKeyManager.do?siteId="AAAA',  // (`AAAA` is example)
          licenseRequestHeaders: _fairPlayHeaders(token),
          certificateRequestHeaders: _fairPlayHeaders(token),
          prepareContentId: (contentId) {
            return contentId.substring(cId.indexOf('skd://') + 6);
          },
          prepareCertificate: (certificiate) {
              print("=> Certificate $certificiate");

              List<int> decode = base64.decode(certificiate);
              Uint8List bytes = Uint8List.fromList(decode);
              String result = String.fromCharCodes(bytes);

              return result;
            },
            prepareLicense: (license) {
              print("=> License $license");

              return license;
            },
            prepareMessage: (spcData, _) {
              // spcData, assetId
              print("=> Message $spcData");

               return spcData;
            },
        ),

Hi @luna , thanks for reporting the 42681 error code you’re facing, which seems to originate at Apple Native player layer (not Bitmovin) and has also been reported by other non-Bitmovin users on threads like:

At first glance it seems related to the way keys are processed and handled, rather than to a specific client SDK. Hence, the troubleshooting steps I’d recommend are:

1.- Ensure that this sample web implementation works ok for you on any Safari-iOS environment:

2.- Then replace with your own content and verify it still plays ok

3.- Finally, translate the working code on web to your Flutter implementation