Renewing a licence
The application needs to renew an expired license to continue playback of the offline content.
func renewLicense(identifier: String) {
// Remove the license with identifier
OTVDRMManager.shared.eraseOfflineLicense(identifier: identifier)
// Request a new license with the identifier
OTVDRMManager.shared.requestLicense(identifier: identifier)
}
There is no API in Player SDK to return the license expiry value as Apple does not expose it. How to the license expiry information is obtained depends on which FairPlay server the client is using.
The application can get the license information by calling FairPlay server API. If a MediaLive/SDP server is used as the FairPlay server, please refer to the Get license information from MediaLive Multidrm server page for licence expiry.