You.i Engine
CYIFairPlayDRMConfiguration Class Reference

Detailed Description

A class containing the necessary configurations for playback of FairPlay protected media.

This class contains signals which bridge the player and application code during playback of FairPlay protected media.

There are two personas considered by this class, the user of the CYIAbstractVideoPlayer and the implementer of a concrete CYIAbstractVideoPlayer.

Flow from the perspective of a user of the CYIAbstractVideoPlayer:

1. Provide the CYIAbstractVideoPlayer with a CYIFairPlayDRMConfiguration instance when calling CYIAbstractVideoPlayer::Prepare.
2. When the player is ready to accept DRM information it will emit DRMRequestUrlAvailable with the DRM request URL.
3. Use the DRM request URL as required and then emit RequestSPCMessage providing the player with the ApplicationIdentifier and ContentIdentifier for the media.
4. Once the player has obtained the SPC (Server Playback Context) message it will emit SPCMessageAvailable with the SPC message. The SPC message can then be sent to the license server to obtain the CKC (Content Key Context) message.
5. When the CKC message has been obtained it must be provided to the player by emitting CKCMessageAvailable. Once the CKC message has been provided to the player the player will be ready to play the DRM protected media.

NotifyFailure must be emitted if an error occurs any time after DRMRequestUrlAvailable has been emitted (and before emitting CKCMessageAvailable) to notify the player of the error and stop the DRM request. If there is an issue during the above flow the CYIAbstractVideoPlayer will emit CYIAbstractVideoPlayer::NotifyErrorOccurred with a DRM error.

Flow from the perspective of an implementer of a concrete CYIAbstractVideoPlayer:

1. The CYIFairPlayDRMConfiguration will be available to the player implementation by the time CYIAbstractVideoPlayer::_Prepare is called.
2. The player implementation must connect to NotifyFailure and handle any cleanup that is required when NotifyFailure has been emitted.
3. The player implementation must emit DRMRequestUrlAvailable with the DRM request URL when the player encounters DRM protected media.
4. The player implementation must connect to RequestSPCMessage and when requested use the provided ApplicationIdentifier and ContentIdentifier to obtain the SPC message for the media.
5. Once the SPC (Server Playback Context) message has been obtained the player implementation must emit SPCMessageAvailable with the SPC message.
6. The player implementation must connect to CKCMessageAvailable and provide the CKC (Content Key Context) message to the player to allow playback of the protected media.

\note The default CYIAVPlayer concrete implementation, provided by CYIDefaultVideoPlayerFactory::Create, implements the above flow.

#include <player/YiFairPlayDRMConfiguration.h>

Inheritance diagram for CYIFairPlayDRMConfiguration:

Public Member Functions

virtual ~CYIFairPlayDRMConfiguration ()
 
virtual CYIAbstractVideoPlayer::DRMScheme GetScheme () const final override
 
- Public Member Functions inherited from CYIAbstractVideoPlayer::DRMConfiguration
virtual ~DRMConfiguration ()=default
 

Public Attributes

CYISignal< const CYIUrl &> DRMRequestUrlAvailable
 
CYISignal< const CYIString &, const CYIString &> RequestSPCMessage
 
CYISignal< const CYIString &> SPCMessageAvailable
 
CYISignal< const CYIString &> ProvideCKCMessage
 
CYISignal NotifyFailure
 

Constructor & Destructor Documentation

◆ ~CYIFairPlayDRMConfiguration()

virtual CYIFairPlayDRMConfiguration::~CYIFairPlayDRMConfiguration ( )
virtual

Member Function Documentation

◆ GetScheme()

virtual CYIAbstractVideoPlayer::DRMScheme CYIFairPlayDRMConfiguration::GetScheme ( ) const
finaloverridevirtual

Returns the DRM scheme which this configuration is associated with.

Implements CYIAbstractVideoPlayer::DRMConfiguration.

Member Data Documentation

◆ DRMRequestUrlAvailable

CYISignal<const CYIUrl & > CYIFairPlayDRMConfiguration::DRMRequestUrlAvailable

Emitted by the player during preparation of FairPlay DRM protected media providing the DRM request URL for the media.

◆ NotifyFailure

CYISignal CYIFairPlayDRMConfiguration::NotifyFailure

Application must emit this signal to notify the player that an error has occured during the DRM flow. This signal must be emitted any time an error occurs after DRMRequestUrlAvailable has been emitted by the player and before ProvideCKCMessage has been emitted by the application code.

◆ ProvideCKCMessage

CYISignal<const CYIString & > CYIFairPlayDRMConfiguration::ProvideCKCMessage

Applications must emit this signal to provide the CKC message for the media to the player once it has been obtained from the DRM license server.

◆ RequestSPCMessage

CYISignal<const CYIString & , const CYIString & > CYIFairPlayDRMConfiguration::RequestSPCMessage

Applications must emit this signal to request the SPC message from the player. When emitting this signal the ApplicationIdentifier and ContentIdentifier for the media must be provided. This signal must be emitted after receiving DRMRequestUrlAvailable, if an error occured NotifyFailure must be emitted instead.

◆ SPCMessageAvailable

CYISignal<const CYIString & > CYIFairPlayDRMConfiguration::SPCMessageAvailable

Emitted by the player when the SPC message is available from the player for the media. This signal will only be emitted after the SPC message has been requested by emitting RequestSPCMessage. The SPC message should be provided to the license server to obtain the CKC message.


The documentation for this class was generated from the following file: