PlayToReceiver class

Applies to Windows only

Represents a Play To target.

Syntax


public ref class PlayToReceiver sealed 

Attributes

[MarshalingBehavior(Standard)]
[Threading(Both)]
[Version(0x06020000)]

Members

The PlayToReceiver class has these types of members:

Constructors

The PlayToReceiver class has these constructors.

ConstructorDescription
PlayToReceiver Creates a new instance of a Play To receiver.

 

Events

The PlayToReceiver class has these events.

EventDescription
CurrentTimeChangeRequested Occurs when the time location of the playback has changed.
MuteChangeRequested Occurs when the audio has been muted or unmuted.
PauseRequested Occurs when audio or video playback has been paused.
PlaybackRateChangeRequested Occurs when the rate of audio or video playback has changed.
PlayRequested Occurs when audio or video playback starts.
SourceChangeRequested Occurs when the source media for the Play To receiver have changed.
StopRequested Occurs when a request has been made for the Play To receiver to stop playing the streamed media.
TimeUpdateRequested Occurs when the current playback position has changed.
VolumeChangeRequested Occurs when the volume for the source audio or video has changed.

 

Methods

The PlayToReceiver class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
NotifyDurationChange Notifies the Play To receiver that the duration of the audio or video playback has changed.
NotifyEnded Notifies the Play To receiver that the audio or video playback has ended.
NotifyError Notifies the Play To receiver that an error has occurred in displaying or playing the media.
NotifyLoadedMetadata Notifies the Play To receiver that metadata for the media has finished loading.
NotifyPaused Notifies the Play To receiver that the audio or video playback has been paused.
NotifyPlaying Notifies the Play To receiver that the audio or video playback has started.
NotifyRateChange Notifies the Play To receiver that the rate of the audio or video playback has changed.
NotifySeeked Notifies the Play To receiver that the audio or video playback element has started at a new playback location.
NotifySeeking Notifies the Play To receiver that the audio or video playback element is seeking a new playback location.
NotifyStopped Notifies the Play To receiver that the audio or video playback has stopped.
NotifyTimeUpdate Notifies the Play To receiver that the time location of the audio or video playback has changed.
NotifyVolumeChange Notifies the Play To receiver that the volume of the audio or video playback has changed.
StartAsync Start receiving Play To commands.
StopAsync Stop receiving Play To commands.

 

Properties

The PlayToReceiver class has these properties.

PropertyAccess typeDescription

FriendlyName

Read/writeGets or sets the display name of the Play To target.

Properties

Read-onlyGets a set of custom properties for the Play To receiver.

SupportsAudio

Read/writeGets or sets a value that indicates whether the Play To target supports audio.

SupportsImage

Read/writeGets or sets a value that indicates whether the Play To target supports images.

SupportsVideo

Read/writeGets or sets a value that indicates whether the Play To target supports video.

 

Remarks

You can use the PlayToReceiver class to create a custom software Play To receiver that is a digital media renderer for computers on your network. You can include a PlayToReceiver object in your app to handle communication with Play To client computers, and then play or display content streamed from those computers using your own media elements or controls.

The members of the PlayToReceiver class consist of the following:

In Play To, video starts from the current position. If you want to start the video from the beginning, simply seek to the beginning of the video as soon as the Play To connection is established.

For an example of creating a software Play To receiver, see Quickstart: Creating a Play To Receiver (JavaScript) or Quickstart: Creating a Play To Receiver (C#/VB).

No code example is currently available or this language may not be supported.

PlayTo apps will not be suspended as long as video or music is playing on the Play To receiver or images are continuously sent to the Play To receiver. Apps have approximately 10 seconds to send a new image after the current one is displayed and approximately 10 seconds to send the next audio or video after the current one has ended.

Note  : This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

Capabilities

privateNetworkClientServer

See also

Samples
Play To sample
PlayToReceiver sample
Media Server sample

 

 

Show:
© 2014 Microsoft