Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Methods

  • enableCameraAutoFocus(enable: boolean): Promise<number>
    • Set whether to enable automatic face detection
    • Note: This API only works on Android and iOS.

    Parameters

    • enable: boolean

    Returns Promise<number>

    0: successful; negative number: failed

  • enableCameraTorch(enable: boolean): Promise<boolean>
    • Enable/Disable flash
    • Note: This API only works on Android and iOS.

    Parameters

    • enable: boolean

    Returns Promise<boolean>

  • getCameraZoomMaxRatio(): Promise<number>
    • Get the camera’s maximum zoom level
    • Note: This API only works on Android and iOS.

    Returns Promise<number>

    Maximum zoom level

  • isAutoFocusEnabled(): Promise<boolean>
    • Get whether automatic face detection is supported
    • Note: This API only works on Android and iOS.

    Returns Promise<boolean>

    Returned value: true: supported; false: not supported

  • isFrontCamera(): Promise<boolean>
    • Set whether to use the front camera
    • Note: This API only works on Android and iOS.

    Returns Promise<boolean>

  • setAudioRoute(route: number): Promise<void>
    • 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 is the speaker via which audio is played.

    Parameters

    • route: number

    Returns Promise<void>

  • setCameraFocusPosition(x: number, y: number): Promise<void>
    • Set camera focus
    • Note: This API only works on Android and iOS.

    Parameters

    • x: number
    • y: number

    Returns Promise<void>

  • setCameraZoomRatio(value: number): Promise<void>
    • Set the camera’s zoom level (focal length)
    • Note: This API only works on Android and iOS.
    • Value range: 1-5. 1 indicates the widest angle of view (original), and 5 the narrowest angle of view (zoomed in). We recommend you set the maximum zoom level to 5 as video will be blurry if the zoom level exceeds 5.

    Parameters

    • value: number

    Returns Promise<void>

    0: successful; negative number: failed

  • setSystemVolumeType(type: number): Promise<void>
    • Set the type of system volume to use during a call
    • Note: This API only works on Android and iOS.
    • Most smartphones have two system volume types: call volume and media volume.
    • The SDK provides three control modes for system volume types: * TRTCCloudDef.TRTCSystemVolumeTypeAuto: Call volume is used for anchors and media volume for audience (not co-anchoring). This mode is suitable for live streaming scenarios. If you set the scenario to TRTCCloudDef.TRTC_APP_SCENE_LIVE or TRTCCloudDef.TRTC_APP_SCENE_VOICE_CHATROOM when calling enterRoom, the SDK will use this mode by default. * TRTCCloudDef.TRTCSystemVolumeTypeVOIP: Call volume is used throughout a call. This is suitable for conferencing scenarios. If you set the scenario to TRTCCloudDef.TRTC_APP_SCENE_VIDEOCALL or TRTCCloudDef.TRTC_APP_SCENE_AUDIOCALL when calling enterRoom, the SDK will use this mode by default. * TRTCCloudDef.TRTCSystemVolumeTypeMedia: Media volume is used throughout a call. This mode is not used often, only under special circumstances such as when the anchor uses an external sound card.
    • Notes: * For this API to work, you must call it before you call startLocalAudio(). *You are not advised to set the system volume type by yourself unless you have special requirements. Simply call enterRoom, specifying the scenario, and the SDK will automatically select a system volume type for you.

    Parameters

    • type: number

    Returns Promise<void>

  • switchCamera(isFrontCamera: boolean): Promise<void>
    • Switch the camera
    • Note: This API only works on Android and iOS.

    Parameters

    • isFrontCamera: boolean

    Returns Promise<void>

Generated using TypeDoc