Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PlayToManager class

Applies to Windows only

Provides access to Play To capabilities.


var playToManager = Windows.Media.PlayTo.PlayToManager;




The PlayToManager class has these types of members:


The PlayToManager class has these events.

SourceRequested Occurs when a user requests media to stream to a Play To target device.
SourceSelected Occurs when a Play To source element has been selected.



The PlayToManager class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

GetForCurrentView Gets the Play To manager for the current view.
ShowPlayToUI Displays the Play To UI.



The PlayToManager class has these properties.

PropertyAccess typeDescription


Read/writeEnables or disables the default source selection for Play To.



If your application includes audio, video, or image elements, users can stream the media source for those elements to a Play To target device. You can use the PlayToManager class to customize the Play To experience for users. You can disable the default behavior by using the DefaultSourceSelection property.You can select which media is streamed by using the SourceRequested event. And you can display the Play To UI in place of the Devices charm by using the ShowPlayToUI method.

In Play To, video starts from the current position. If you want to start the video from the beginning, simply seek to the beginning of the video as soon as the Play To connection is established.

PlayTo apps will not be suspended as long as video or music is playing on the Play To receiver or images are continuously sent to the Play To receiver. Apps have approximately 10 seconds to send a new image after the current one is displayed and approximately 10 seconds to send the next audio or video after the current one has ended.

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


// Play To Contract

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

function sourceRequestHandler(e) {
    try {

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


Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported


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



See also

Play To sample
PlayToReceiver sample
Media Server sample



© 2014 Microsoft