Media Manifest API
This API returns a manifest file that contains the metadata of the video for playback. This is different for apple (.m3u8) and android devices (.mpd).
Endpoint
The manifest_key is returned in the Playback API response as a part of the manifest url.
Query Parameters
| Parameter | Type | Requirement | Description |
|---|---|---|---|
sk |
String | Required | Stream key received in the playback API response. |
sp |
Object | Required | Stream policy received in the playback API response. |
Response
XML response if the requested manifest is .mpd
Text response if the requested manifest is .m3u8
DRM License Response Formatting
When the DRM provider is DRMTODAY, FairPlay responses are returned as Base64 encoded data and will need to be decoded for usage by the CDM for both the Browser and iOS.
Browser Example:
// Assume the raw license response is taken named rawLicenseBase64
let rawLicenseString = atob(rawLicenseBase64);
// Convert that string into a Uint8Array
let data = new Uint8Array(rawLicenseString.length);
for (let i = 0; i < rawLicenseString.length; ++i) {
data[i] = rawLicenseString.charCodeAt(i);
}
let licenseData = data.buffer;
// Load licenseData into CDM however player framework utilizes this (usually in license interceptors)
iOS Example:
NSData *licenseData = [[NSData alloc] initWithBase64EncodedData:rawLicenseBase64 options:0];
// Load licenseData into CDM using this as a response to the
// getContentKeyAndLeaseExpiryfromKeyServerModuleWithRequest method for AVPlayer.