MediaCapture.CaptureDeviceExclusiveControlStatusChanged 이벤트

정의

캡처 디바이스의 배타적 제어 상태 변경되면 발생합니다.

// Register
event_token CaptureDeviceExclusiveControlStatusChanged(TypedEventHandler<MediaCapture, MediaCaptureDeviceExclusiveControlStatusChangedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaCapture::CaptureDeviceExclusiveControlStatusChanged_revoker CaptureDeviceExclusiveControlStatusChanged(auto_revoke_t, TypedEventHandler<MediaCapture, MediaCaptureDeviceExclusiveControlStatusChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaCapture,MediaCaptureDeviceExclusiveControlStatusChangedEventArgs> CaptureDeviceExclusiveControlStatusChanged;
function onCaptureDeviceExclusiveControlStatusChanged(eventArgs) { /* Your code */ }
mediaCapture.addEventListener("capturedeviceexclusivecontrolstatuschanged", onCaptureDeviceExclusiveControlStatusChanged);
mediaCapture.removeEventListener("capturedeviceexclusivecontrolstatuschanged", onCaptureDeviceExclusiveControlStatusChanged);
- or -
mediaCapture.oncapturedeviceexclusivecontrolstatuschanged = onCaptureDeviceExclusiveControlStatusChanged;
Public Custom Event CaptureDeviceExclusiveControlStatusChanged As TypedEventHandler(Of MediaCapture, MediaCaptureDeviceExclusiveControlStatusChangedEventArgs) 

이벤트 유형

Windows 요구 사항

디바이스 패밀리
Windows 10 Creators Update (10.0.15063.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v4.0에서 도입되었습니다.)
앱 기능
backgroundMediaRecording

설명

앱이 캡처 디바이스를 단독으로 제어할 수 있는 경우 디바이스 설정을 수정할 수 있습니다. 캡처 디바이스를 단독으로 제어할 수 없는 앱은 미디어를 캡처할 수 있지만 캡처 설정을 변경할 수는 없습니다. 구조체를 InitializeAsync에 전달하기 전에 MediaCaptureInitializationSettings.SharingMode 속성을 ExclusiveControl로 설정하여 배타적 제어를 요청합니다. 다른 앱이 이미 디바이스에 대한 단독 액세스 권한이 있는 경우 배타적 제어를 요청하는 경우 InitializeAsync 호출이 실패합니다. 이 경우 CaptureDeviceExclusiveControlStatusChanged를 수신 대기할 수 있으며 MediaCaptureDeviceExclusiveControlStatusChangedEventArgs.Status 값이 ExclusiveControlAvailable인 경우 전용 컨트롤을 사용하여 MediaCapture 를 다시 초기화할 수 있습니다.

CaptureDeviceExclusiveControlStatusChanged 이벤트가 발생하고 MediaCaptureDeviceExclusiveControlStatusChangedEventArgs.Status의 값이 SharedReadOnlyAvailable이면 다른 앱이 디바이스의 단독 제어를 획득했습니다. 이 경우 다른 앱이 캡처 디바이스 설정을 조정할 수 있음을 사용자에게 알리도록 UI를 업데이트할 수 있습니다.

적용 대상