Class DrmSettings

java.lang.Object
com.castlabs.android.settings.DrmSettings

public final class DrmSettings extends Object
Global DRM configuration settings.

These settings control DRM detection behavior during SDK initialization.

The drmSchemesToVerify set determines which DRM schemes should be verified by creating a MediaDrm instance, rather than trusting the result of MediaCrypto.isCryptoSchemeSupported(java.util.UUID).

On some devices, isCryptoSchemeSupported() returns incorrect results (false negatives). For DRM schemes in the drmSchemesToVerify set, the SDK will create a MediaDrm instance to definitively determine if the scheme is supported.

Default behavior: Only Widevine is verified (some devices report false negatives for Widevine).

Example usage:

 // Also verify PlayReady (if encountering detection issues on specific devices)
 PlayerSDK.DRM_SETTINGS.drmSchemesToVerify.add(Drm.Playready);

 // Trust isCryptoSchemeSupported for Widevine (remove from verification set)
 PlayerSDK.DRM_SETTINGS.drmSchemesToVerify.remove(Drm.Widevine);
 
Since:
4.4.6
  • Field Details

    • drmSchemesToVerify

      @NonNull public final Set<Drm> drmSchemesToVerify
      Set of DRM schemes that should be verified by creating a MediaDrm instance, rather than trusting isCryptoSchemeSupported().

      By default, contains only Drm.Widevine as some devices incorrectly report Widevine as unsupported.

      This set can be modified before SDK initialization to add or remove DRM schemes. Changes after SDK initialization will not affect already-detected DRM support.

  • Constructor Details

    • DrmSettings

      public DrmSettings()
      Default constructor.