PlayToManager.DefaultSourceSelection | defaultSourceSelection property

This topic has not yet been rated - Rate this topic

Enables or disables the default source selection for Play To.

Syntax


var defaultSourceSelection = playToManager.defaultSourceSelection;
playToManager.defaultSourceSelection = defaultSourceSelection;

Property value

Type: Boolean [JavaScript] | System.Boolean [.NET] | Platform::Boolean [C++]

True to enable default source selection; otherwise false. The default is true.

Remarks

An app that contains media elements has Play To enabled by default. If a user invokes the Devices charm while running the app and selects a target device to stream media to, Play To will stream the media from the first audio, video, or image element on the current page. You can disable this default behavior by setting the DefaultSourceSelection property to false.


var ptm = Windows.Media.PlayTo.PlayToManager.getForCurrentView();
ptm.defaultSourceSelection = false;


You can exclude individual HTML elements from the default Play To behavior by adding the -ms-playToDisabled attribute in your HTML markup.


<video src="http://www.example.com/videos/video.mp4" x-ms-playToDisabled />

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

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

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

Metadata

Windows.winmd

See also

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