Method SelectSource
- Namespace
- DotNetBrowser.Capture.Handlers
- Assembly
- DotNetBrowser.dll
SelectSource(Source, AudioMode, NotificationVisibility)
Creates a StartSessionResponse that notifies the browser to use the given capture source.
public static StartSessionResponse SelectSource(Source source, AudioMode audioMode, NotificationVisibility notificationVisibility = NotificationVisibility.Show)
Parameters
sourceSourceThe content source to use for the capture.
audioModeAudioModeThe mode of capturing the audio from the browser.
notificationVisibilityNotificationVisibilityThe visibility of the capture session notification.
Returns
- StartSessionResponse
The StartSessionResponse instance that can be used as a return value in StartSessionHandler implementation.
Remarks
The
source must be present in the
Sources received from the 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.
Exceptions
- ArgumentNullException
The
sourceis null.
SelectSource(IBrowser, AudioMode, NotificationVisibility)
Creates a StartSessionResponse that notifies the browser to use the given browser as the capture source.
public static StartSessionResponse SelectSource(IBrowser browser, AudioMode audioMode, NotificationVisibility notificationVisibility = NotificationVisibility.Show)
Parameters
browserIBrowserThe browser which contents will be captured.
audioModeAudioModeThe mode of capturing the audio from the browser.
notificationVisibilityNotificationVisibilityThe visibility of the capture session notification.
Returns
- StartSessionResponse
The StartSessionResponse instance that can be used as a return value in StartSessionHandler implementation.
Remarks
The passed browser instance and the browser instance requesting the capture session must be created by the same IEngine instance. Otherwise, the content capture will be cancelled.
Exceptions
- ArgumentNullException
The
browseris null.