Share via


MediaElement.PlayToPreferredSourceUri Propriedade

Definição

Observação

PlayToPreferredSourceUri foi preterido. Em vez disso, chame MediaElement.GetAsCastingSource e, no valor retornado, chame CastingSource.PreferredSourceUri.

Obtém ou define o caminho para a fonte de mídia preferencial que permite que o dispositivo de destino Reproduzir para transmita o conteúdo de mídia, que pode ser protegido por DRM, de um local diferente, como um servidor de mídia de nuvem.

public:
 property Uri ^ PlayToPreferredSourceUri { Uri ^ get(); void set(Uri ^ value); };
/// [get: Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [set: Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
Uri PlayToPreferredSourceUri();

void PlayToPreferredSourceUri(Uri value);
/// [get: Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
Uri PlayToPreferredSourceUri();

void PlayToPreferredSourceUri(Uri value);
public System.Uri PlayToPreferredSourceUri { [Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] get; [Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] set; }
public System.Uri PlayToPreferredSourceUri { [Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] get; [Windows.Foundation.Metadata.Deprecated("PlayToPreferredSourceUri may be altered or unavailable for releases after Windows 10.0. Instead, use GetAsCastingSource().PreferredSourceUri.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] set; }
var uri = mediaElement.playToPreferredSourceUri;
mediaElement.playToPreferredSourceUri = uri;
Public Property PlayToPreferredSourceUri As Uri
<MediaElement PlayToPreferredSourceUri="uri" />

Valor da propriedade

O caminho para a fonte de mídia preferencial.

Atributos

Exemplos

Aqui está um código que mostra como configurar o Play To por referência.

<MediaElement Source="http://www.contoso.com/videos/video.mp4" 
   PlayToPreferredSourceUri="http://www.contoso.com/catalogid=1234">
</MediaElement>
MediaElement video = new MediaElement();

video.Source = 
    new Uri("http://www.contoso.com/videos/video.mp4");

video.PlayToPreferredSourceUri = 
    new Uri("http://www.contoso.com/catalogid=1234"); 
auto video = ref new Windows::UI::Xaml::Controls::MediaElement();

video->Source = 
   ref new Windows::Foundation::Uri("http://www.contoso.com/videos/video.mp4");

video->PlayToPreferredSourceUri = 
   ref new Windows::Foundation::Uri("http://www.contoso.com/catalogid=1234");

Comentários

PlayToSource.PreferredSourceUri habilita Reproduzir para por referência. Isso permite transmitir conteúdo no dispositivo de destino Reproduzir para de um local diferente, como um servidor de mídia de nuvem. Isso permite que as páginas da Web e o aplicativo UWP reproduzam conteúdo protegido por DRM (Gerenciamento de Direitos Digitais). O aplicativo especifica um URI (Uniform Resource Identifier) preferencial que será enviado para o dispositivo de destino Reproduzir para. Esse URI (Uniform Resource Identifier) pode apontar para um servidor de mídia baseado em nuvem. Se o valor PlayToSource.PreferredSourceUri estiver presente, o dispositivo de destino Reproduzir para poderá transmitir conteúdo diretamente da nuvem, que pode ser protegido por DRM (Gerenciamento de Direitos Digitais), em vez de transmitir conteúdo do computador Windows que deve ser conteúdo desprotegido.

Uma barra ("/") é acrescentada à cadeia de caracteres URI (Uniform Resource Identifier) quando ela é enviada pela rede para um dispositivo Play To. Isso é feito para estar em conformidade com os padrões de URI (Uniform Resource Identifier).

Aplica-se a