fix(ios): split licenseUrl and loadedLicenseUrl (#3578)
* fix(ios): split licenseUrl and loadedLicenseUrl * fix(ios): fix drm license url used to provide the answer
This commit is contained in:
@@ -43,14 +43,18 @@ Rather than setting the `licenseServer` url to get the license, you can manually
|
||||
your `contentId` + the provided certificate via `objc [loadingRequest streamingContentKeyRequestDataForApp:certificateData
|
||||
contentIdentifier:contentIdData options:nil error:&spcError]; `
|
||||
|
||||
Also, you will receive the `contentId` and a `licenseUrl` URL defined as `loadingRequest.request.URL.absoluteString ` or as the `licenseServer` prop if it's passed.
|
||||
Also, you will receive following parameter of getLicense:
|
||||
* `contentId` contentId if passed to `drm` object or loadingRequest.request.url?.host
|
||||
* `loadedLicenseUrl` URL defined as `loadingRequest.request.URL.absoluteString`, this url starts with `skd://` or `clearkey://`
|
||||
* `licenseServer` prop if prop is passed to `drm` object.
|
||||
* `spcString` the SPC used to validate playback with drm server
|
||||
|
||||
You should return on this method a `CKC` in Base64, either by just returning it or returning a `Promise` that resolves with the `CKC`.
|
||||
|
||||
With this prop you can override the license acquisition flow, as an example:
|
||||
|
||||
```js
|
||||
getLicense: (spcString, contentId, licenseUrl) => {
|
||||
getLicense: (spcString, contentId, licenseUrl, loadedLicenseUrl) => {
|
||||
const base64spc = Base64.encode(spcString);
|
||||
const formData = new FormData();
|
||||
formData.append('spc', base64spc);
|
||||
|
Reference in New Issue
Block a user