Giter Club home page Giter Club logo

fairplay-ios-demo's Introduction


Logo

iOS FairPlay Streaming

FairPlay Streaming Programming Guide!

Table of Contents
  1. About FairPlay Streaming
  2. Prerequisites
  3. Getting Started
  4. License
  5. Contact
  6. Acknowledgements

About The FairPlay Streaming

Apple FairPlay Streaming (FPS) securely delivers keys to Apple mobile devices, Apple TV, and Safari on macOS and iOS, which will enable playback of encrypted video content. This content is delivered over the Web using HTTP Live Streaming (HLS) technology. FPS protects the delivery of keys that decrypt streamed audio and video media. An Apple device or computer can securely acquire a key from a content provider's key server. The operating system uses the key to decrypt the media before playback. FPS key delivery offers the following features:

  • AES 128-bit content keys are generated by the key server.
  • Every key is known only to the key server and to the Apple device.
  • When playback is stopped, the key for the iOS device, Apple TV, or Safari on macOS and iOS is permanently discarded from memory.
  • The key server can specify the duration of the key's validity for iOS and Apple TV.
  • MPEG-2 file formats are supported for protection.
One key thing to note is Fairplay HLS streaming will only work on a real Apple device, not on a simulator.

Prerequisites

  • Manifest URL of the HLS stream.
  • Fairplay Application certificate of the content provider.
  • Content Identifier.
  • Key Server Module or DRM server URL

Getting Started

Product Name Screen Shot

Now, getting down to how exactly it works on the media player because we need to have a clear understanding of this process.

So, breaking it in steps

  1. The app asks the the native player to play specific content identified by a URL, here we give the manifest URL to the AVPlayer.

    https://videodrmmediaservice-euwe.streaming.media.azure.net/3eb925e7-04fa-4a02-8d3m-2b0d9a864keb/test.ism/manifest(format=m3u8-aapl,encryption=cbcs-aapl)
  2. The player accesses the content and checks its playlist.

  3. An attribute in the playlist identifies the content as encrypted by a content key obtainable through FPS.

  4. The iOS informs the app that the content is encrypted using FPS, (here an implemented AVAssetResourceLoaderDelegate protocol method will be invoked in application code)

  5. The app asks the iOS to prepare an FPS message that requests the content key.

  6. The iOS delivers an encrypted Server Playback Context (SPC) message to the app.

  7. The app sends the SPC to a key server that contains a KSM.

  8. The KSM decrypts the SPC and gets the requested content key from the key server.

  9. The KSM wraps the content key inside an encrypted content key context (CKC) message, which it sends to the app.

  10. The app delivers the CKC to FPS software integrated in the operating system. The CKC is used to decrypt the media content and plays the content.

License

Distributed under the MIT License.

Contact

Mostafa Shuman - @twitter - [email protected]

Acknowledgements

fairplay-ios-demo's People

Contributors

mostafamshuman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fairplay-ios-demo's Issues

Question: The prerequisites

I need help to get the prerequisites
need an example for: Manifest URL of the HLS stream, Key Server Module or DRM server URL, Content Identifier. and from where i could get them?

Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.