Udostępnij za pośrednictwem


MediaStreamSource.Closed Event

Definition

Occurs when the MediaStreamSource is shutting down.

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

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

// Revoke with event_revoker
MediaStreamSource::Closed_revoker Closed(auto_revoke_t, TypedEventHandler<MediaStreamSource, MediaStreamSourceClosedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaStreamSource,MediaStreamSourceClosedEventArgs> Closed;
function onClosed(eventArgs) { /* Your code */ }
mediaStreamSource.addEventListener("closed", onClosed);
mediaStreamSource.removeEventListener("closed", onClosed);
- or -
mediaStreamSource.onclosed = onClosed;
Public Custom Event Closed As TypedEventHandler(Of MediaStreamSource, MediaStreamSourceClosedEventArgs) 

Event Type

Remarks

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.

Applies to

See also