MediaCapture.CameraStreamStateChanged 事件

定义

在相机流的状态更改时发生。

// 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) 

事件类型

Windows 要求

应用功能
backgroundMediaRecording

注解

当暂停或恢复录制、系统出于隐私原因丢弃帧或相机流丢失时,相机流的状态将更改。

适用于