Udostępnij za pośrednictwem


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.

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

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

// Revoke with event_revoker
MediaStreamSource::SwitchStreamsRequested_revoker SwitchStreamsRequested(auto_revoke_t, TypedEventHandler<MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaStreamSource,MediaStreamSourceSwitchStreamsRequestedEventArgs> SwitchStreamsRequested;
function onSwitchStreamsRequested(eventArgs) { /* Your code */ }
mediaStreamSource.addEventListener("switchstreamsrequested", onSwitchStreamsRequested);
mediaStreamSource.removeEventListener("switchstreamsrequested", onSwitchStreamsRequested);
- or -
mediaStreamSource.onswitchstreamsrequested = onSwitchStreamsRequested;
Public Custom Event SwitchStreamsRequested As TypedEventHandler(Of MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs) 

Event Type

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.

Applies to

See also