Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RtcEngine

RtcEngine is the javascript object for control agora native sdk through react native bridge.

You can use the RtcEngine methods to create init

Other methods of the RtcEngine object serve for agora native sdk and set up error logging.

Hierarchy

  • RtcEngine

Index

Events

Properties

Methods

Events

Static startLastmileProbeTest

  • startLastmileProbeTest(config: LastmileProbeConfig): Promise<any>
  • start the lastmile probe test

    This method start the last-mile network probe test before joining a channel to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).

    Parameters

    • config: LastmileProbeConfig

      LastmileProbeConfig {@link LastmileProbeConfig}

    Returns Promise<any>

    Promise<{success, value}>

Properties

Static Private eventTypes

eventTypes: Set<string> = new Set<string>()

Methods

Static addInjectStreamUrl

  • addInjectStreamUrl(options: InjectStreamOption): Promise<any>
  • add inject stream url

    This method injects an online media stream to a live broadcast.

    Parameters

    • options: InjectStreamOption

    Returns Promise<any>

    Promise<{success, value}>

Static addPublishStreamUrl

  • addPublishStreamUrl(options: PublishStreamOption): Promise<any>
  • add publish stream url

    This method add publish stream by option.

    Parameters

    • options: PublishStreamOption

    Returns Promise<any>

    Promise<{success, value}>

Static addVideoWatermark

  • addVideoWatermark(options: ImageOption): Promise<any>
  • add video watermark

    This method adds video watermark to the local video.

    Parameters

    • options: ImageOption

    Returns Promise<any>

    Promise<{success, value}>

Static adjustAudioMixingPlayoutVolume

  • adjustAudioMixingPlayoutVolume(volume: number): void
  • adjust audio mixing playout volume

    This method adjusts audio mixing playout by the volume parameter

    Parameters

    • volume: number

    Returns void

Static adjustAudioMixingPublishVolume

  • adjustAudioMixingPublishVolume(volume: number): void
  • adjust audio mixing publish volume

    This method adjusts audio mixing publish by the volume paraemter

    Parameters

    • volume: number

    Returns void

Static adjustAudioMixingVolume

  • adjustAudioMixingVolume(volume: number): void
  • adjust audio mixing volume

    This method adjusts audio mixing volume by the volume number parameter

    Parameters

    • volume: number

    Returns void

Static adjustPlaybackSignalVolume

  • adjustPlaybackSignalVolume(volume: number): void
  • adjust playback signal volume

    This method adjusts playback signal by volume.

    Parameters

    • volume: number

    Returns void

Static adjustRecordingSignalVolume

  • adjustRecordingSignalVolume(volume: number): void
  • adjust recording signal volume

    This method adjusts recording your signal by volume.

    Parameters

    • volume: number

    Returns void

Static createDataStream

  • createDataStream(options: DataStreamOption): any
  • create data stream

    This method creates data stream with options

    Parameters

    • options: DataStreamOption

    Returns any

Static destroy

  • destroy(): Promise<any>
  • destroy

    This method stops event subscribe and destroy the RtcEngine instance's. You should call it, when you want to destroy the engine.

    Returns Promise<any>

    Promise<{success, value}>

Static disableAudio

  • disableAudio(): void

Static disableLastmileTest

  • disableLastmileTest(): Promise<any>
  • disable lastmile test

    This method disable the network connection qualit test.

    Returns Promise<any>

    Promise<{success, value}>

Static disableLocalAudio

  • disableLocalAudio(muted: boolean): void
  • mute local audio stream

    This method mutes the local audio stream by muted.

    Parameters

    • muted: boolean

    Returns void

Static disableVideo

  • disableVideo(): void

Static enableAudio

  • enableAudio(): void

Static enableAudioVolumeIndication

  • enableAudioVolumeIndication(interval: number, smooth: number): void
  • enable audio volume indication

    This method enables audio volume by interval and smooth

    Parameters

    • interval: number
    • smooth: number

    Returns void

Static enableDualStreamMode

  • enableDualStreamMode(enabled: boolean): Promise<any>
  • enable dual stream mode

    This method enables the dual stream by parameter mode.

    Parameters

    • enabled: boolean

    Returns Promise<any>

    Promise<{success, value}>

