# Apple FairPlay
Note
This feature is available only to ByteArk Video Cloud for Business customers. Please contact sales@byteark.com if you would like to use it.
ByteArk Player SDK for Flutter supports playback of content protected with Apple FairPlay Streaming (FPS) (opens new window) on iOS. The Flutter SDK passes the DRM configuration through to iOS's AVPlayer to handle licensing and decryption.
# Usage
Configure FairPlayDrm via ByteArkDrm on ByteArkPlayerItem:
final playerItem = ByteArkPlayerItem(
url: "<MEDIA_URL>",
drm: ByteArkDrm(
fairPlayDrm: FairPlayDrm(
licenseUrl: "<FAIRPLAY_LICENSE_URL>",
certificateUrl: "<FAIRPLAY_CERTIFICATE_URL>",
),
),
);
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
| Property | Type | Required | Description |
|---|---|---|---|
licenseUrl | String? | Yes | FairPlay license server URL (for fetching CKC) |
certificateUrl | String? | Yes | FairPlay Application Certificate URL |
licenseRequestHeaders | Map<String, String>? | No | Custom headers for the license request |
# Send custom headers
final playerItem = ByteArkPlayerItem(
url: "<MEDIA_URL>",
drm: ByteArkDrm(
fairPlayDrm: FairPlayDrm(
licenseUrl: "<FAIRPLAY_LICENSE_URL>",
certificateUrl: "<FAIRPLAY_CERTIFICATE_URL>",
licenseRequestHeaders: {
"Authorization": "Bearer <YOUR_TOKEN>",
},
),
),
);
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Caution
- DRM must use HTTPS.
- FairPlay decryption works only on physical devices, not the iOS Simulator.