Show / Hide Table of Contents

Class ITXDeviceManager

TRTC device management APIs

Inheritance
System.Object
ITXDeviceManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: trtc
Assembly: cs.temp.dll.dll
Syntax
public abstract class ITXDeviceManager

Methods

enableCameraAutoFocus(Boolean)

Enable/Disable automatic face detection

Declaration
public abstract int enableCameraAutoFocus(bool enabled)
Parameters
Type Name Description
System.Boolean enabled

YES (default): enable; NO: disable

Returns
Type Description
System.Int32

If 0 is returned, the operation is successful; if a negative value is returned, the operation failed.

Remarks

This API is supported only on Android and iOS.

enableCameraTorch(Boolean)

Enable/Disable flash

Declaration
public abstract int enableCameraTorch(bool enabled)
Parameters
Type Name Description
System.Boolean enabled

YES: enable; NO (default): disable

Returns
Type Description
System.Int32

If 0 is returned, the operation is successful; if a negative value is returned, the operation failed.

Remarks

This API is supported only on Android and iOS.

getCameraZoomMaxRatio()

Get the maximum zoom level of the camera

Declaration
public abstract double getCameraZoomMaxRatio()
Returns
Type Description
System.Double
Remarks

This API is supported only on Android and iOS.

isAutoFocusEnabled()

Get whether automatic face detection is supported

Declaration
public abstract bool isAutoFocusEnabled()
Returns
Type Description
System.Boolean
Remarks

This API is supported only on Android and iOS.

isFrontCamera()

Get whether the front camera is in use

Declaration
public abstract bool isFrontCamera()
Returns
Type Description
System.Boolean
Remarks

This API is supported only on Android and iOS.

setAudioRoute(TXAudioRoute)

Set the audio route

The audio route concept is behind the hands-free mode of video calls in WeChat and Mobile QQ.

A mobile phone usually has two speakers: one at the top, whose volume is low, and the other at the bottom, whose volume is high.

The audio route determines the speaker via which audio is played.

Declaration
public abstract int setAudioRoute(TXAudioRoute route)
Parameters
Type Name Description
TXAudioRoute route

Audio route, i.e., whether to play audio via the speaker or receiver. Default value: TXAudioRouteSpeakerphone

Returns
Type Description
System.Int32

If 0 is returned, the operation is successful; if a negative value is returned, the operation failed.

Remarks

This API is supported only on Android and iOS.

setCameraFocusPosition(Int32, Int32)

Set camera focus @param position Focus position

Declaration
public abstract int setCameraFocusPosition(int x, int y)
Parameters
Type Name Description
System.Int32 x

Horizontal coordinate of the focus

System.Int32 y

Vertical coordinate of the focus

Returns
Type Description
System.Int32

If 0 is returned, the operation is successful; if a negative value is returned, the operation failed.

Remarks

This API is supported only on Android and iOS.

setCameraZoomRatio(Double)

Set the zoom level of the camera @param zoomRatio Value range: 1-5. 1 indicates the widest angle of view (original), and 5 the narrowest angle of view (zoomed in). Video will be blurry if the zoom level exceeds 5. The default value is 1.

Declaration
public abstract int setCameraZoomRatio(double zoomRatio)
Parameters
Type Name Description
System.Double zoomRatio

Zoom level

Returns
Type Description
System.Int32

If 0 is returned, the operation is successful; if a negative value is returned, the operation failed.

Remarks

This API is supported only on Android and iOS.

setSystemVolumeType(TXSystemVolumeType)

Set the type of system volume to use during a call @note

  1. This API must be called before startLocalAudio() to take effect.
  2. You can ignore this API if you don’t have special requirements. Just call enterRoom, specifying the scenario, and the SDK will automatically select a system volume type for you. @param type System volume type. For more information, please see TXSystemVolumeType. You are not advised to set this parameter by yourself unless you have special requirements.
Declaration
public abstract int setSystemVolumeType(TXSystemVolumeType type)
Parameters
Type Name Description
TXSystemVolumeType type

System volume type. You are not advised to set this parameter by yourself unless you have special requirements.

Returns
Type Description
System.Int32

If 0 is returned, the operation is successful; if a negative value is returned, the operation failed.

Remarks

This API is supported only on Android and iOS.

switchCamera(Boolean)

Switch the camera

Declaration
public abstract int switchCamera(bool frontCamera)
Parameters
Type Name Description
System.Boolean frontCamera

YES: switch to the front camera; NO: switch to the rear camera

Returns
Type Description
System.Int32

If 0 is returned, the operation is successful; if a negative value is returned, the operation failed.

Remarks

This API is supported only on Android and iOS.

In This Article
Back to top Generated by DocFX