Skip to main content
MediaStreamSource.SwitchStreamsRequested | switchstreamsrequested event

Applies to Windows and Windows Phone

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

Syntax


function onSwitchStreamsRequested(eventArgs) { /* Your code */ }
 
// addEventListener syntax
mediaStreamSource.addEventListener("switchstreamsrequested", onSwitchStreamsRequested);
mediaStreamSource.removeEventListener("switchstreamsrequested", onSwitchStreamsRequested);
 
- or -

mediaStreamSource.onswitchstreamsrequested = onSwitchStreamsRequested;

public event TypedEventHandler<MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs> SwitchStreamsRequested

Public Event SwitchStreamsRequested As TypedEventHandler(Of MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs)

public:
event TypedEventHandler<MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs>^ SwitchStreamsRequested {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

Delegate TypedEventHandler<MediaStreamSource, MediaStreamSourceSwitchStreamsRequestedEventArgs>

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

See also

MediaStreamSource