CoreWebView2Frame.ScreenCaptureStarting Event

Definition

ScreenCaptureStarting event is raised when the Screen Capture API is requested by the user using getDisplayMedia().

public event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2ScreenCaptureStartingEventArgs> ScreenCaptureStarting;
member this.ScreenCaptureStarting : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2ScreenCaptureStartingEventArgs> 
Public Custom Event ScreenCaptureStarting As EventHandler(Of CoreWebView2ScreenCaptureStartingEventArgs) 

Event Type

Remarks

This relates to the ScreenCaptureStarting event on the CoreWebView2. Both these events will be raised in the case of an iframe requesting screen capture. The CoreWebView2Frame's event handlers will be invoked before the event handlers on the CoreWebView2. If the Handled property of the ScreenCaptureStartingEventArgs is set to TRUE within the CoreWebView2Frame event handler, then the event will not be raised on the CoreWebView2, and it's event handlers will not be invoked. In the case of nested iframes, the ScreenCaptureStarting event will be raised from the top level iframe. If a deferral is not taken on the event args, the subsequent scripts are blocked until the event handler returns. If a deferral is taken, the scripts are blocked until the deferral is completed.

Applies to