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

The Jocloud SDK has a code ofThunderbolt, and a pure audio SDK for a mobile terminal has a code ofThunder.

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

Basic Method

createEngineCreate and initialize a ThunderEngine instance object.
createWithLoopCreate and initialize a ThunderEngine instance object, and specifying a running thread of a callback function in a ThunderEventHandler class.
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 after room joining succeeds
onLeaveRoomCallback upon leaving a room
onSdkAuthResultCallback on SDK authentication result. For authentication details, refer to "User Authentication Description" on official website.
onUserBannedCallback on user banned
onUserJoinedCallback on user joining a current room
onUserOfflineCallback on user leaving a current room
onRoomStatsCallback on uplink/downlink traffic (periodic callback at an interval of 2 seconds)
onBizAuthResultCallback on service authentication results
onTokenWillExpireCallback on token to be expired
onTokenRequestedCallback on token expired

Audio Publishing

setAudioConfigSet an audio mode
setAudioSourceTypeSet audio publishing mode
setMicVolumeSet microphone volume
stopLocalAudioStreamAudio Publishing (including enabling capture, encoding and stream publishing)
onFirstLocalAudioFrameSentCallback on first local audio frame sent successfully
onLocalAudioStatsStatistics callback for local audio streams

Audio Subscription

stopAllRemoteAudioStreamsStop/Receive all audio data
stopRemoteAudioStreamStop/Receive audio data of specified users
setRemoteAudioStreamsVolumeSet a local playing volume of a certain remote user
onRemoteAudioStoppedCallback on enabling/disabling remote user’s audio stream
onRemoteAudioStatsOfUidStatistics callback for remote audio streams

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 a scaling mode of a local canvas
setLocalVideoMirrorModeSet local video mirror mode
stopLocalVideoStreamStop/Start the sending of a local video (codes included)
onFirstLocalVideoFrameSentCallback on first local video frame sent successfully
onLocalVideoStatsCallback on local video stream statistics

Video Subscription

stopAllRemoteVideoStreamsStop/Receive all video data
stopRemoteVideoStreamStop/Receive specified video data
setRemoteCanvasScaleModeSet a scaling mode of a remote canvas
setMultiVideoViewLayoutSet layout parameters of a rendering canvas of multi-user microphone connection
setRemoteVideoCanvasSet the rendering view of the remote video
setRemotePlayTypeSet the type of remote user’s rendering canvas
onRemoteVideoStoppedCallback on stopping/publishing user’s video stream
onRemoteVideoStatsOfUidStatistics callback for remote video streams
onRemoteVideoPlayCallback on displayed first remote video frame
onVideoSizeChangedCallback on changed resolution of a subscribed video

Network status

onNetworkQualityCallback on uplink and downlink network quality of a user
onNetworkTypeChangedCallback on network status change
onConnectionStatusCallback on server network connection status
onConnectionLostCallback on lost network connection with a server

Publishing detection


Video mixing and stream publishing

setLiveTranscodingTaskAdd/update transcoding task
removeLiveTranscodingTaskRemove a transcoding task
addPublishTranscodingStreamUrlAdd a stream publishing address of a transcoding stream
removePublishTranscodingStreamUrlRemove a stream publishing address of a transcoding stream
addPublishOriginStreamUrlAdd the source stream publishing address
removePublishOriginStreamUrlRemove the source stream publishing address
enableMixVideoExtraInfoEnable video mixing with media extra information
syncMediaPlayingProgressSynchronize a play progress of external audio accompaniment or video accompaniment to synchronize the audio mixing or video mixing
onPublishStreamToCDNStatusCallback on CDN stream publishing result

Audio Recording

startAudioSaverStart saving audio data in aac format
stopAudioSaverStop saving audio data in aac format

Cross-room Microphone Connection

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 a publishing angle of camera (landscape/portrait)

Screen Sharing


Real-time Watermark

setVideoWatermarkSet watermark of local video

Video Dual Stream


Audio Player

