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

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

setAreaSet user’s area
setSceneIdSet a scenario ID
setMediaModeSet media mode
setRoomModeSet room mode
joinRoomJoin a room
leaveRoomLeave a room
updateTokenUpdate Token
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

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

Audio Subscription

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
onRemoteAudioStoppedCallback when the remote user's audio stream starts or stops
onRemoteAudioStatsOfUidReport status message of remote audio stream

Video Publishing

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)
onFirstLocalVideoFrameSentCallback when first local video frame sent successfully
onLocalVideoStatsReport statistics of local video stream

Video Subscription

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
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

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


Video mixing and stream publishing

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
onPublishStreamToCDNStatusReport the result of pushing stream to the CDN

Audio Recording

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

Cross-room subscription

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

Camera Management

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

Screen Sharing


Real-time Watermark

setVideoWatermarkSet watermark of local video

Video Dual Stream


Audio Player

createAudioFilePlayerCreate an instance object of an audio file player ThunderAudioFilePlayer
destroyAudioFilePlayerDestroy an instance object of an audio file player ThunderAudioFilePlayer
openOpen an accompaniment file
closeClose an accompaniment file
playStart playing
StopStop playing
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
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

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

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

Volume Prompt

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

Voice Routing

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

In-ear Monitor

setEnableInEarMonitorEnable/Disable in-ear monitor

Audio Device Management

onAudioCaptureStatusCallback when the audio device capture status changes

Video Device Management

onVideoCaptureStatusCallback when the video device capture status changes

Media extra information

setMediaExtraInfoCallbackSet callback monitoring of media extra information IThunderMediaExtraInfoCallback
sendMediaExtraInfoSend media extra information
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

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
onAudioPlaySpectrumDataReport the audio playback spectrum data
onRecordAudioFrameReport the raw audio capture data
onPlaybackAudioFrameReport the raw audio play data
onPlaybackAudioFrameBeforeMixingReport the raw decoded audio data of remote user

Raw Video Data

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
onInitAllowing users to use third-party special effects
onDestroyDestroying resources of special effects
onDrawProcess every frame
onOutputSizeChangedCallback when the texture size update
onCaptureVideoFrameReport the capture video frame data
onVideoDecodeFrameReport the decoded YUV (I420) video data

Custom Audio Capture

setCustomAudioSourceSet parameters of external audio source
pushCustomAudioFramePushing an external audio frame

Custom Video Capture

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

Custom Messages

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

Log Management

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

Other methods

enableWebSdkCompatibilityEnable/Disable WebSDK compatibility