Jocloud provides reliable QoE (quality of experience) for real-time audio/video communications through a global real-time network.

Thunderbolt SDKs refers to Jocloud audio and video SDKs, and Thunder SDKs refers to Jocloud audio-only SDKs.


Generally, all event callbacks in the document are listened to through ThunderEventHandler.

Basic APIs

createEngineCreate and initialize a ThunderEngine instance
createWithLoopCreate and initialize a ThunderEngine instance, and specify running threads of callbacks in the ThunderEventHandler class
destroyEngineDestroy the ThunderEngine instance
getVersionGet SDK version information

Room Management

setAreaSet user's country/region
setSceneIdSet a scenario ID
setMediaModeSet a media mode
setRoomModeSet a room mode
joinRoomJoin a room
leaveRoomExit a room
updateTokenUpdate the token
onJoinRoomSuccessCalled when a user joins a room
onLeaveRoomCalled when a user exits a room
onSdkAuthResultCalled for reporting SDK authentication results. See details in User Authentication
onUserBannedCalled when banning a user
onRoomStatsCalled every two seconds after joining a room for reporting the upstream and downstream traffic
onBizAuthResultCalled for reporting service authentication results
onTokenWillExpireCalled when a token is about to expire
onTokenRequestedCalled when a token expires

Audio Publishing

setAudioConfigSet an audio mode
setAudioSourceTypeSet the audio publishing mode
setMicVolumeSet the microphone volume
stopLocalAudioStreamPublish audio (including capture activation, encoding and streams pushing)
onFirstLocalAudioFrameSentCalled when the first local audio frame is sent
onLocalAudioStatsCalled for reporting statistics of the local audio streams
onLocalAudioStatusChangedCalled when the local video status changes

Audio Subscription

stopAllRemoteAudioStreamsStop/Resume receiving the audio data of all users
stopRemoteAudioStreamStop/Resume receiving audio stream of a specific user
setRemoteAudioStreamsVolumeSet the local playing volume for a remote user
onRemoteAudioStoppedCalled when starting/stopping sending the audio streams of a remote user
onRemoteAudioStatsOfUidCalled for reporting statistics of the remote audio streams
onRemoteAudioPlayCalled when the first frame playback of remote video is sent
onRemoteAudioStateChangedOfUidCalled when the video stream of remote users changes

Video Publishing

setVideoEncoderConfigSet video encoding parameters
setLocalVideoCanvasSet the local video renderer view
enableLocalVideoCaptureEnable/Disable local video capture
startVideoPreviewEnable local video preview
stopVideoPreviewDisable local video preview
setLocalCanvasScaleModeSet the local view scaling mode
setLocalVideoMirrorModeSet the local video mirroring mode
stopLocalVideoStreamStop/Resume sending the local video stream (including encoding information)
onFirstLocalVideoFrameSentCalled when the first local video frame is sent
onLocalVideoStatsCalled for reporting the statistics of local video stream
getVideoEncoderParamCalled for getting video coding parameters by coding gear

Video Subscription

stopAllRemoteVideoStreamsStop/Receive the video data of all users
stopRemoteVideoStreamStop/Receive video data of a specific user
setRemoteCanvasScaleModeSet the scaling mode of a remote video view
setMultiVideoViewLayoutSet layout parameters about renderer view of multi-person co-hosting
setRemoteVideoCanvasSet the remote video renderer view
setRemotePlayTypeSet the renderer view type of a remote user
onRemoteVideoStoppedCalled when a remote user stops/resumes publishing the video stream
onRemoteVideoStatsOfUidCalled when the remote video status changes
onRemoteVideoPlayCalled when the first remote video frame is displayed
onVideoSizeChangedCalled when the resolution of a subscribed video changes
onRemoteVideoStateChangedOfUidCalled when the remote video status changes

Network status

