Overview

Jocloud offers various client SDKs, and has a flexible API combination. A global real-time communication network is connected trough SDK, to provide real-time audio/video communication services with stable and reliable quality for developers.

The Jocloud SDK has a code of Thunderbolt, and a pure audio SDK for a mobile terminal has a code of Thunder.

Notes: Unless otherwise specified, all callback events in the document are monitored through the ThunderEventHandler abstract class.

Basic Method

MethodFunction
createEngineCreate and initialize a ThunderEngine instance object.
createWithLoopCreate and initialize a ThunderEngine instance object, and specifying a running thread which the callback function of ThunderEventHandler class will be running in it.
destroyEngineDestroy the ThunderEngine instance object.
getVersionGet SDK version information.

Room Management

MethodFunction
setAreaSet user’s area
setSceneIdSet a scenario ID
setMediaModeSet media mode
setRoomModeSet room mode
joinRoomJoin a room
leaveRoomLeave a room
updateTokenUpdate Token
CallbackFunction
onJoinRoomSuccessCallback when the local user joins a room
onLeaveRoomCallback after leaving a room
onSdkAuthResultReport the SDK authentication result. For authentication details, refer to "User Authentication Description" on official website.
onUserBannedCallback when user is banned
onUserJoinedCallback when user join the current room
onUserOfflineCallback when user leave the current room
onRoomStatsReport upstream and downstream traffic data every two seconds
onBizAuthResultReport business authentication results
onTokenWillExpireReport token is about to expire
onTokenRequestedReport token has expired

Audio Publishing

MethodFunction
setAudioConfigSet an audio mode
setAudioSourceTypeSet the audio source type
setMicVolumeSet microphone volume
stopLocalAudioStreamAudio Publishing (including enabling capture, encoding and stream publishing)
CallbackFunction
onFirstLocalAudioFrameSentCallback when first local audio frame sent successfully
onLocalAudioStatsReport the statistics of the local audio stream

Audio Subscription

MethodFunction
stopAllRemoteAudioStreamsStop/Resume receiving all remote audio streams
stopRemoteAudioStreamStop/Resume receiving audio stream of a specified user
setRemoteAudioStreamsVolumeSet the volume of the specified user audio stream
CallbackFunction
onRemoteAudioStoppedCallback when the remote user's audio stream starts or stops
onRemoteAudioStatsOfUidReport status message of remote audio stream

Video Publishing

MethodFunction
setVideoEncoderConfigSet video encoding configuration
setLocalVideoCanvasSet the rendering canvas of a local video
enableLocalVideoCaptureEnable/Disable local video capture
startVideoPreviewStart video preview of local camera
stopVideoPreviewStop video preview of a local camera
setLocalCanvasScaleModeSet the scale mode of the local video stream on the canvas
setLocalVideoMirrorModeSet local video mirror mode
stopLocalVideoStreamStart/Stop the sending of a local video (included encoding)
CallbackFunction
onFirstLocalVideoFrameSentCallback when first local video frame sent successfully
onLocalVideoStatsReport statistics of local video stream

Video Subscription

MethodFunction
stopAllRemoteVideoStreamsStop/Resume receiving all remote video streams
stopRemoteVideoStreamStop/Resume receiving video stream of a specified user
setRemoteCanvasScaleModeSet the scale mode of the remote video stream on the canvas
setMultiVideoViewLayoutSet the layout parameters of the multi videos on the view
setRemoteVideoCanvasSet the rendering view of the remote video
setRemotePlayTypeSets the type of remote user's render view
CallbackFunction
onRemoteVideoStoppedCallback when the remote user's video stream starts or stops
onRemoteVideoStatsOfUidReport status message of remote video stream
onRemoteVideoPlayCallback when displaying the first frame of remote video
onVideoSizeChangedCallback when the resolution of local or remote video changes

Network status