Static enableInEarMonitoring

  • enableInEarMonitoring(enabled: boolean): void
  • enable in-ear monitor

    This method enables in-ear monitoring by boolean parameter enabled

    Parameters

    • enabled: boolean

    Returns void

Static enableLastmileTest

  • enableLastmileTest(): Promise<any>
  • enable lastmile test

    This method enables the network connection qualit test.

    Returns Promise<any>

    Promise<{success, value}>

Static enableLocalAudio

  • enableLocalAudio(enabled: boolean): void
  • enable local audio

    This method enables local audio by the boolean parameter.

    Parameters

    • enabled: boolean

    Returns void

Static enableLocalVideo

  • enableLocalVideo(enabled: boolean): void
  • enable local video

    This method enables the local video by the boolean parameter.

    Parameters

    • enabled: boolean

    Returns void

Static enableSoundPositionIndication

  • enableSoundPositionIndication(enabled: boolean): Promise<any>
  • control stereo panning for remote users

    This method enables/disables stereo panning for remote users.

    Parameters

    • enabled: boolean

      boolean

    Returns Promise<any>

    Promise<{success, value}>

Static enableVideo

  • enableVideo(): void

Static enableWebSdkInteroperability

  • enableWebSdkInteroperability(enabled: boolean): Promise<any>
  • enable websdk interoperability

    This method used to enable websdk interoperability, so that it can connect with agora websdk apps.

    Parameters

    • enabled: boolean

    Returns Promise<any>

    Promise<{success, value}>

Static getAudioMixingCurrentPosition

  • getAudioMixingCurrentPosition(): Promise<any>
  • get audio mixing current position

    This method gets audio mixing current position value.

    Returns Promise<any>

    Promise<{success, value}>

Static getAudioMixingDuration

  • getAudioMixingDuration(): Promise<any>
  • get audio mixing duration

    This method gets the audio mixing duration

    Returns Promise<any>

    Promise<{success, value}>

Static getCallId

  • getCallId(): Promise<any>
  • get call id

    This method is used to get call id.

    Returns Promise<any>

    Promise<{success, value}>

Static getCameraMaxZoomFactor

  • getCameraMaxZoomFactor(): Promise<any>
  • get camera max zoom ratio

    This method gets the camera maximum zoom ratio.

    notice

    Android Only

    Returns Promise<any>

    Promise<{success, value}>

Static getConnectionState

  • getConnectionState(): any
  • get agora native sdk connection state

    This method gets agora native sdk connection state

    Returns any

    Promise<{success: true, state: (connection state)}>

Static getEffectsVolume

  • getEffectsVolume(): Promise<any>
  • get effects of volume

    This methods get audio mixing effects volume value.

    Returns Promise<any>

    Promise<{success, value}>

Static getSdkVersion

  • getSdkVersion(callback: Callback<any>, errorHandler?: Callback<any>): any
  • get sdk version

    This method gets the sdk version details and passed it into callback function

    Parameters

    • callback: Callback<any>

      to handle resolve from getSdkVersion

    • Optional errorHandler: Callback<any>

      to handle reject error from getSdkVersion

    Returns any

Static init

  • init(options: Option): void
  • Creates a RtcEngine Object internal.

    This method creates and start event observer. You should call this method once.

    example

    RtcEngine.init(option)

    Parameters

    • options: Option

      Defines the property of the client, see {@link Option} for details.

    Returns void

Static isCameraAutoFocusFaceModeSupported

  • isCameraAutoFocusFaceModeSupported(): Promise<any>
  • is camera auto focus face mode supported

    This method checks whether the camera mannual auto-face focus function is supported.

    Returns Promise<any>

    Promise<{success, value}>

Static isCameraExposurePositionSupported

  • isCameraExposurePositionSupported(): Promise<any>
  • is camera exposure position supported

    This method checks whether the camera mannual exposure function is supported.

    Returns Promise<any>

    Promise<{success, value}>

Static isCameraFocusSupported

  • isCameraFocusSupported(): Promise<any>
  • is camera focus supported

    This method checks whether the camera mannual focus function is supported.

    Returns Promise<any>

    Promise<{success, value}>

Static isCameraTorchSupported

  • isCameraTorchSupported(): Promise<any>
  • is camera torch supported

    This method checks whether the camera flash function is supported.

    Returns Promise<any>

    Promise<{success, value}>

