MediaBinder MediaBinder MediaBinder MediaBinder Class

Definition

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 : sealed class MediaBinder : IMediaBinder
public sealed class MediaBinder : IMediaBinder
Public NotInheritable Class MediaBinder Implements IMediaBinder
var mediaBinder = new mediaBinder();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v2)

Constructors

MediaBinder() MediaBinder() MediaBinder() MediaBinder()

Initializes a new instance of the MediaBinder class.

public : MediaBinder()
public MediaBinder()
Public Sub New()
var mediaBinder = new mediaBinder();

Properties

Source Source Source Source

Gets the MediaSource object associated with the MediaBinder.

public : MediaSource Source { get; }
public MediaSource Source { get; }
Public ReadOnly Property Source As MediaSource
var mediaSource = mediaBinder.source;
Value
MediaSource MediaSource MediaSource MediaSource

The MediaSource object associated with the MediaBinder.

Token Token Token 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.

public : Platform::String Token { get; set; }
public string Token { get; set; }
Public ReadWrite Property Token As string
var string = mediaBinder.token;
mediaBinder.token = string;
Value
Platform::String string string string

An app-specified string that is used to identify the specific media content that the app should bind.

Events

Binding Binding Binding 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.

public : event TypedEventHandler Binding<MediaBinder, MediaBindingEventArgs>
public event TypedEventHandler Binding<MediaBinder, MediaBindingEventArgs>
Public Event TypedEventHandler Binding( Of ( Of MediaBinder ), ( Of MediaBindingEventArgs ))
function onBinding(eventArgs){/* Your code */}


mediaBinder.addEventListener("binding", onBinding);
mediaBinder.removeEventListener("binding", onBinding);