PlayToSource.PreferredSourceUri | preferredSourceUri property

Applies to Windows only

Specifies a preferred Uniform Resource Identifier (URI) for the media stream, such as a cloud based media server, used is used for Play To by reference.

Syntax


var preferredSourceUri = playToSource.preferredSourceUri;
playToSource.preferredSourceUri = preferredSourceUri;

Property value

Type: Windows.Foundation.Uri [JavaScript] | System.Uri [.NET] | Windows::Foundation::Uri [C++]

The preferred URI to stream the media from.

Remarks

Play To by reference enables web pages and Windows Store apps to play Digital Rights Management (DRM) protected content. The app specifies a preferred URI that will be sent to the PlayTo target device. This URI can point to a cloud based media server. If the preferredSourceUri is present, the PlayTo target device can stream content directly from the cloud, which can be DRM protected, instead of streaming content from the Windows 8.1 machine which must be unprotected content.

Examples

Here is some code that shows how to set up PlayTo by reference.



// video is a MediaElement defined in XAML
using Windows.Foundation;

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




<video src="http://www.contoso.com/videos/video.mp4" 
   x-ms-playToPreferredSourceUri="http://www.contoso.com/catalogid=1234" /> 


var video = document.createElement('video'); 
document.body.appendChild(video); 

video.src = "http://www.contoso.com/videos/video.mp4"; 
video.msPlayToPreferredSourceUri = "http://www.contoso.com/catalogid=1234"; 

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

PlayToSource

 

 

Show:
© 2014 Microsoft