Share via


MediaElement.PlayToPreferredSourceUri Propriété

Définition

Notes

PlayToPreferredSourceUri est déconseillé. Au lieu de cela, appelez MediaElement.GetAsCastingSource et, sur la valeur retournée, appelez CastingSource.PreferredSourceUri.

Obtient ou définit le chemin d’accès à la source multimédia par défaut qui permet à l’appareil cible Lire sur de diffuser en continu le contenu multimédia, qui peut être protégé par DRM, à partir d’un autre emplacement, tel qu’un serveur multimédia cloud.

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

Valeur de propriété

Chemin d’accès à la source multimédia préférée.

Attributs

Exemples

Voici un code qui montre comment configurer Lire à par référence.

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

Remarques

PlayToSource.PreferredSourceUri active La lecture à par référence. Cela permet de diffuser en continu du contenu sur l’appareil cible Lire à partir d’un autre emplacement, tel qu’un serveur multimédia cloud. Cela permet aux pages web et à l’application UWP de lire du contenu protégé par la gestion des droits numériques (DRM). L’application spécifie un URI (Uniform Resource Identifier) préféré qui sera envoyé à l’appareil cible Lire à. Cet URI (Uniform Resource Identifier) peut pointer vers un serveur multimédia basé sur le cloud. Si la valeur PlayToSource.PreferredSourceUri est présente, l’appareil cible Lire à peut diffuser du contenu directement à partir du cloud, qui peut être protégé par la gestion des droits numériques (DRM), au lieu de diffuser en continu du contenu à partir de l’ordinateur Windows qui doit être du contenu non protégé.

Une barre oblique (« / ») est ajoutée à la chaîne URI (Uniform Resource Identifier) lorsqu’elle est envoyée via le réseau à un appareil Play To. Cette opération est effectuée pour être conforme aux normes URI (Uniform Resource Identifier).

S’applique à