Static isCameraZoomSupported

  • isCameraZoomSupported(): Promise<any>
  • is camera zoom supported

    This method checks whether the camera zoom function is supported.

    Returns Promise<any>

    Promise<{success, value}>

Static joinChannel

  • joinChannel(channelName: string, uid?: undefined | number, token?: undefined | string, info?: Object): void
  • join specified channel

    This method joins and begin rendering the video stream. when join succeeds. Otherwise, it will invoke error by the event

    Parameters

    • channelName: string
    • Optional uid: undefined | number
    • Optional token: undefined | string
    • Optional info: Object

    Returns void

Static leaveChannel

  • leaveChannel(): Promise<any>
  • leave channel

    This method leaves the joined channel, then your video view will not render ever. You should call it, when you dont need render video stream.

    Returns Promise<any>

    Promise<{success, value}>

Static methodisSpeakerphoneEnabled

  • methodisSpeakerphoneEnabled(callback: Callback<any>): void
  • check for mobile phone speaker enabled

    This method checks the phone speaker is enabled

    Parameters

    • callback: Callback<any>

    Returns void

Static muteAllRemoteAudioStreams

  • muteAllRemoteAudioStreams(muted: boolean): void
  • mute all remote audio streams

    This method mutes all remote audio streams by muted

    Parameters

    • muted: boolean

    Returns void

Static muteAllRemoteVideoStreams

  • muteAllRemoteVideoStreams(muted: boolean): void
  • mute all remote video streams

    This method mutes all remote streams by the boolean parameter.

    Parameters

    • muted: boolean

    Returns void

Static muteLocalAudioStream

  • muteLocalAudioStream(enabled: boolean): void
  • mute local audio stream

    This method sends/stops sending the local audio.

    Parameters

    • enabled: boolean

    Returns void

Static muteLocalVideoStream

  • muteLocalVideoStream(muted: boolean): void
  • mute local video stream

    This method mutes video stream by the boolean parameter.

    Parameters

    • muted: boolean

    Returns void

Static muteRemoteAudioStream

  • muteRemoteAudioStream(uid: number, muted: boolean): void
  • mute specified remote audio stream by muted

    This method mutes specified remote audio stream by number uid and boolean muted.

    Parameters

    • uid: number
    • muted: boolean

    Returns void

Static muteRemoteVideoStream

  • muteRemoteVideoStream(uid: number, muted: boolean): void
  • mute specified remote video stream.

    This method mutes remote video stream by the number of uid and boolean parameter.

    Parameters

    • uid: number
    • muted: boolean

    Returns void

Static off

  • off(eventType: string): void
  • remove event listeners

    This method unsubscribes specified eventType related all listeners. You should call this method when you want to unsubscribe some eventType.

    Parameters

    • eventType: string

    Returns void

Static on

  • on(eventType: string, listener: function): void
  • add event listener

    This method subscribes specified eventType and run listener. You should call this method at first.

    Parameters

    • eventType: string
    • listener: function
        • (...args: any[]): any
        • Parameters

          • Rest ...args: any[]

          Returns any

    Returns void

Static pauseAllEffects

  • pauseAllEffects(): Promise<any>
  • pause all effects for audio mixing

    This method pause all effects for audio mixing.

    Returns Promise<any>

    Promise<{success, value}>

Static pauseAudioMixing

  • pauseAudioMixing(): void

Static pauseEffect

  • pauseEffect(soundId: number): Promise<any>
  • pause the specified effect for audio mixing by soundid

    This method pauses the specified effect for audio mixing by soundid.

    Parameters

    • soundId: number

    Returns Promise<any>

    Promise<{success, value}>

Static playEffect

  • playEffect(options: PlayEffectOption): Promise<any>
  • play specified effect for audio mixing

    This methos plays the specified effect of audio mixing file by option config.

    Parameters

    • options: PlayEffectOption

    Returns Promise<any>

    Promise<{success, value}>

Static preloadEffect

  • preloadEffect(soundId: number, filepath: string): Promise<any>
  • preload effect for audio mixing file.

    This methods preloads the specified audio mixing file to memory by the soundid

    Parameters

    • soundId: number
    • filepath: string

    Returns Promise<any>

    Promise<{success, value}>

