-api-id | -api-type |
---|---|
M:Windows.Media.PlayTo.PlayToSourceRequest.GetDeferral |
winrt method |
Defers connecting a media source to a Play To target.
A deferral object that you can use to identify when the deferral is complete.
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.
[!code-csharpDeferral]
[!code-vbDeferral]