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 ofThunderbolt, and a pure audio SDK for a mobile terminal has a code ofThunder.

  • ThunderEngine interface class provides all the methods that can be called by applications.
  • ThunderEventDelegate interface class enables callbacks to your application.

Basic Method

createEngineCreate a ThunderEngine instance and initialize
destroyEngineDestroy a ThunderEngine instance
setThunderEventDelegateSet SDK callback event delegate
getVersionGet SDK version information

Room Management

setAreaSet user’s area
setSceneIdSet scenario ID
setMediaModeSet media mode
setRoomModeSet room mode
joinRoomJoin a room
leaveRoomLeave a room
updateTokenUpdate token
onJoinRoomSuccessCallback when the local user joins a room
onLeaveRoomWithStatsCallback upon leaving a room
sdkAuthResultSDK authentication results notification. For details about authentication, refer to User Authentication Instructions on the official website
onUserBannedCallback on user banned
onUserJoinedCallback on remote user joining room
onUserOfflineCallback on remote user leaving current room
onRoomStatsCallback on uplink/downlink traffic (periodic callback at an interval of 2s)
bizAuthResultCallback on service authentication results
onTokenWillExpireCallback on token to be expired
thunderEngineTokenRequestCallback on expired authentication

Audio Publishing

setAudioConfigSet Audio Profiles
setMicVolumeSet microphone volume
stopLocalAudioStreamDisable/Enable local audio (including audio capture, encoding and upload)
setAudioSourceTypeSet publishing mode
onFirstLocalAudioFrameSentCallback on the first local audio frame sent
onLocalAudioStatsLocal audio statistics

Audio Subscription

stopAllRemoteAudioStreamsStop/Resume receiving all remote audio streams
stopRemoteAudioStreamStop/Resume receiving audio stream of a specified user
setPlayVolumeSet local playing volume of a user
onRemoteAudioStoppedCallback on stopping/starting remote user audio stream
onRemoteAudioStatsOfUidCallback on remote audio stream information during the call

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 local view display mode
stopLocalVideoStreamEnable/Disable local video sending
onFirstLocalVideoFrameSentCallback on the first local video frame sent
onLocalVideoStatsCallback on local video statistics

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
setRemoteVideoCanvasSet the rendering view of the remote video
setRemotePlayTypeSets the type of remote user's render view
setMultiVideoViewLayoutSet the layout parameters of the multi videos on the view
onRemoteVideoStoppedCallback when the remote user's video stream starts or stops
onRemoteVideoStatsOfUidReport statistics of remote user video stream
onRemoteVideoPlayCallback when displaying the first frame of remote video
onVideoSizeChangedOfUidCallback 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
thunderEngineConnectionLostCallback when losing connection with server

Publishing detection


Video mixing and stream publishing

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

Audio Recording

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

Cross-room Microphone Connection

addSubscribeSubscribe stream of specified user across the room
removeSubscribeCancel cross-room subscription of specified users

Camera Management

switchFrontCameraSwitch to front/rear camera
setVideoCaptureOrientationSet portrait/landscape, default is portrait. Available for publishing before preview.
setLocalVideoMirrorModeSet camera mirroring. Available for publishing before preview, valid for front camera only

Screen Sharing


Real-time Watermark

setVideoWatermarkAdd local video watermark

Video Dual Stream


Audio Player

createAudioFilePlayerCreate file player ThunderAudioFilePlayer object
destroyAudioFilePlayerDestroy file player ThunderAudioFilePlayer object
openOpen audio file, formats supported: mp3, aac, wav
closeClose audio file
playStart playing
StopStop playing
pausePause playing
resumeContinue to play
seekSkipping to specified play time
getTotalPlayTimeMSGet the total play time of files
getCurrentPlayTimeMSGet the time which has been played
setPlayerLocalVolumeAdjust volume of music file in mixed video being played locally. Please call this method in room
setPlayerPublishVolumeAdjust volume of music file in mixed video being played remotely. Please call this method in room
getPlayerLocalVolumeGet the local playing volume of the file
getPlayerPublishVolumeGet the remote playing volume of the file
setLoopingSet times of loop playbacks
setPlayerDelegateSet a player callback delegate
enableSpectrumEnable/Disable spectrum
enableVolumeIndicationCallback on turning on/off volume
setMixStandardSet whether the accompaniment is a standard stream for video mixing
isMixStandardQuery whether the accompaniment is a standard stream for video mixing
getCurrentSpectrumObtain spectrum information; value range [0-1]
onAudioFileVolumeCallback when playing volume
onAudioFilePlayEndCallback when end playing
onAudioFilePlayErrorCallback when audio file playing occur error
onAudioFilePlayingCallback when start playing
onAudioFilePauseCallback when pause playing
onAudioFileResumeCallback when resume playing
onAudioFileStopCallback when stop playing
onAudioFileSeekCompleteCallback when the audio file seeking is completed
onAudioFileStateChangeReport the status of the playing audio file

