PlayToSourceRequestedEventArgs class

This topic has not yet been rated - Rate this topic

Provides information about the SourceRequested event.

Syntax


/* For information about creating or accessing this object, see Remarks. */

Attributes

MarshalingBehaviorAttribute(Agile)
VersionAttribute(NTDDI_WIN8)

Members

The PlayToSourceRequestedEventArgs class has these types of members:

Methods

The PlayToSourceRequestedEventArgs class inherits methods from the Object class (C#/VB/C++).

Properties

The PlayToSourceRequestedEventArgs class has these properties.

PropertyAccess typeDescription

SourceRequest

Read-onlyGets the media object to connect to a Play To target.

 

Remarks

You use the SourceRequest property of the PlayToSourceRequestedEventArgs class to pass media from your application to Play To during the SourceRequested event.

For an example of how to use Play To in an application, see Quickstart: Using Play To in applications (JavaScript) or Quickstart: Using Play To in applications (C#/VB).

Examples


// Play To Contract

var ptm = Windows.Media.PlayTo.PlayToManager.getForCurrentView();
ptm.addEventListener("sourcerequested", sourceRequestHandler, false);

function sourceRequestHandler(e) {
    try {
        e.sourceRequest.setSource(mediaElement.msPlayToSource);

    } catch (ex) {
        id("messageDiv").innerHTML += "Exception encountered: " + ex.message + "<br/>";
    }
}


Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Namespace

Windows.Media.PlayTo
Windows::Media::PlayTo [C++]

Metadata

Windows.winmd

See also

SourceRequested
Samples
Play To sample
PlayToReceiver sample
Media Server sample

 

 

Build date: 12/4/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.