Static removclearVideoWatermarkse

  • removclearVideoWatermarkse(): Promise<any>
  • clear video watermarks

    This method removes the watermark image from the video stream added by addVideoWatermark.

    Returns Promise<any>

    Promise<{success, value}>

Static removeAllListeners

  • removeAllListeners(): void
  • remove all events listeners

    This method unsubscribes all eventTypes related listeners.

    Returns void

Static removeInjectStreamUrl

  • removeInjectStreamUrl(options: RemoveInjectStreamOption): Promise<any>
  • remove inject stream url

    This method removes stream by addInjectsStreamUrl.

    Parameters

    • options: RemoveInjectStreamOption

    Returns Promise<any>

    Promise<{success, value}>

Static removePublishStreamUrl

  • removePublishStreamUrl(options: RemovePublishStreamOption): Promise<any>
  • remove publish stream url

    This method remove publish stream by options.

    Parameters

    • options: RemovePublishStreamOption

    Returns Promise<any>

    Promise<{success, value}>

Static renewToken

  • renewToken(token: string): any
  • renew token

    This method renews a new token.

    Parameters

    • token: string

    Returns any

Static resumeAllEffects

  • resumeAllEffects(): Promise<any>
  • resume all audio mixing effects.

    This method resumes all audio mixing effects.

    Returns Promise<any>

    Promise<{success, value}>

Static resumeAudioMixing

  • resumeAudioMixing(): void

Static resumeEffect

  • resumeEffect(soundId: number): Promise<any>
  • resume audio mixing effect by the specified soundid

    This method resumes audio mixing effect by the specified soundid

    Parameters

    • soundId: number

    Returns Promise<any>

    Promise<{success, value}>

Static sendMessage

  • sendMessage(streamID: number, data: any, reliable: boolean, ordered: boolean): Promise<any>
  • send stream message

    This method sends stream message by specified uid

    Parameters

    • streamID: number
    • data: any
    • reliable: boolean
    • ordered: boolean

    Returns Promise<any>

    Promise<{success, value}>

Static setAudioMixingPosition

  • setAudioMixingPosition(pos: number): Promise<any>
  • set audio mixing position

    This method sets audio mixing position by the parameter pos

    Parameters

    • pos: number

    Returns Promise<any>

Static setAudioSessionOperationRestriction

  • setAudioSessionOperationRestriction(): void
  • set audio session operation restriction

    The SDK and the app can both configure the audio session by default. The app may occasionally use other apps or third-party components to manipulate the audio session and restrict the SDK from doing so. This method allows the app to restrict the SDK’s manipulation of the audio session. You can call this method at any time to return the control of the audio sessions to the SDK. This method restricts the SDK’s manipulation of the audio session. Any operation to the audio session relies solely on the app, other apps, or third-party components.

    notice

    iOS support only

    Returns void

Static setBeautyEffectOptions

  • setBeautyEffectOptions(enabled: boolean, options: BeautyOption): Promise<any>
  • video pre-process/post-process

    This method enables/disables image enhancement and sets the options.

    Parameters

    • enabled: boolean
    • options: BeautyOption

    Returns Promise<any>

    Promise<{success, value}>

Static setCameraAutoFocusFaceModeEnabled

  • setCameraAutoFocusFaceModeEnabled(enabled: boolean): Promise<any>
  • set enable auto focus face mode

    This method enables auto-focus face mode function.

    Parameters

    • enabled: boolean

      boolean

    Returns Promise<any>

    Promise<{success, value}>

Static setCameraCapturerConfiguration

  • setCameraCapturerConfiguration(config: CameraCapturerConfiguration): Promise<any>
  • set the camera capture preference.

    note: For a video call or live broadcast, generally the SDK controls the camera output parameters. When the default camera capture settings do not meet special requirements or cause performance problems, we recommend using this method to set the camera capture preference: If the resolution or frame rate of the captured raw video data are higher than those set by setVideoEncoderConfiguration, processing video frames requires extra CPU and RAM usage and degrades performance. We recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE(1) to avoid such problems. If you do not need local video preview or are willing to sacrifice preview quality, we recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE(1) to optimize CPU and RAM usage. If you want better quality for the local video preview, we recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PREVIEW(2).

    This method will set the camera capture preference.

    Parameters

    • config: CameraCapturerConfiguration

    Returns Promise<any>

    Promise<{success, value}>

