MediaStreamSource.SwitchStreamsRequested MediaStreamSource.SwitchStreamsRequested MediaStreamSource.SwitchStreamsRequested MediaStreamSource.SwitchStreamsRequested MediaStreamSource.SwitchStreamsRequested Event

Definition

Occurs when the MediaStreamSource will stop requesting MediaStreamSample objects for a certain stream and will start requesting MediaStreamSample objects from a different stream instead.

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

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

// Revoke with event_revoker
SwitchStreamsRequested_revoker SwitchStreamsRequested(auto_revoke_t, TypedEventHandler<MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs> const& handler) const;
public event TypedEventHandler<MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs> SwitchStreamsRequested
Public Event SwitchStreamsRequested As TypedEventHandler (Of MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs)
function onSwitchStreamsRequested(eventArgs){/* Your code */}


mediaStreamSource.addEventListener("switchstreamsrequested", onSwitchStreamsRequested);
mediaStreamSource.removeEventListener("switchstreamsrequested", onSwitchStreamsRequested);

Remarks

This event can be raised when there are multiple audio stream descriptors or multiple video stream descriptors. Normally, only one audio stream and one video stream will be selected at any given time. This event is raised when the currently selected audio or video stream is replaced by a different stream.

The event is informational. Applications are not required to have a handler for this event.

See also