MediaStreamSource.Starting MediaStreamSource.Starting MediaStreamSource.Starting MediaStreamSource.Starting MediaStreamSource.Starting Event


Occurs when the MediaStreamSource is ready to start requesting MediaStreamSample objects. The event can specify a position in the media time-line from which the first MediaStreamSample should be delivered.

public : event TypedEventHandler<MediaStreamSource, MediaStreamSourceStartingEventArgs> Starting
// Register
event_token Starting(TypedEventHandler<MediaStreamSource, MediaStreamSourceStartingEventArgs> const& handler) const;

// Revoke with event_token
void Starting(event_token const& cookie) const;

// Revoke with event_revoker
Starting_revoker Starting(auto_revoke_t, TypedEventHandler<MediaStreamSource, MediaStreamSourceStartingEventArgs> const& handler) const;
public event TypedEventHandler<MediaStreamSource, MediaStreamSourceStartingEventArgs> Starting
Public Event Starting As TypedEventHandler (Of MediaStreamSource, MediaStreamSourceStartingEventArgs)
function onStarting(eventArgs){/* Your code */}

mediaStreamSource.addEventListener("starting", onStarting);
mediaStreamSource.removeEventListener("starting", onStarting);


The MediaStreamSource raises this event before it starts requesting MediaStreamSamples for the first time. It also raises the event when it resumes requesting MediaStreamSamples after a Paused event has occurred.

Upon receiving this event, the application must invoke the SetActualStartPosition method on the MediaStreamSourceStartingRequest object to specify the actual position in the time-line from which MediaStreamSample objects will be retrieved.

This event cancels any SampleRequested events the application has not delivered the requested MediaStreamSample for. However, application must still invoke the Complete method on the MediaStreamSourceSampleRequestDeferral object for any previous SampleRequested events.

Applications are only required to have a handler for the Starting event if MediaStreamSource.CanSeek is set to true and they support seeking.

See also