-
public abstract class LocalMediaA representation of all the media devices available to the local participant, as well as helper methods for easier access for controlling those devices.
-
-
Field Summary
Fields Modifier and Type Field Description private final TrackReferencemicrophoneTrackprivate final TrackReferencecameraTrackprivate final TrackReferencescreenShareTrackprivate final BooleanisMicrophoneEnabledprivate final BooleanisCameraEnabledprivate final BooleanisScreenShareEnabledprivate final List<AudioDevice>audioDevicesprivate final List<String>cameraDevicesprivate final AudioDeviceselectedAudioDeviceprivate final StringselectedCameraIdprivate final BooleancameraCanSwitchPosition
-
Constructor Summary
Constructors Constructor Description LocalMedia()
-
Method Summary
Modifier and Type Method Description abstract TrackReferencegetMicrophoneTrack()The local participant's microphone track if one is published. abstract TrackReferencegetCameraTrack()The local participant's camera track if one is published. abstract TrackReferencegetScreenShareTrack()The local participant's screen share track if one is published. abstract BooleangetIsMicrophoneEnabled()Whether the microphone is enabled. abstract BooleangetIsCameraEnabled()Whether the camera is enabled. abstract BooleangetIsScreenShareEnabled()Whether screen sharing is enabled. abstract List<AudioDevice>getAudioDevices()The list of available audio devices. abstract List<String>getCameraDevices()The list of available camera devices. abstract AudioDevicegetSelectedAudioDevice()The current audio device in use, if it exists. abstract StringgetSelectedCameraId()The id of the current camera in use, if it exists. abstract BooleangetCameraCanSwitchPosition()Whether the camera can switch position (i.e. abstract UnitsetMicrophoneEnabled(Boolean enabled)Enables/disables the microphone track and publishes it if needed. abstract UnitsetCameraEnabled(Boolean enabled)Enables/disables the camera track and publishes it if needed. abstract UnitsetScreenShareEnabled(Boolean enabled, ScreenCaptureParams params)Enables/disables screen share track and publishes it if needed. abstract UnitselectAudioDevice(AudioDevice audioDevice)Selects the audio device to be used. abstract UnitselectCamera(String deviceName)Selects the camera to be used. abstract UnitswitchCamera()Switches the position of the camera, if able. -
-
Method Detail
-
getMicrophoneTrack
abstract TrackReference getMicrophoneTrack()
The local participant's microphone track if one is published.
-
getCameraTrack
abstract TrackReference getCameraTrack()
The local participant's camera track if one is published.
-
getScreenShareTrack
abstract TrackReference getScreenShareTrack()
The local participant's screen share track if one is published.
-
getIsMicrophoneEnabled
abstract Boolean getIsMicrophoneEnabled()
Whether the microphone is enabled.
-
getIsCameraEnabled
abstract Boolean getIsCameraEnabled()
Whether the camera is enabled.
-
getIsScreenShareEnabled
abstract Boolean getIsScreenShareEnabled()
Whether screen sharing is enabled.
-
getAudioDevices
abstract List<AudioDevice> getAudioDevices()
The list of available audio devices.
-
getCameraDevices
abstract List<String> getCameraDevices()
The list of available camera devices.
-
getSelectedAudioDevice
abstract AudioDevice getSelectedAudioDevice()
The current audio device in use, if it exists.
-
getSelectedCameraId
abstract String getSelectedCameraId()
The id of the current camera in use, if it exists.
-
getCameraCanSwitchPosition
abstract Boolean getCameraCanSwitchPosition()
Whether the camera can switch position (i.e. from front facing to back facing camera, and vice-versa).
-
setMicrophoneEnabled
abstract Unit setMicrophoneEnabled(Boolean enabled)
Enables/disables the microphone track and publishes it if needed.
-
setCameraEnabled
abstract Unit setCameraEnabled(Boolean enabled)
Enables/disables the camera track and publishes it if needed.
-
setScreenShareEnabled
abstract Unit setScreenShareEnabled(Boolean enabled, ScreenCaptureParams params)
Enables/disables screen share track and publishes it if needed.
The result intent from starting android.media.projection.MediaProjectionManager.createScreenCaptureIntent is required for enabling this.
-
selectAudioDevice
abstract Unit selectAudioDevice(AudioDevice audioDevice)
Selects the audio device to be used.
-
selectCamera
abstract Unit selectCamera(String deviceName)
Selects the camera to be used.
-
switchCamera
abstract Unit switchCamera()
Switches the position of the camera, if able.
-
-
-
-