getConnectionStatusCalled every two seconds for reporting the network quality of each user
onNetworkQualityReport the uplink and downlink network quality of each user
onNetworkTypeChangedCalled when the network status changes
onConnectionStatusCalled when the connection status between the SDK and the server changes
onConnectionLostCalled when the SDK cannot reconnect to the server 10 seconds after its connection to the server is interrupted

Stream pushing to CDN

setLiveTranscodingTaskAdd/Update transcoding task
removeLiveTranscodingTaskDelete transcoding task
addPublishTranscodingStreamUrlPublish the transcoded stream to a specific address
removePublishTranscodingStreamUrlRemove the transcoded stream from a specific address
addPublishOriginStreamUrlPublish the source stream to a specific address
removePublishOriginStreamUrlRemove the source stream from a specific address
enableMixVideoExtraInfoEnable video mixing with SEI
onPublishStreamToCDNStatusCalled when the status of stream pushing to CDN changes

Audio Recording

startAudioSaverStart saving audio data in AAC format
stopAudioSaverStop saving audio data in AAC format

Cross-room subscription

addSubscribeSSubscribe to a specific user’s streams across rooms
removeSubscribeRemove a specific user’s streams subscribed to across rooms

Camera Management

switchFrontCameraSwitch front/rear camera
setVideoCaptureOrientationSet camera publishing orientation (landscape/portrait)

Screen Sharing

See Screen Sharing for method to implement the functions of screen sharing.

Real-time Watermark

setVideoWatermarkSet the watermark of local video

Video Dual Stream


Audio Player

createAudioFilePlayerCreate an audio player file instance ThunderAudioFilePlayer
destroyAudioFilePlayerDestroy an audio player file instance ThunderAudioFilePlayer
openOpen an accompaniment file
closeClose an accompaniment file
playStart playing a audio file
stopStop playing a audio file
pausePause playing a audio file
resumeResume playing a audio file
seekPlay in a specified time
getTotalPlayTimeMSGet the the duration of an audio file
getCurrentPlayTimeMSGet the current playing time of an audio file
setPlayVolumeSet current file’s output volume
setPlayerLocalVolumeSet the volume of an audio file for local playing
setPlayerPublishVolumeSet the volume of an audio file for remote playing
getPlayerLocalVolumeGet the volume of an audio file for local playing
getPlayerPublishVolumeGet the volume of an audio file for remote playing
getAudioTrackCountGet the number of audio tracks
selectAudioTrackSelect a audio track
setSemitoneSet the audio playing tone
setLoopingSet the number of audio playback loops
enablePublishUse the currently played audio file as accompaniment for live streaming
setPlayerNotifySet the playing callback ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback
enableVolumeIndicationEnable the callback of file playing volume ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback.onAudioFileVolume
setMixStandardWhether the accompaniment is the standard stream of stream mixing and transcoding
isMixStandardSearch whether the accompaniment is the standard stream of stream mixing and transcoding
onAudioFilePlayErrorCalled when the audio playing error occurs
onAudioFileVolumeCalled when audio playing volume changes
onAudioFileSeekCompleteCalled when fast forwarding to the appointed time
onAudioFilePlayingCalled when starting playing audios
onAudioFilePauseCalled when pause playing audios
onAudioFileResumeCalled when resume playing audios
onAudioFileStopCalled when stop playing audios
onAudioFilePlayEndCalled when end playing audios
onAudioFileVolumePlayback volume callback
onAudioFileStateChangePlayer status callback

Voice Change & Reverb

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

Voice Positioning

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

Howling Detection

enableHowlingDetectorEnable/Disable howling detection
onHowlingDetectResultCalled for reporting howling detection results

Echo Detection

enableEchoDetectorEnable/disable echo detection
onEchoDetectResultCallback of echo detection results

Volume Prompt

enableCaptureVolumeIndicationEnable/Disable the callback onCaptureVolumeIndication to report the capture volume of the microphone
setAudioVolumeIndicationEnable/Disable the callback onPlayVolumeIndication to report which users are speaking and the speakers' volume
onCaptureVolumeIndicationCalled when enabling/disabling volume capture
onPlayVolumeIndicationCalled when someone is speaking to report the speaker name and speaking volume

