Class StartCaptureSessionCallback.Action
java.lang.Object
com.teamdev.jxbrowser.callback.AsyncCallbackAction<com.teamdev.jxbrowser.capture.internal.rpc.StartCaptureSession.Response>
com.teamdev.jxbrowser.browser.callback.StartCaptureSessionCallback.Action
- Enclosing interface:
- StartCaptureSessionCallback
public static final class StartCaptureSessionCallback.Action
extends AsyncCallbackAction<com.teamdev.jxbrowser.capture.internal.rpc.StartCaptureSession.Response>
An action to take in
StartCaptureSessionCallback.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Tells the browser that the capture session request should be canceled.voidselectSource(Browser browser, AudioCaptureMode audioCaptureMode) Tells the browser to use the given browser as the capture source.voidselectSource(Browser browser, AudioCaptureMode audioCaptureMode, NotificationVisibility notificationVisibility) Overloaded version ofselectSource(Browser, AudioCaptureMode)that allows specifying whether to show a notification during capture.voidselectSource(CaptureSource source, AudioCaptureMode audioCaptureMode) Tells the browser to use the given capture source.voidselectSource(CaptureSource source, AudioCaptureMode audioCaptureMode, NotificationVisibility notificationVisibility) Overloaded version ofselectSource(CaptureSource, AudioCaptureMode)that allows specifying whether to show a notification during capture.voidTells the browser to display the default dialog for choosing the capture source.Methods inherited from class com.teamdev.jxbrowser.callback.AsyncCallbackAction
isClosed
-
Constructor Details
-
Action
public Action(Consumer<com.teamdev.jxbrowser.capture.internal.rpc.StartCaptureSession.Response> consumer)
-
-
Method Details
-
selectSource
Tells the browser to use the given capture source.The
sourcemust be present in the capture sources received from theStartCaptureSessionCallback.Params.sources().If the screen capture is forbidden by the system security permissions the request will be cancelled. This is usual for macOS where the screen or application window capture must be explicitly allowed in the System Preferences.
- Parameters:
source- the content source to use for the captureaudioCaptureMode- the audio capture mode for the capture
-
selectSource
public void selectSource(CaptureSource source, AudioCaptureMode audioCaptureMode, NotificationVisibility notificationVisibility) Overloaded version ofselectSource(CaptureSource, AudioCaptureMode)that allows specifying whether to show a notification during capture.- Parameters:
source- the content source to use for the captureaudioCaptureMode- the audio capture mode for the capturenotificationVisibility- whether to show a capture notification while capturing is active- Since:
- 8.7.0
-
selectSource
Tells the browser to use the given browser as the capture source.The passed browser instance and the browser instance requesting the capture session must be created by the same
Engineinstance. Otherwise, the content capture will be cancelled.- Parameters:
browser- the browser which contents will be capturedaudioCaptureMode- the mode of capturing the audio from the browser
-
selectSource
public void selectSource(Browser browser, AudioCaptureMode audioCaptureMode, NotificationVisibility notificationVisibility) Overloaded version ofselectSource(Browser, AudioCaptureMode)that allows specifying whether to show a notification during capture.- Parameters:
browser- the browser which contents will be capturedaudioCaptureMode- the mode of capturing the audio from the browsernotificationVisibility- whether to show a capture notification while capturing is active- Since:
- 8.7.0
-
cancel
public void cancel()Tells the browser that the capture session request should be canceled. -
showSelectSourceDialog
public void showSelectSourceDialog()Tells the browser to display the default dialog for choosing the capture source.
-