CallbackFunction
onNetworkQualityReport the uplink and downlink network quality of each user
onNetworkTypeChangedCallback when the network type changes
onConnectionStatusReport the connection status with the server
onConnectionLostCallback when losing connection with server

Publishing Test

N/A

Video mixing and stream publishing

MethodFunction
setLiveTranscodingTaskAdd or update transcoding task
removeLiveTranscodingTaskRemove a transcoding task
addPublishTranscodingStreamUrlAdd a pushing address of transcoding stream
removePublishTranscodingStreamUrlRemove the pushing address of the transcoding stream
addPublishOriginStreamUrlAdd a pushing address of source stream
removePublishOriginStreamUrlRemove the pushing address of source stream
enableMixVideoExtraInfoEnable video mixing with extra information
CallbackFunction
onPublishStreamToCDNStatusReport the result of pushing stream to the CDN

Audio Recording

MethodFunction
startAudioSaverStart saving audio data as aac format file
stopAudioSaverStop saving audio data as aac format file

Cross-room subscription

MethodFunction
addSubscribeSubscribe stream of specified user across the room
removeSubscribeRemove the subscription of stream of specified user across the room

Camera Management

MethodFunction
switchFrontCameraSwitch front/rear camera
setVideoCaptureOrientationSet the capture orientation of camera video ( landscape / portrait )

Screen Sharing

N/A

Real-time Watermark

MethodFunction
setVideoWatermarkSet watermark of local video

Video Dual Stream

N/A

Audio Player

MethodFunction
createAudioFilePlayerCreate an instance object of an audio file player ThunderAudioFilePlayer
destroyAudioFilePlayerDestroy an instance object of an audio file player ThunderAudioFilePlayer
MethodFunction
openOpen an accompaniment file
closeClose an accompaniment file
playStart playing
StopStop playing
pausePause
resumeResume
seekJump to specified time for playing
getTotalPlayTimeMSGet total play time of the file
getCurrentPlayTimeMSGet current play time of the file
setPlayVolumeSet the playing volume of current file
setPlayerLocalVolumeSet the local playing volume of the file
setPlayerPublishVolumeSet the remote playing volume of the file
getPlayerLocalVolumeGet the local playing volume of the file
getPlayerPublishVolumeGet the remote playing volume of the file
getAudioTrackCountGet the number of audio tracks
selectAudioTrackSelect an audio track
setSemitoneSet the tone for audio playing
setLoopingSet times of loop playbacks
enablePublishEnable use current audio file as accompaniment in live
setPlayerNotifySet a playing callback interface ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback
enableVolumeIndicationEnable the ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback.onAudioFileVolume callback to report the volume of playing audio file
setMixStandardSet whether the accompaniment is a standard stream for video mixing
isMixStandardQuery whether the accompaniment is a standard stream for video mixing
CallbackFunction
onAudioFilePlayErrorCallback when audio file playing occur error
onAudioFileVolumeReport the volume of the playing audio file
onAudioFileSeekCompleteCallback when the audio file seeking is completed
onAudioFilePlayingCallback when start playing
onAudioFilePauseCallback when pause playing
onAudioFileResumeCallback when resume playing
onAudioFileStopCallback when stop playing
onAudioFilePlayEndCallback when end playing

Voice Change and Reverb

MethodFunction
setVoiceChangerSet voice change mode
setSoundEffectSet sound effect mode
setEnableEqualizerEnable/Disable local voice equalizer
setEqGainsSet voice equalizer parameters
setEnableReverbEnable/Disable local voice reverberation
setReverbExParameterSet local voice reverberation parameters
setEnableCompressorEnable/Disable audio compressor
setCompressorParamSet audio compressor parameters
setEnableLimiterEnable/Disable limiter
setLimiterParamSet limiter parameters

Voice Positioning

MethodFunction
enableVoicePositionEnable/Disable voice stereo of remote users
setRemoteUidVoicePositionSet spatial location and volume of remote user's voice

