CLDrmPrefetcherAPI Protocol

public protocol CLDrmPrefetcherAPI : InterceptableAPI

API for prefetching and managing persistent DRM keys.

  • Checks if the current DRM Instance can prefetch keys for the content received in the player configuration.

    Declaration

    Swift

    func canPrefetch(_ config: PlayerConfiguration) -> Bool

    Parameters

    config

    Player configuration.

    Return Value

    true if the current DRM Instance can prefetch keys a given player configuration.

  • Prefetch all keys for current player configuration.

    Declaration

    Swift

    func prefetchKeys(_ onComplete: @escaping (PRESTOerror?) -> Void)

    Parameters

    onComplete

    Called on completion.

  • Remove all the keys related to the content in current player configuration

    Declaration

    Swift

    func deleteKeys()
  • Returns the remaining playback window for a prefetched/offline license, in seconds. Availability depends on DRM backend and license policy.

    Declaration

    Swift

    func playDurationLeft(_ config: PlayerConfiguration?) -> UInt64?
  • Returns the remaining storage window for a prefetched/offline license, in seconds. Availability depends on DRM backend and license policy.

    Declaration

    Swift

    func storageDurationLeft(_ config: PlayerConfiguration?) -> UInt64?
  • Delete all stored keys and metadata.

    Declaration

    Swift

    func deleteAllPersistentData()