Share via


MediaStreamSource.Starting Event

Definition

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.

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

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

// Revoke with event_revoker
MediaStreamSource::Starting_revoker Starting(auto_revoke_t, TypedEventHandler<MediaStreamSource, MediaStreamSourceStartingEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaStreamSource,MediaStreamSourceStartingEventArgs> Starting;
function onStarting(eventArgs) { /* Your code */ }
mediaStreamSource.addEventListener("starting", onStarting);
mediaStreamSource.removeEventListener("starting", onStarting);
- or -
mediaStreamSource.onstarting = onStarting;
Public Custom Event Starting As TypedEventHandler(Of MediaStreamSource, MediaStreamSourceStartingEventArgs) 

Event Type

Remarks

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.

Applies to

See also