Voice Routing

isLoudspeakerEnabledSearch whether it is played by a loudspeaker
enableLoudspeakerEnable a loudspeaker
setLoudSpeakerVolumeSet loudspeaker volume
onAudioRouteChangedCalled when audio routing changes

In-ear Monitoring

setEnableInEarMonitorEnable/Disable in-ear monitoring

Audio Device Management

onAudioCaptureStatusCalled when the capture status of the audio device changes

Video Device Management

onVideoCaptureStatusCalled when the camera capture status changes

SEI (Supplemental Enhancement Information)

setMediaExtraInfoCallbackListen to the SEI callback IThunderMediaExtraInfoCallback
sendMediaExtraInfoSend SEI
onSendMediaExtraInfoFailedStatusCalled when sending SEI failed
onRecvMediaExtraInfoCalled when SEI is received
onRecvMixAudioInfoCalled when the mixed audio stream SEI is received
onRecvMixVideoInfoCalled when the mixed video stream SEI received

Raw Audio Data

enableAudioPlaySpectrumEnable/Disable the audio spectrum data callback onAudioPlaySpectrumData
setAudioPlaySpectrumInfoSet the information for audio spectrum data callback
enableCapturePcmDataCallBackEnable/Disable captured audio data callback onAudioCapturePcmData
setRecordingAudioFrameParametersSet the format for raw data capture callback
setPlaybackAudioFrameParametersSet format for playing data callback
registerAudioFrameObserverRegister an audio observer object IAudioFrameObserver
setMixedAudioFrameParametersSet the format of audio data mixed with the captured data and the playback data
onAudioPlaySpectrumDataCalled for reporting the audio playback spectrum data
onRecordAudioFrameCalled for retrieving the captured audio data
onPlaybackAudioFrameCalled for retrieving the audio playback frame for getting the audio of all users
onPlaybackAudioFrameBeforeMixingCalled for retrieving the raw audio data of a specific user before mixing
onMixedAudioFrameCallback of audio data mixed with the captured data and the playback data

Raw Video Data

registerVideoCaptureTextureObserverRegister a video texture capture observe object IGPUProcess
registerVideoCaptureFrameObserverRegistering a video capture frame observer IVideoCaptureObserver
registerVideoDecodeFrameObserverRegister a video capture observer object IVideoCaptureObserver
onInitCalled when users use the third-party effects to reporting the effect information
onDestroyCalled when destroying effects resources
onDrawCalled when rendering each frame
onOutputSizeChangedCalled when the texture size updates
onCaptureVideoFrameCalled for getting the original YUV video data captured by cameras
onVideoDecodeFrameCalled for reporting the decoded YUV (I420) video data

External Audio Data

setCustomAudioSourceSet external audio capture parameters
pushCustomAudioFramePush external audio frames

External Video Data

setCustomVideoSourceSet custom video sources
onInitializeInitialize the video source
onStartStart the video source
onStopStop the video source
onDisposeRelease the video source
consumeByteArrayFrameCalled for pushing external raw video data
consumeTextureFramePush video frames in texture

Custom Messages

sendUserAppMsgDataSend developer's custom broadcast messages
onRecvUserAppMsgDataCalled for receiving custom broadcast messages
onSendAppMsgDataFailedStatusCalled when sending custom broadcast messages failed

Log Management

setLogFilePathSet the saving path of log files outputed by the SDK
setLogLevelSet the log saving level
setLogCallbackSet log callback IThunderLogCallback
onThunderLogWithLevelCalled for reporting log informatio

Device Resource Monitoring

onDeviceStatsCPU/memory usage callback

Other APIs

enableWebSdkCompatibilityEnable/Disable web SDK compatibility

Was this page helpful?

Helpful Not helpful
Submitted! Your feedback would help us improve the website.