v3.27.2
github-actions
released this
27 Jan 12:35
·
30 commits
to develop
since this release
New in this version:
- Now you can build your own implementation of FairPlayLicenseProvider and set it to the player.
getContentId(request: URLRequest)
added toFairPlayLicenseProvider
protocol (#470)
How to use:
player.settings.fairPlayLicenseProvider = MyFPSLicenseProvider()
class MyFPSLicenseProvider: FairPlayLicenseProvider {
func getContentId(request: URLRequest) -> String? {
// Use request.url value to obtain content ID
return "CONTENT ID"
}
func getLicense(spc: Data,
contentId: String,
requestParams: PlayKit.PKRequestParams,
callback: @escaping (Data?, TimeInterval, Error?) -> Void) {
// Implementation of FP license request to license server
callback(license, // FP license as Data. FairPlay Streaming Key Response Data
86400, // License expiration Time Interval
nil) // Error
}
Cocoapods install
pod 'PlayKit', '~> 3.27.2'