LocalMedia

abstract class LocalMedia

A representation of all the media devices available to the local participant, as well as helper methods for easier access for controlling those devices.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val audioDevices: List<AudioDevice>

The list of available audio devices.

Link copied to clipboard

Whether the camera can switch position (i.e. from front facing to back facing camera, and vice-versa).

Link copied to clipboard
abstract val cameraDevices: List<String>

The list of available camera devices.

Link copied to clipboard

The local participant's camera track if one is published.

Link copied to clipboard
abstract val isCameraEnabled: Boolean

Whether the camera is enabled.

Link copied to clipboard

Whether the microphone is enabled.

Link copied to clipboard

Whether screen sharing is enabled.

Link copied to clipboard

The local participant's microphone track if one is published.

Link copied to clipboard

The local participant's screen share track if one is published.

Link copied to clipboard
abstract val selectedAudioDevice: AudioDevice?

The current audio device in use, if it exists.

Link copied to clipboard
abstract val selectedCameraId: String?

The id of the current camera in use, if it exists.

Functions

Link copied to clipboard
abstract fun selectAudioDevice(audioDevice: AudioDevice)

Selects the audio device to be used.

Link copied to clipboard
abstract fun selectCamera(deviceName: String)

Selects the camera to be used.

Link copied to clipboard
abstract suspend fun setCameraEnabled(enabled: Boolean)

Enables/disables the camera track and publishes it if needed.

Link copied to clipboard
abstract suspend fun setMicrophoneEnabled(enabled: Boolean)

Enables/disables the microphone track and publishes it if needed.

Link copied to clipboard
abstract suspend fun setScreenShareEnabled(enabled: Boolean, params: ScreenCaptureParams? = null)

Enables/disables screen share track and publishes it if needed.

Link copied to clipboard
abstract fun switchCamera()

Switches the position of the camera, if able.