Volume Prompt

MethodFunction
enableCaptureVolumeIndicationEnable/Disable capture volume callback
setAudioVolumeIndicationEnable/Disable speaker volume callback
CallbackFunction
onCaptureVolumeIndicationReport the cpature volume
onPlayVolumeIndicationReport which users are speaking and the speakers' volume

Voice Routing

MethodFunction
isLoudspeakerEnabledQuery whether the loudspeaker is enabled at
enableLoudspeakerEnable a loudspeaker
setLoudSpeakerVolumeSet loudspeaker volume

In-ear Monitor

MethodFunction
setEnableInEarMonitorEnable/Disable in-ear monitor

Audio Device Management

CallbackFunction
onAudioCaptureStatusCallback when the audio device capture status changes

Video Device Management

CallbackFunction
onVideoCaptureStatusCallback when the video device capture status changes

Media extra information

MethodFunction
setMediaExtraInfoCallbackSet callback monitoring of media extra information IThunderMediaExtraInfoCallback
sendMediaExtraInfoSend media extra information
CallbackFunction
onSendMediaExtraInfoFailedStatusCallback when failure in sending media extra information
onRecvMediaExtraInfoCallback when received media extra information
onRecvMixAudioInfoCallback when received extra information of mixed audio stream
onRecvMixVideoInfoCallback when received extra information of mixed video stream

Raw Audio Data

MethodFunction
enableAudioPlaySpectrumEnable/Disable data callback of audio play spectrum onAudioPlaySpectrumData
setAudioPlaySpectrumInfoSet callback information of audio play spectrum data
setRecordingAudioFrameParametersSet a format for callback on captured raw data
setPlaybackAudioFrameParametersSet a format for callback on play data
registerAudioFrameObserverRegister an audio observer object IAudioFrameObserver
CallbackFunction
onAudioPlaySpectrumDataReport the audio playback spectrum data
CallbackFunction
onRecordAudioFrameReport the raw audio capture data
onPlaybackAudioFrameReport the raw audio play data
onPlaybackAudioFrameBeforeMixingReport the raw decoded audio data of remote user

Raw Video Data

MethodFunction
registerVideoCaptureTextureObserverRegistering a video capture texture observer for beauty processing IGPUProcess
registerVideoCaptureFrameObserverRegistering a video capture frame observer IVideoCaptureObserver
registerVideoDecodeFrameObserverRegistering a decoded YUV (I420) video data observer IVideoDecodeObserver
CallbackFunction
onInitAllowing users to use third-party special effects
onDestroyDestroying resources of special effects
onDrawProcess every frame
onOutputSizeChangedCallback when the texture size update
CallbackFunction
onCaptureVideoFrameReport the capture video frame data
CallbackFunction
onVideoDecodeFrameReport the decoded YUV (I420) video data

Custom Audio Capture

MethodFunction
setCustomAudioSourceSet parameters of external audio source
pushCustomAudioFramePushing an external audio frame

Custom Video Capture

MethodFunction
setCustomVideoSourceSet customized video source
CallbackFunction
onInitializeInitialize the video source
onStartStart the video source
onStopStop the video source
onDisposeRelease the video source
CallbackFunction
consumeByteArrayFrameMethod for pushing external raw video data

Custom Messages

MethodFunction
sendUserAppMsgDataSending developer's custom broadcast messages
CallbackFunction
onRecvUserAppMsgDataCallback when received developer's custom broadcast messages
onSendAppMsgDataFailedStatusCallback when failure in sending deveploper's custom broadcast messages

Log Management

MethodFunction
setLogFilePathSet directory for SDK to output log files
setLogLevelSet log levels
setLogCallbackSet log callback interface IThunderLogCallback
CallbackFunction
onThunderLogWithLevelReport the log information

Other methods

MethodFunction
enableWebSdkCompatibilityEnable/Disable WebSDK compatibility
<