Static setCameraExposurePosition

  • setCameraExposurePosition(options: PositionOption): Promise<any>
  • set camera exposure position

    This method sets the mannual exposure position.

    Parameters

    • options: PositionOption

    Returns Promise<any>

    Promise<{success, value}>

Static setCameraFocusPositionInPreview

  • setCameraFocusPositionInPreview(options: PositionOption): Promise<any>
  • set camera focus position in preview

    This method sets the mannual focus position.

    Parameters

    • options: PositionOption

    Returns Promise<any>

    Promise<{success, value}>

Static setCameraTorchOn

  • setCameraTorchOn(enabled: boolean): Promise<any>
  • set camera torch on

    This method enables the camera flash function.

    Parameters

    • enabled: boolean

    Returns Promise<any>

    Promise<{success, value}>

Static setCameraZoomFactor

  • setCameraZoomFactor(zoomFactor: number): Promise<any>
  • set camera zoom ratio

    This method sets the camera zoom ratio.

    Parameters

    • zoomFactor: number

    Returns Promise<any>

    Promise<{success, value}>

Static setClientRole

  • setClientRole(role: number): void
  • change the client role

    This method changes the client of role.

    Parameters

    • role: number

      (audience: 0, host: 1)

    Returns void

Static setDefaultAudioRouteToSpeakerphone

  • setDefaultAudioRouteToSpeakerphone(enabled: boolean): void
  • set default audio speaker

    This method set the default audio speaker enable or disable by pass boolean parameter.

    Parameters

    • enabled: boolean

    Returns void

Static setDefaultMuteAllRemoteAudioStreams

  • setDefaultMuteAllRemoteAudioStreams(enabled: boolean): void
  • set default mute all remote audio streams

    This method set default mute all remote audio streams enable or not by pass boolean parameter.

    Parameters

    • enabled: boolean

    Returns void

Static setDefaultMuteAllRemoteVideoStreams

  • setDefaultMuteAllRemoteVideoStreams(muted: boolean): void
  • set default mute all remote video stream

    This method mutes all remote video stream default by the boolean parameter.

    Parameters

    • muted: boolean

    Returns void

Static setEffectsVolume

  • setEffectsVolume(volume: number): Promise<any>
  • set effects volume

    This methods set audio mixing effects volume by float parameter.

    Parameters

    • volume: number

    Returns Promise<any>

    Promise<{success, value}>

Static setEnableSpeakerphone

  • setEnableSpeakerphone(enabled: boolean): void
  • set enable speaker phone

    This method set the speaker phone enable or disable by pass boolean parameter.

    Parameters

    • enabled: boolean

    Returns void

Static setInEarMonitoringVolume

  • setInEarMonitoringVolume(volume: number): void
  • set in-ear monitoring volume

    This method sets the in-ear-monitoring volume by number parameter volume

    Parameters

    • volume: number

    Returns void

Static setLiveTranscoding

  • setLiveTranscoding(options: LiveTranscodingOption): Promise<any>
  • set live transcoding

    This method sets the video layout and audio settings for CDN live.

    Parameters

    • options: LiveTranscodingOption

    Returns Promise<any>

    Promise<{success, value}>

Static setLocalPublishFallbackOption

  • setLocalPublishFallbackOption(option: number): Promise<any>
  • set local publish fallback

    This method sets the fallback option for the locally published video stream based on the network conditions.

    Parameters

    Returns Promise<any>

    Promise<{success, value}>

Static setLocalRenderMode

  • setLocalRenderMode(mode: number): void
  • set local video render mode

    This method calls native sdk render mode for local video.

    Parameters

    • mode: number

    Returns void

Static setLocalVideoMirrorMode

  • setLocalVideoMirrorMode(mode: number): Promise<any>
  • set local video mirror mode

    This method sets local video mirror mode

    Parameters

    • mode: number

    Returns Promise<any>

    Promise<{success, value}>

