PlayToReceiver.CurrentTimeChangeRequested | currenttimechangerequested event

Applies to Windows only

Occurs when the time location of the playback has changed.

Syntax


function onCurrentTimeChangeRequested(eventArgs) { /* Your code */ }
 
// addEventListener syntax
playToReceiver.addEventListener("currenttimechangerequested", onCurrentTimeChangeRequested);
playToReceiver.removeEventListener("currenttimechangerequested", onCurrentTimeChangeRequested);
 
- or -

playToReceiver.oncurrenttimechangerequested = onCurrentTimeChangeRequested;


Event information

Delegate TypedEventHandler<PlayToReceiver, CurrentTimeChangeRequestedEventArgs>

Remarks

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).


function receiver_CurrentTimeChangeRequested(args) {
    if (videoPlayer.currentTime !== 0 || args.time !== 0) {
        videoPlayer.currentTime = args.time / 1000;
    }
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

PlayToReceiver
Samples
Play To sample
PlayToReceiver sample
Media Server sample

 

 

Show:
© 2014 Microsoft