MediaStreamSource.Closed MediaStreamSource.Closed MediaStreamSource.Closed MediaStreamSource.Closed MediaStreamSource.Closed Event


Occurs when the MediaStreamSource is shutting down.

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

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

// Revoke with event_revoker
Closed_revoker Closed(auto_revoke_t, TypedEventHandler<MediaStreamSource, MediaStreamSourceClosedEventArgs> const& handler) const;
public event TypedEventHandler<MediaStreamSource, MediaStreamSourceClosedEventArgs> Closed
Public Event Closed As TypedEventHandler (Of MediaStreamSource, MediaStreamSourceClosedEventArgs)
function onClosed(eventArgs){/* Your code */}

mediaStreamSource.addEventListener("closed", onClosed);
mediaStreamSource.removeEventListener("closed", onClosed);


If the MediaStreamSource is shutting down due to an error, the Reason property on the MediaStreamSourceClosedRequest object, which can be obtained from MediaStreamSourceClosedEventArgs, provides information about the nature of the error.

Upon receiving this event, the application should remove all of its event handlers from the MediaStreamSource object, and refrain from further use of this instance of the MediaStreamSource object.

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

See also