Sound change in reverb

setVoiceChangerSet voice change mode
setSoundEffectSet different sound effects
setEnableReverbEnable/Disable reverb
setReverbParamSet reverb parameters
setEnableEqualizerEnable/Disable equalizer
setEqGainsSet equalizer parameters
setEnableCompressorEnable/Disable compressor
setCompressorParamSet compressor parameters
setEnableLimiterEnable/Disable pressure limiter
setLimiterParamSet pressure limiter parameters

Voice Positioning

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

Volume Prompt

enableCaptureVolumeIndicationCallback on turning on/off microphone volume
setAudioVolumeIndicationCallback on turning on/off user volume
onCaptureVolumeIndicationReport the cpature volume
onPlayVolumeIndicationReport which users are speaking and the speakers' volume

Voice Routing

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

In-ear Monitor

setEnableInEarMonitorEnable/Disable ear monitor

Audio Device Management

onAudioCaptureStatusReport the status of the audio capture device

Video Device Management

onVideoCaptureStatusReport the status of the video capture device

Media extra information

setMediaExtraInfoDelegateSet callback delegate of media extra information ThunderMediaExtraInfoDelegate
sendMediaExtraInfoSend media extra information (during audio/video streaming)
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 on audio play spectrum
setAudioPlaySpectrumInfoSet audio playback spectrum parameters
enableCapturePcmDataCallBackEnable/Disable data callback on audio capture
syncMediaPlayingProgressSynchronize play progress of external accompaniment video for mixed video synchronization. Audio accompaniment and video accompaniment cannot be supported at the same time.
setRecordingAudioFrameParametersSet the mode for using raw audio recording data during callback onRecordAudioFrame
setPlaybackAudioFrameParametersSet the mode for using raw audio playback data during callback onPlaybackAudioFrame
onAudioPlaySpectrumDataCallback on audio play spectrum data
onRecordAudioFrameCallback on raw audio capture data
onPlaybackAudioFrameCallback on raw audio play data
onPlaybackAudioFrameBeforeMixingCallback of original data decoded by remote user can differentiate users through different uids

Raw Video Data

registerVideoCaptureFrameObserverSet the interface for callback on local video preprocessing
registerVideoDecodeFrameObserverCustomize decoding picture rendering
needThunderVideoCaptureFrameDataTypeDeclare to SDK data in which format is to be used
onVideoCaptureFrameReceive a frame of data from capture for processing and return processed data
onVideoCaptureFrameReturn original texture parameters and target texture parameters
onVideoDecodeFrameCustom rendering of a decoded image is to cut out the decoded image of SDK for custom rendering of services

Custom Audio Capture

enableCustomAudioSourceEnable external audio capture
pushCustomAudioRawDataPush external audio stream
pushCustomAudioSampleBufferPushing an external audio frame
disableCustomAudioSourceDisable external audio capture
audioCaptureStartAudio capture starts
audioCaptureDataCallback on audio capture data
audioCaptureStopAudio capture stops
audioRenderStartAudio rendering starts
audioRenderDataCallback on audio rendering data
audioRenderStopAudio rendering stops

Custom Video Capture

setCustomVideoSourceSet external video capture source
onInitializeInitialize video source
bufferTypeObtain Buffer type
onStartStart video source
onStopStop video source
onDisposeDispose video source
consumePixelBufferInterface for pushing raw video data
consumeRawDataInterface for pushing raw video data
consumeCMSampleBufferInterface for pushing raw video data

Audio Self-rendering

enableRenderPcmDataCallBackEnable/Disable callback on audio rending data
onAudioRenderPcmDataCallback audio rendering data

Video Self-rendering

registerVideoDecodeFrameObserverSet decoding data callback for video stream of a certain vid
onVideoDecodeFrameReceive decoded frame data from decoder

Custom Messages

sendUserAppMsgDataSending developer's custom broadcast messages
onRecvUserAppMsgDataCallback when received developer's custom broadcast messages
onSendAppMsgDataFailedStatusCallback on failures in sending custom broadcast message of service

Log Management

setLogFilePathSet directory for SDK to output log files. A directory with write permissions must be specified.
setLogLevelSet log levels
setLogCallbackSet log callback. Once log callback is set, setLogFilePath is invalid
onThunderRtcLogWithLevelCallback on log information

Other methods

enableWebSdkCompatibilityEnable/Disable WebSDK compatibility