Static setLocalVoiceChanger

  • setLocalVoiceChanger(voiceChanger: number): Promise<any>
  • set local voice change

    This method changes local speaker voice with voiceChanger

    voicechanger

    value ranges [ 0: "The original voice", 1: "An old man’s voice", 2: "A little boy’s voice.", 3: "A little girl’s voice.", 4: "TBD", 5: "Ethereal vocal effects.", 6: "Hulk’s voice." ]

    Parameters

    • voiceChanger: number

      integer

    Returns Promise<any>

    Promise<{success, value}>

Static setLocalVoiceEqualization

  • setLocalVoiceEqualization(band: number, gain: number): void
  • set local voice equalization

    This method set local video equalization of band frequency by enum band number and number of gain

    Parameters

    • band: number
    • gain: number

    Returns void

Static setLocalVoicePitch

  • setLocalVoicePitch(pitch: number): void
  • set local voice pitch

    This method sets the local voice pitch by float parameter pitch

    Parameters

    • pitch: number

    Returns void

Static setLocalVoiceReverb

  • setLocalVoiceReverb(reverb: number, value: number): void
  • set local voice reverb

    This method sets local voice by reverb and value

    Parameters

    • reverb: number
    • value: number

    Returns void

Static setLocalVoiceReverbPreset

  • setLocalVoiceReverbPreset(preset: number): Promise<any>
  • set the preset local voice reverberation effect.

    This method sets the preset local voice reverberation effect.

    Parameters

    • preset: number

      integer

    Returns Promise<any>

    Promise<{success, value}>

Static setLog

  • setLog(filepath: string, level: number, maxfileSize: number): Promise<any>
  • set log file and log filter

    This method sets the log file generated path and specified the log level.

    Parameters

    • filepath: string

      string

    • level: number

      enum

    • maxfileSize: number

      integer (KB)

    Returns Promise<any>

    Promise<{success, value}>

Static setMixedAudioFrameParameters

  • setMixedAudioFrameParameters(options: MixedAudioFrameOption): Promise<any>
  • set mixed audio frame parameters

    This method Sets the audio frame format for the mixedAudioFrame callback.

    Parameters

    • options: MixedAudioFrameOption

    Returns Promise<any>

    Promise<{success, value}>

Static setPlaybackAudioFrameParameters

  • setPlaybackAudioFrameParameters(options: AudioFrameOption): Promise<any>
  • set playback audio frame parameters

    This method Sets the audio frame format for the playbackFrame callback.

    Parameters

    • options: AudioFrameOption

    Returns Promise<any>

    Promise<{success, value}>

Static setRecordingAudioFrameParameters

  • setRecordingAudioFrameParameters(options: AudioFrameOption): Promise<any>
  • set recording audio frame parameters

    This method Sets the audio recording format for the audioFrame callback.

    Parameters

    • options: AudioFrameOption

    Returns Promise<any>

    Promise<{success, value}>

Static setRemoteDefaultVideoStreamType

  • setRemoteDefaultVideoStreamType(options: DefaultVideoStreamOption): Promise<any>
  • set remote default video stream type

    This method sets the default video stream type.

    Parameters

    • options: DefaultVideoStreamOption

    Returns Promise<any>

    Promise<{success, value}>

Static setRemoteRenderMode

  • setRemoteRenderMode(uid: number, mode: number): void
  • set the specified remote video render mode

    This method calls native sdk render mode for the specified remote video.

    Parameters

    • uid: number
    • mode: number

    Returns void

Static setRemoteSubscribeFallbackOption

  • setRemoteSubscribeFallbackOption(option: number): Promise<any>
  • set remote publish fallback

    This method sets the fallback option for the remotely subscribed video stream based on the network conditions.

    Parameters

    Returns Promise<any>

    Promise<{success, value}>

Static setRemoteUserPriority

  • setRemoteUserPriority(uid: number, userPrority: number): Promise<any>
  • sets the priority of a remote user's media stream.

    note: Use this method with the setRemoteSubscribeFallbackOption method. If the fallback function is enabled for a subscribed stream, the SDK ensures the high-priority user gets the best possible stream quality.

    This method sets the priority of a remote user's media stream.

    Parameters

    • uid: number

      number

    • userPrority: number

    Returns Promise<any>

    Promise<{success, value}>

