PlayToManager.DefaultSourceSelection Property

Definition

Enables or disables the default source selection for Play To.

public:
 property bool DefaultSourceSelection { bool get(); void set(bool value); };
/// [get: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [set: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
bool DefaultSourceSelection();

void DefaultSourceSelection(bool value);
/// [get: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
bool DefaultSourceSelection();

void DefaultSourceSelection(bool value);
public bool DefaultSourceSelection { [Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] get; [Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] set; }
public bool DefaultSourceSelection { [Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] get; [Windows.Foundation.Metadata.Deprecated("PlayToManager may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] set; }
var boolean = playToManager.defaultSourceSelection;
playToManager.defaultSourceSelection = boolean;
Public Property DefaultSourceSelection As Boolean

Property Value

Boolean

bool

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

Attributes

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/>

Applies to

See also