NDClient NDClient NDClient NDClient Class
Definition
Creates PlayReady-ND sessions, coordinates with the download engine and the stream parser (for example, an MPEG-2 demuxer), manages the sample buffer, and listens to media stream source events.
public : sealed class NDClient : INDClientpublic sealed class NDClient : INDClientPublic NotInheritable Class NDClient Implements INDClient// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
NDClient(INDDownloadEngine, INDStreamParser, INDMessenger) NDClient(INDDownloadEngine, INDStreamParser, INDMessenger) NDClient(INDDownloadEngine, INDStreamParser, INDMessenger) NDClient(INDDownloadEngine, INDStreamParser, INDMessenger)
Creates a new instance of the NDClient class.
public : NDClient(INDDownloadEngine downloadEngine, INDStreamParser streamParser, INDMessenger pMessenger)public NDClient(INDDownloadEngine downloadEngine, INDStreamParser streamParser, INDMessenger pMessenger)Public Sub New(downloadEngine As INDDownloadEngine, streamParser As INDStreamParser, pMessenger As INDMessenger)// You can use this method in JavaScript.
- downloadEngine
- INDDownloadEngine INDDownloadEngine INDDownloadEngine INDDownloadEngine
The download engine used to stream protected media content from a transmitter.
- streamParser
- INDStreamParser INDStreamParser INDStreamParser INDStreamParser
The stream parser used to parse data from a media stream.
- pMessenger
- INDMessenger INDMessenger INDMessenger INDMessenger
The messenger used to send messages between the PlayReady-ND receiver and transmitter.
Methods
Close() Close() Close() Close()
Closes the current playback session regardless of whether it is in the registration, proximity detection, license fetch, or play state.
public : void Close()public void Close()Public Function Close() As void// You can use this method in JavaScript.
LicenseFetchAsync(INDLicenseFetchDescriptor) LicenseFetchAsync(INDLicenseFetchDescriptor) LicenseFetchAsync(INDLicenseFetchDescriptor) LicenseFetchAsync(INDLicenseFetchDescriptor)
Performs a license fetch between a client receiver and a transmitter.
public : IAsyncOperation<INDLicenseFetchResult> LicenseFetchAsync(INDLicenseFetchDescriptor licenseFetchDescriptor)public IAsyncOperation<INDLicenseFetchResult> LicenseFetchAsync(INDLicenseFetchDescriptor licenseFetchDescriptor)Public Function LicenseFetchAsync(licenseFetchDescriptor As INDLicenseFetchDescriptor) As IAsyncOperation( Of INDLicenseFetchResult )// You can use this method in JavaScript.
- licenseFetchDescriptor
- INDLicenseFetchDescriptor INDLicenseFetchDescriptor INDLicenseFetchDescriptor INDLicenseFetchDescriptor
Descriptor for the license being fetched.
The result of the asynchronous license fetch call.
Remarks
Apps typically call this method during key rotation for new root licenses.
ReRegistrationAsync(INDCustomData) ReRegistrationAsync(INDCustomData) ReRegistrationAsync(INDCustomData) ReRegistrationAsync(INDCustomData)
Performs a proximity detection and reregistration between a client receiver and a transmitter.
public : IAsyncAction ReRegistrationAsync(INDCustomData registrationCustomData)public IAsyncAction ReRegistrationAsync(INDCustomData registrationCustomData)Public Function ReRegistrationAsync(registrationCustomData As INDCustomData) As IAsyncAction// You can use this method in JavaScript.
- registrationCustomData
- INDCustomData INDCustomData INDCustomData INDCustomData
Custom data for the registration request.
The result of the asynchronous reregistration call.
Remarks
The PlayReady Network Device (PRND) protocol requires a receiver to reregister with a transmitter within 48 hours after a successful proximity detection operation so that the receiver can continue to receive protected data from the transmitter. An app should call this method immediately after it receives a ReRegistrationNeeded event.
StartAsync(Uri, UInt32, INDCustomData, INDLicenseFetchDescriptor) StartAsync(Uri, UInt32, INDCustomData, INDLicenseFetchDescriptor) StartAsync(Uri, UInt32, INDCustomData, INDLicenseFetchDescriptor) StartAsync(Uri, UInt32, INDCustomData, INDLicenseFetchDescriptor)
Starts the registration, proximity detection, and license fetch procedures between a client receiver and a transmitter.
public : IAsyncOperation<INDStartResult> StartAsync(Uri contentUrl, unsigned int startAsyncOptions, INDCustomData registrationCustomData, INDLicenseFetchDescriptor licenseFetchDescriptor)public IAsyncOperation<INDStartResult> StartAsync(Uri contentUrl, UInt32 startAsyncOptions, INDCustomData registrationCustomData, INDLicenseFetchDescriptor licenseFetchDescriptor)Public Function StartAsync(contentUrl As Uri, startAsyncOptions As UInt32, registrationCustomData As INDCustomData, licenseFetchDescriptor As INDLicenseFetchDescriptor) As IAsyncOperation( Of INDStartResult )// You can use this method in JavaScript.
- contentUrl
- Uri Uri Uri Uri
The URL of the streamed content.
- startAsyncOptions
- unsigned int UInt32 UInt32 UInt32
The asynchronous start options. See the NDStartAsyncOptions enumeration for a detailed description of these options.
- registrationCustomData
- INDCustomData INDCustomData INDCustomData INDCustomData
The custom data type identifier that is used for registration with the transmitter.
- licenseFetchDescriptor
- INDLicenseFetchDescriptor INDLicenseFetchDescriptor INDLicenseFetchDescriptor INDLicenseFetchDescriptor
The descriptor used for license fetching.
The result of the asynchronous start call.
Remarks
This method sets up a PlayReady-ND session with a transmitter and notifies the download engine to begin streaming content as soon as it has established the session.
This method also notifies listeners that each task has completed by firing the appropriate ClosedCaptionDataReceived, LicenseFetchCompleted, ProximityDetectionCompleted, RegistrationCompleted, and ReRegistrationNeeded events.
Events
ClosedCaptionDataReceived ClosedCaptionDataReceived ClosedCaptionDataReceived ClosedCaptionDataReceived
Notifies listeners that a closed caption acquisition operation has completed.
public : event TypedEventHandler ClosedCaptionDataReceived<NDClient, INDClosedCaptionDataReceivedEventArgs>public event TypedEventHandler ClosedCaptionDataReceived<NDClient, INDClosedCaptionDataReceivedEventArgs>Public Event ClosedCaptionDataReceived<NDClient, INDClosedCaptionDataReceivedEventArgs>// You can use this event in JavaScript.
LicenseFetchCompleted LicenseFetchCompleted LicenseFetchCompleted LicenseFetchCompleted
Notifies listeners that a license fetch operation has completed.
public : event TypedEventHandler LicenseFetchCompleted<NDClient, INDLicenseFetchCompletedEventArgs>public event TypedEventHandler LicenseFetchCompleted<NDClient, INDLicenseFetchCompletedEventArgs>Public Event LicenseFetchCompleted<NDClient, INDLicenseFetchCompletedEventArgs>// You can use this event in JavaScript.
ProximityDetectionCompleted ProximityDetectionCompleted ProximityDetectionCompleted ProximityDetectionCompleted
Notifies listeners that a proximity detection operation has completed.
public : event TypedEventHandler ProximityDetectionCompleted<NDClient, INDProximityDetectionCompletedEventArgs>public event TypedEventHandler ProximityDetectionCompleted<NDClient, INDProximityDetectionCompletedEventArgs>Public Event ProximityDetectionCompleted<NDClient, INDProximityDetectionCompletedEventArgs>// You can use this event in JavaScript.
RegistrationCompleted RegistrationCompleted RegistrationCompleted RegistrationCompleted
Notifies listeners that a registration operation has completed.
public : event TypedEventHandler RegistrationCompleted<NDClient, INDRegistrationCompletedEventArgs>public event TypedEventHandler RegistrationCompleted<NDClient, INDRegistrationCompletedEventArgs>Public Event RegistrationCompleted<NDClient, INDRegistrationCompletedEventArgs>// You can use this event in JavaScript.
ReRegistrationNeeded ReRegistrationNeeded ReRegistrationNeeded ReRegistrationNeeded
Notifies listeners that the app should start re-registration by calling the ReRegistrationAsync method.
public : event TypedEventHandler ReRegistrationNeeded<NDClient, object>public event TypedEventHandler ReRegistrationNeeded<NDClient, object>Public Event ReRegistrationNeeded<NDClient, object>// You can use this event in JavaScript.
Remarks
The PlayReady Network Device (PRND) protocol requires client receivers to re-register with transmitters every 48 hours. This event notifies listeners that 47.5 hours have passed since the receiver successfully registered with a transmitter. This gives the app a chance to call the ReRegistrationAsync method before the session expires.