createAudioFilePlayerCreate an instance object ThunderAudioFilePlayer of an audio file player
destroyAudioFilePlayerDestroy an instance objectThunderAudioFilePlayer of an audio file player
openOpen an accompaniment file
closeClose an accompaniment file
playStart playing
StopStop playing
seekJump to specified time for playing
getTotalPlayTimeMSGet total play time of a file
getCurrentPlayTimeMSGet current play time of a file
setPlayVolumeSet the playing volume of current file
setPlayerLocalVolumeSet the local playing volume of a file
setPlayerPublishVolumeSet the remote playing volume of a file
getPlayerLocalVolumeGet the local playing volume of a file
getPlayerPublishVolumeGet the remote playing volume of a file
getAudioTrackCountGet the number of audio tracks
selectAudioTrackSelect an audio track
setSemitoneSet a tone for audio playing
setLoopingSet a looping count
enablePublishWhether to use a currently played file as a live accompaniment
setPlayerNotifySet a play callback interface ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback
enableVolumeIndicationEnable Callback on a file playing volume ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback.onAudioFileVolume
setMixStandardSet whether the accompaniment is a standard stream for video mixing
isMixStandardQuery whether the accompaniment is a standard stream for video mixing
onAudioFilePlayErrorCallback on audio file callback error
onAudioFileVolumeCallback on audio file playing volume
onAudioFileSeekCompleteCallback on completion of fast forwarding to specified time
onAudioFilePlayingCallback on starting playing
onAudioFilePauseCallback on pausing playing
onAudioFileResumeCallback on resuming playing
onAudioFileStopCallback on playback being stopped by user
onAudioFilePlayEndCallback on ending playback

Voice Change and Reverb

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

Voice Positioning

enableVoicePositionEnable/Disable voice stereo of remote users
setRemoteUidVoicePositionSet space positions and volumes of voice stereo of remote users

Volume Prompt

enableCaptureVolumeIndicationEnable/Disable capture volume callback
setAudioVolumeIndicationEnable/Disable speaker volume callback
onCaptureVolumeIndicationCallback on capture volume
onPlayVolumeIndicationCallback on speaker volume

Voice Routing

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

In-ear Monitor

setEnableInEarMonitorEnable/Disable in-ear monitor

Audio Device Management

onAudioCaptureStatusCallback on changes in audio device capture status

Video Device Management

onVideoCaptureStatusNotification of change in camera capture status

Media extra information

setMediaExtraInfoCallbackSet callback monitoringIThunderMediaExtraInfoCallback on media extra information
sendMediaExtraInfoSend media extra information
onSendMediaExtraInfoFailedStatusCallback on failure in sending secondary media information
onRecvMediaExtraInfoReceived media extra information
onRecvMixAudioInfoReceived extra information of mixed audio stream
onRecvMixVideoInfoReceived extra information of mixed video stream

Raw Audio Data

enableAudioPlaySpectrumEnable/Disable data callback onAudioPlaySpectrumData of audio play spectrum
setAudioPlaySpectrumInfoSet callback information of audio play spectrum data
enableCapturePcmDataCallBackEnable/Disable callback onAudioCapturePcmData of captured audio data
setRecordingAudioFrameParametersSet a format for callback on captured raw data
setPlaybackAudioFrameParametersSet a format for callback on play data
registerAudioFrameObserverRegister an audio observer object IAudioFrameObserver
onAudioPlaySpectrumDataCallback on audio play spectrum data
onAudioCapturePcmDataCallback on audio capture data
onRecordAudioFrameCallback on raw audio capture data
onPlaybackAudioFrameCallback on raw audio play data
onPlaybackAudioFrameBeforeMixingCallback on raw data decoded by remote audio users

Raw Video Data

registerVideoCaptureTextureObserverRegistering a video capture texture observer for IGPUProcess, such as beauty processing
registerVideoCaptureFrameObserverRegistering a video capture frame observer IVideoCaptureObserver
onInitAllowing users to use third-party special effects
onDestroyDestroying resources of special effects
onDrawRendering each frame
onOutputSizeChangedCallback on updating a texture size
onCaptureVideoFrameCallback on capture video frame

Custom Audio Capture

setCustomAudioSourceSet parameters of external audio capture
pushCustomAudioFramePushing an external audio frame
setExternalAudioProcessorSet external audio processor

Custom Video Capture

setCustomVideoSourceSet customized video source

Audio Self-rendering

enableRenderPcmDataCallBackEnabling/disabling callback onAudioRenderPcmData of rendered audio data
onAudioRenderPcmDataCallback on audio rendering data

Video Self-rendering

registerVideoDecodeFrameObserverRegistering a decoded YUV (I420) video data observer IVideoDecodeObserver
onVideoDecodeFrameCallback on decoded YUV (I420) video data

Custom Messages

sendUserAppMsgDataSending custom broadcast messages to a developer
onRecvUserAppMsgDataCallback on custom broadcast messages received by a developer
onSendAppMsgDataFailedStatusCallback on failure in sending custom broadcast messages to a developer

Log Management

setLogFilePathSetting directory for SDK to output log files
setLogLevelSetting log levels
setLogCallbackSetting log callback IThunderLogCallback
onThunderLogWithLevelCallback on log information

Other methods

enableWebSdkCompatibilityEnable/Disable WebSDK compatibility