Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 2.42 KB

playtosourcerequest_getdeferral_254836512.md

File metadata and controls

35 lines (21 loc) · 2.42 KB
-api-id -api-type
M:Windows.Media.PlayTo.PlayToSourceRequest.GetDeferral
winrt method

Windows.Media.PlayTo.PlayToSourceRequest.GetDeferral

-description

Defers connecting a media source to a Play To target.

-returns

A deferral object that you can use to identify when the deferral is complete.

-remarks

You can use a deferral when you want to make an asynchronous call to retrieve the media element to stream. Play To will then wait for you to supply the media element until you mark the deferral as complete.

To create a deferral, call the GetDeferral method to instruct the PlayToManager class to wait to receive a source media element to stream to the Play To target. After you have supplied the source media element to the SetSource method, call the Complete method to end the deferral. If you create a deferral and the wait time exceeds the Deadline property, Play To will continue without a source element from your app.

For an example of how to use Play To in an application, see PlayReady DRM.

-examples

[!code-csharpDeferral]

[!code-vbDeferral]

-see-also

Play To sample, PlayToReceiver sample, Media Server sample