Click or drag to resize

SelectMediaDeviceResponseSelect Method

Creates a SelectMediaDeviceResponse that notifies the engine that the given media input device should be used.

Namespace:  DotNetBrowser.Media.Handlers
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.27.16
Syntax
C#
public static SelectMediaDeviceResponse Select(
	MediaDevice defaultDevice
)

Parameters

defaultDevice
Type: DotNetBrowser.MediaMediaDevice
The media device to use. Must be the one from the list of the media input devices received from the Devices. If an invalid device is passed through this method, the first device from the list of media devices will be used.

Return Value

Type: SelectMediaDeviceResponse
The SelectMediaDeviceResponse instance that can be used as a return value in SelectMediaDeviceHandler.
Remarks

Only the selected device will be visible to JavaScript.

The defaultDevice must be one from the list of available devices in MediaDevices.

If an invalid device is passed to this method, the effect depends on what triggered the callback:

  • For getUserMedia() calls, the corresponding promise will be rejected with a NotFoundError.
  • For enumerateDevices() calls, all input devices will be excluded from the resulting device list.

See Also