Dela via


MediaCapture.CameraStreamStateChanged Event

Definition

Occurs when the state of the camera stream changes.

// Register
event_token CameraStreamStateChanged(TypedEventHandler<MediaCapture, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
MediaCapture::CameraStreamStateChanged_revoker CameraStreamStateChanged(auto_revoke_t, TypedEventHandler<MediaCapture, IInspectable const&> const& handler) const;
public event TypedEventHandler<MediaCapture,object> CameraStreamStateChanged;
function onCameraStreamStateChanged(eventArgs) { /* Your code */ }
mediaCapture.addEventListener("camerastreamstatechanged", onCameraStreamStateChanged);
mediaCapture.removeEventListener("camerastreamstatechanged", onCameraStreamStateChanged);
- or -
mediaCapture.oncamerastreamstatechanged = onCameraStreamStateChanged;
Public Custom Event CameraStreamStateChanged As TypedEventHandler(Of MediaCapture, Object) 

Event Type

Windows requirements

App capabilities
backgroundMediaRecording

Remarks

The state of the camera stream will change when recording is paused or resumed, when the system drops frames for privacy reasons, or when the camera stream is lost.

Applies to