MediaElement.PlayToPreferredSourceUri Propiedad

Definición

Nota

PlayToPreferredSourceUri está en desuso. En su lugar, llame a MediaElement.GetAsCastingSource y, en el valor devuelto, llame a CastingSource.PreferredSourceUri.

Obtiene o establece la ruta de acceso al origen multimedia preferido que permite que el dispositivo de destino Reproducir para transmitir el contenido multimedia, que puede ser DRM protegido, desde una ubicación diferente, como un servidor multimedia en la nube.

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 de propiedad

Ruta de acceso al origen multimedia preferido.

Atributos

Ejemplos

Este es un código que muestra cómo configurar Play To por referencia.

<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");

Comentarios

PlayToSource.PreferredSourceUri habilita Play To por referencia. Esto permite el streaming de contenido en el dispositivo play to target desde una ubicación diferente, como un servidor multimedia en la nube. Esto permite que las páginas web y la aplicación para UWP reproduzcan contenido protegido de Digital Rights Management (DRM). La aplicación especifica un identificador uniforme de recursos (URI) preferido que se enviará al dispositivo de destino Play To. Este identificador uniforme de recursos (URI) puede apuntar a un servidor multimedia basado en la nube. Si el valor playToSource.PreferredSourceUri está presente, el dispositivo de destino Play To puede transmitir contenido directamente desde la nube, que puede estar protegido por Digital Rights Management (DRM), en lugar de transmitir contenido desde el equipo Windows que debe estar desprotegido.

Una barra diagonal ("/") se anexa a la cadena del identificador uniforme de recursos (URI) cuando se envía a través de la red a un dispositivo Reproducir a. Esto se hace para cumplir los estándares de identificador uniforme de recursos (URI).

Se aplica a