CoreWebView2ScreenCaptureStartingEventArgs Class
Event args for the CoreWebView2.ScreenCaptureStarting event.
Summary
Members | Description |
---|---|
Cancel | The host may set this flag to TRUE to cancel the screen capture. |
Handled | The host may set this flag to TRUE to prevent the ScreenCaptureStarting event from firing on the CoreWebView2 as well. |
OriginalSourceFrameInfo | The frame info of the frame where the screen capture starting request originated. |
GetDeferral | Returns a Deferral object. |
Properties
Cancel
bool Cancel
The host may set this flag to TRUE
to cancel the screen capture.
If canceled, the screen capture UI is not displayed regardless of the Handled
property. On the script side, it will return with a NotAllowedError as Permission denied.
Handled
bool Handled
The host may set this flag to TRUE
to prevent the ScreenCaptureStarting
event from firing on the CoreWebView2
as well.
By default, both the ScreenCaptureStarting
event handlers on the CoreWebView2Frame
and the CoreWebView2
will be invoked, with the CoreWebView2Frame
event handlers invoked first. The host may set this flag to TRUE
within the CoreWebView2Frame
event handlers to prevent the remaining CoreWebView2
event handlers from being invoked. If the flag is set to FALSE
within the CoreWebView2Frame
event handlers, downstream handlers can update the Cancel
property.
OriginalSourceFrameInfo
readonly CoreWebView2FrameInfo OriginalSourceFrameInfo
The frame info of the frame where the screen capture starting request originated.
Methods
GetDeferral
Deferral GetDeferral()
Returns a Deferral object. Use this deferral to defer the decision to show the Screen Capture UI. getDisplayMedia() won't call its callbacks until the deferral is completed.