EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

PlayToManager.DefaultSourceSelection | defaultSourceSelection property

Applies to Windows only

Enables or disables the default source selection for Play To.

Syntax

Public Property DefaultSourceSelection As Boolean

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

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

PlayToManager
Samples
Play To sample
PlayToReceiver sample
Media Server sample

 

 

Mostrar:
© 2014 Microsoft