setInputDevice(videoDevice, [audioDevice])

Class: MediaPlayer.

Description:

Sets video device and audio device to use as video and audio source. Resets player and overrides previously set source.
To get a list of available devices and their details getters MediaPlayer > videoInputDevices and MediaPlayer > audioInputDevices can be used.

Parameters:

Name Type Description

videoDevice

VideoDevice | null

Video device object (camera or video capture card). Set to null to omit video device.

[audioDevice]

AudioDevice | null

Audio device object (microphone, audio capture card or system audio). Omit or set to null to omit audio device.

Returns:

Returns this component instance.

Type: MediaPlayer