502 Content Protection For HTTP Live Streaming PDF
502 Content Protection For HTTP Live Streaming PDF
502 Content Protection For HTTP Live Streaming PDF
Content Protection
for HTTP Live Streaming
Session 502
© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.
FairPlay Streaming
Overview of FairPlay Streaming (FPS)
Overview of FairPlay Streaming (FPS)
Industrial-strength protection for your HTTP Live Streaming audio & video
Overview of FairPlay Streaming (FPS)
Industrial-strength protection for your HTTP Live Streaming audio & video
Already delivering keys in the premium content industry
Overview of FairPlay Streaming (FPS)
Industrial-strength protection for your HTTP Live Streaming audio & video
Already delivering keys in the premium content industry
Built into iOS, Apple TV, and OS X
Overview of FairPlay Streaming (FPS)
Industrial-strength protection for your HTTP Live Streaming audio & video
Already delivering keys in the premium content industry
Built into iOS, Apple TV, and OS X
Power-efficient on mobile devices
Overview of FairPlay Streaming (FPS)
Industrial-strength protection for your HTTP Live Streaming audio & video
Already delivering keys in the premium content industry
Built into iOS, Apple TV, and OS X
Power-efficient on mobile devices
Integrated with AirPlay
Overview of FairPlay Streaming (FPS)
Industrial-strength protection for your HTTP Live Streaming audio & video
Already delivering keys in the premium content industry
Built into iOS, Apple TV, and OS X
Power-efficient on mobile devices
Integrated with AirPlay
Offered under the Apple Developer Program License Agreement
Scope of FairPlay Streaming—What It Is
Integrate a FairPlay Streaming Key Security Module (KSM) into your key server
What Do You Need to Do?
Integrate a FairPlay Streaming Key Security Module (KSM) into your key server
Add code to your app to relay key requests and responses
What Do You Need to Do?
Integrate a FairPlay Streaming Key Security Module (KSM) into your key server
Add code to your app to relay key requests and responses
For each HLS asset that you wish to protect:
• Generate and store a Content Key (CK) in your back-end database
• Encrypt the asset using AES Sample encryption
• Put a reference to the CK into your HLS playlist
Designing a FairPlay Streaming System
Gianpaolo Fasoli
FairPlay Streaming Engineer
Designing a FairPlay Streaming System
Designing a FairPlay Streaming System
Your App
FPS KSM
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
1 Your app asks AVFoundation to play your protected HLS asset
Your App
FPS KSM
1
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
2 AVFoundation will download your m3u8 playlist containing the KEY tag
Your App
FPS KSM
2 1
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
3 AVFoundation will call your app delegate to request the key
Your App
FPS KSM
2 1 3
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
4 Your app delegate calls AVFoundation to create an FPS Server Playback Context request
Your App
FPS KSM
2 1 3 4
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
5 Your app delegate sends the FPS SPC to your key server
Your App
5 5
Your Key Your Key
Internet AVFoundation
Database Server Delegate
FPS KSM
2 1 3 4
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
6 Key server unwraps the SPC with your FPS KSM and performs CK lookup
Your App
5 5
Your Key 6 Your Key
Internet AVFoundation
Database Server Delegate
FPS KSM
2 1 3 4
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
7 After lookup, your FPS KSM wraps the content key into a Content Key Context response
Your App
5 5
Your Key 6 Your Key
Internet AVFoundation
Database Server Delegate
7 7
FPS KSM
2 1 3 4
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
8 Your app delegate provides the CKC to AVFoundation
Your App
5 5
Your Key 6 Your Key
Internet AVFoundation
Database Server Delegate
7 7
FPS KSM
2 1 3 4 8
Existing
Provided AVFoundation
Your Implementation
FairPlay Streaming—Request Flow
9 Now the device can decrypt and play the content
9 Your App
5 5
Your Key 6 Your Key
Internet AVFoundation
Database Server Delegate
7 7
FPS KSM
2 1 3 4 8
Existing
Provided AVFoundation
Your Implementation
What Is Provided
What Is Provided
Set m3u8 URL as src attribute of HTML <video> tag (as usual)
Integrating FPS Into Your Web Page
Set m3u8 URL as src attribute of HTML <video> tag (as usual)
Add EventListener for ‘webkitneedkey‘ to video element:
Integrating FPS Into Your Web Page
Set m3u8 URL as src attribute of HTML <video> tag (as usual)
Add EventListener for ‘webkitneedkey‘ to video element:
Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“
Integrating FPS Into Your Web Page
Set m3u8 URL as src attribute of HTML <video> tag (as usual)
Add EventListener for ‘webkitneedkey‘ to video element:
Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“
Create keySession on “video/mp4” to relay messages with the keySystem
Integrating FPS Into Your Web Page
Set m3u8 URL as src attribute of HTML <video> tag (as usual)
Add EventListener for ‘webkitneedkey‘ to video element:
Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“
Create keySession on “video/mp4” to relay messages with the keySystem
Add Event handler for ‘webkitkeymessage’ to keySession:
Integrating FPS Into Your Web Page
Set m3u8 URL as src attribute of HTML <video> tag (as usual)
Add EventListener for ‘webkitneedkey‘ to video element:
Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“
Create keySession on “video/mp4” to relay messages with the keySystem
Add Event handler for ‘webkitkeymessage’ to keySession:
Send SPC request to your Key Server
Integrating FPS Into Your Web Page
Set m3u8 URL as src attribute of HTML <video> tag (as usual)
Add EventListener for ‘webkitneedkey‘ to video element:
Set EME CDM keySystem (video.webkitSetMediaKeys) to “com.apple.fps.1_0“
Create keySession on “video/mp4” to relay messages with the keySystem
Add Event handler for ‘webkitkeymessage’ to keySession:
Send SPC request to your Key Server
Provide CKC response to keySession.update()
Safari Request Flow
Safari
FPS KSM
Existing
Provided EME
Your Implementation
Safari Request Flow
1 User hits Play
Safari
FPS KSM
Existing
Provided EME
Your Implementation
Safari Request Flow
2 Your Event Listener receives ‘webkitneedkey’ message
Safari
FPS KSM
Existing
Provided EME
Your Implementation
Safari Request Flow
3 Your Event Listener creates keySession and waits for ‘webkitkeymessage’ Event
Safari
FPS KSM
2 3
Existing
Provided EME
Your Implementation
Safari Request Flow
4 Your ‘webkitkeymessage’ Event Handler receives message containing SPC
Safari
FPS KSM
2 3 4
Existing
Provided EME
Your Implementation
Safari Request Flow
5 Your Event Handler sends SPC to your Key Server
Safari
FPS KSM
2 3 4
Existing
Provided EME
Your Implementation
Safari Request Flow
6 You update keySession upon receipt of CKC response
Safari
2 3 4 6
Existing
Provided EME
Your Implementation
FairPlay Streaming
Integration Troubleshooting
Troubleshooting
Content
Doesn’t Play
Content
or Key?
Troubleshooting
Content
Doesn’t Play
KEYFORMAT=“identity”
Content
or Key?
Troubleshooting
Content
Doesn’t Play
Content
Content
or Key?
Content
Doesn’t Play
Technical Support
Apple Developer Forums
http://developer.apple.com/forums
Graphics, Games
HTTP Live Streaming Lab and Media Lab B
Tuesday 11:00AM
Graphics, Games
AirPlay Lab and Media Lab B
Tuesday 3:30PM
Graphics, Games
AVKit and AV Foundation Lab and Media Lab A
Wednesday 1:30PM
Graphics, Games
AVKit and AV Foundation Lab and Media Lab B
Thursday 11:00AM
Graphics, Games
HTTP Live Streaming Lab and Media Lab C
Thursday 11:00AM