Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

MediaBinder Class

Definition

Namespace:
Windows.Media.Core

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Enables deferred binding of media content associated with a MediaSource.

Use this class for media content that you don't want to bind to a MediaSource object until a media player is about to actually play the content. A typical scenario for this is playing content that requires payment when it is accessed.

public ref class MediaBinder sealed
/// [Windows.Foundation.Metadata.Activatable(131072, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaBinder final
[Windows.Foundation.Metadata.Activatable(131072, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaBinder
function MediaBinder()
Public NotInheritable Class MediaBinder
Inheritance
Object Platform::Object IInspectable MediaBinder
Attributes

Windows requirements

Requirements Description
Device family
Windows 10 (introduced in 10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v2.0)

Constructors

Name Description
MediaBinder()

Initializes a new instance of the MediaBinder class.

Properties

Name Description
Source

Gets the MediaSource object associated with the MediaBinder.

Token

Gets or sets an app-specified string that is used to identify the media content that the app should bind when the Binding event is raised.

Events

Name Description
Binding

Occurs when a media player is ready for the media content to be bound to a MediaSource. Use the handler for this to set the media content for the source by calling SetStream, SetStreamReference, or SetUri.

Applies to


Feedback

Was this page helpful?