Static setRemoteVideoStreamType

  • setRemoteVideoStreamType(options: VideoStreamOption): Promise<any>
  • set remote video stream type

    This method sets the remote video stream type by uid and streamType.

    Parameters

    • options: VideoStreamOption

    Returns Promise<any>

    Promise<{success, value}>

Static setRemoteVoicePosition

  • setRemoteVoicePosition(uid: number, pan: number, gain: number): Promise<any>
  • set the sound position of a remote user

    This method sets the sound position of a remote user by uid

    pan

    0.0: the remote sound comes from the front. -1.0: the remote sound comes from the left. 1.0: the remote sound comes from the right.

    Parameters

    • uid: number

      number | The ID of the remote user

    • pan: number

      float | The sound position of the remote user. The value ranges from -1.0 to 1.0

    • gain: number

      float | Gain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain.

    Returns Promise<any>

    Promise<{success, value}>

Static setVolumeOfEffect

  • setVolumeOfEffect(volume: number): Promise<any>
  • set volume for playing effects.

    This methods set for playing audio mixing effects

    Parameters

    • volume: number

    Returns Promise<any>

    Promise<{success, value}>

Static setupLocalVideo

  • setupLocalVideo(options: VideoOption): void
  • show local video

    This method calls native sdk render canvas for local video.

    Parameters

    • options: VideoOption

    Returns void

Static setupRemoteVideo

  • setupRemoteVideo(options: VideoOption): void
  • show remote video

    This method calls native sdk render canvas for remote video.

    Parameters

    • options: VideoOption

    Returns void

Static startAudioMixing

  • startAudioMixing(options: AudioMixingOption): void
  • start audio mixing

    This method will start audio mixing by option config

    Parameters

    • options: AudioMixingOption

    Returns void

Static startAudioRecording

  • startAudioRecording(options: AudioRecordingOption): Promise<any>
  • start audio recording by quality

    This method start audio recording by quality config

    Parameters

    • options: AudioRecordingOption

    Returns Promise<any>

    Promise<{success, value}>

Static startEchoTestWithInterval

  • startEchoTestWithInterval(interval: number): Promise<any>
  • start an audio call test.

    note: Call this method before joining a channel. After calling this method, call the stopEchoTest method to end the test. Otherwise, the app cannot run the next echo test, or call the joinchannel method. In the Live-broadcast profile, only a host can call this method. This method will start an audio call test with interval parameter. In the audio call test, you record your voice. If the recording plays back within the set time interval, the audio devices and the network connection are working properly.

    Parameters

    • interval: number

      number

    Returns Promise<any>

    Promise<{success, value}>

Static startPreview

  • startPreview(): void

Static stopAllEffects

  • stopAllEffects(): Promise<any>
  • stop play all for effect audio mixing.

    This methods stops all effect audio mixing.

    Returns Promise<any>

    Promise<{success, value}>

Static stopAudioMixing

  • stopAudioMixing(): void

Static stopAudioRecording

  • stopAudioRecording(): Promise<any>
  • stop audio recording

    This method stops audio recording.

    Returns Promise<any>

    Promise<{success, value}>

Static stopEchoTest

  • stopEchoTest(): Promise<any>
  • stop echo test

    This method stop launched an audio call test.

    Returns Promise<any>

    Promise<{success, value}>

Static stopEffect

  • stopEffect(soundId: number): Promise<any>
  • stop play effect for audio mixing

    This methods stops the specified effect for audio mixing file by soundid.

    Parameters

    • soundId: number

    Returns Promise<any>

    Promise<{success, value}>

Static stopLastmileProbeTest

  • stopLastmileProbeTest(): Promise<any>
  • stop the lastmile probe test

    This method stop the lastmile probe test.

    Returns Promise<any>

    Promise<{success, value}>

Static stopPreview

  • stopPreview(): void

Static switchCamera

  • switchCamera(): Promise<any>
  • switch camera

    This method switches camera between front and rear.

    Returns Promise<any>

    Promise<{success, value}>

Static unloadEffect

  • unloadEffect(soundId: number): Promise<any>
  • unload effect

    This methods unload the already loaded audio mixing file from memory by the soundid.

    Parameters

    • soundId: number

    Returns Promise<any>

    Promise<{success, value}>

Generated using TypeDoc