CONNECT Player SDK 5 for Apple (FPS)

Enabling playback of FPS encrypted content

To enable FairPlay Streaming in your app:

  1. Create a new Xcode project and then implement the OTVLicenseDelegate protocol to provide the FPS-specific information that the player needs. This delegate needs to authenticate both the stream and the license server.

    final class OTVDelegate: NSObject, OTVLicenseDelegate {
    func contentIdentifier(url: URL) -> Data? {}
    func certificate() -> Data? {}
    func ckcMessage(spc: Data) -> Data? {}
    func scheme() -> String? {}
    }
    
  2. Instantiate an OTVDRMManager object in OPYFPSSDK to do all the negotiation between OTVAVPlayer and your app (via the OTVLicenseDelegate implementation).

    private let drmManager = OTVDRMManager:shared
    
  3. Register the delegate to the OTVDRMManager:

        private let licenseDelegate = OTVDelegate()
        drmManager.setLicenseDelegate(licenseDelegate)
    
  4. Instantiate an OTVAVPlayer using either the content URL or an OTVAVPlayerItem object and call its init() method:

        private let player = OTVAVPlayer()
        player.init(item)
        /// or:
        private let player = OTVAVPlayer()
        player.init(url)
    

You should now be able to use the OTVAVPlayer object to playback FPS-encrypted content in the same way as with AVPlayer.