# DrmAPI Protocol

    public protocol DrmAPI

DRM Interface.

- `enableDebugging`

  If set to `true` prevents app from crashing when a debug session is attached. Expected playback failure on DRM protected content.

  Remark

  Default value is `false`.

  #### Declaration

  Swift

      var enableDebugging: Bool { get set }

- `onDrmState`

  Triggered when drm state changes.

  #### Declaration

  Swift

      var onDrmState: ((DRMState) -> Void)? { get set }

- `canDecrypt(_:)`

  Checks if the current DRM Instance can decrypt the content received in the player configuration.

  #### Declaration

  Swift

      func canDecrypt(_ config: PlayerConfiguration) -> Bool

  #### Parameters

  `config` | Player configuration.

  #### Return Value

  `true` if the current DRM Instance can decrypt a given player configuration.