Jocloud provides various client SDKs with APIs that can be flexibly combined. SDK-based connection to globally-deployed real-time communication networks guarantees stable and reliable real-time audio/video communication services.

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

Note: Unless otherwise stated, event callbacks in this document are monitored through the IThunderEventHandler interface.

Basic Method

createEngineCreate the IThunderEngine instance
initializeInitialize the IThunderEngine object
destroyEngineDestroy the IThunderEngine object

Room Management

setAreaSet user’s area
setMediaModeSet media mode
setRoomModeSet room mode
joinRoomJoin a room
leaveRoomLeave a room
updateTokenUpdate Token
onJoinRoomSuccessSucceed in joining room
onLeaveRoomCallback upon leaving a room
onSdkAuthResultCallback on SDK authentication result. For authentication details, refer to “User Authentication Description” on official website.
onUserBannedCallback when a user is 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 2s)
onBizAuthResultCallback on service authentication results
onTokenWillExpireCallback on token to be expired
onTokenRequestCallback when token expires

Audio Publishing

setAudioConfigSets audio parameters and application scenarios.
adjustRecordingSignalVolumeSet microphone volume
stopLocalAudioStreamStop broadcasting/Publish audio (including starting collection, encoding, and stream push).
enableLoopbackRecordingEnable/Disable graphic card capture.
setAudioSourceTypeSet audio publishing type
onFirstLocalAudioFrameSentCallback on first local audio frame sent successfully
onLocalAudioStatsCallback when statistics on locally sent audio streams is returned

Audio Subscription

stopAllRemoteAudioStreamsStop/Receive all audio stream data
stopRemoteAudioStreamStop/Receive audio stream data of a specified user
adjustPlaybackSignalVolumeSet local global playing volume
onRemoteAudioStoppedCallback when a remote user stops broadcasting/publishes audio streams
onRemoteAudioStatsOfUidStatistics callback for remote audio streams

Video Publishing

setVideoEncoderConfigSet video encoding configuration
enableLocalVideoCaptureEnable/Disable local video capture
setLocalVideoCanvasSet the rendering canvas of a local video
startVideoPreviewEnable video preview
stopVideoPreviewDisable video preview
setLocalCanvasScaleModeSet a scaling mode of a local canvas
setLocalVideoMirrorModeSet local video mirror mode
stopLocalVideoStreamStop/Start the sending of a local video (codes included)
onFirstLocalVideoFrameSentCallback when the first video frame is successfully sent
onLocalVideoStatsCallback when statistics on locally sent video streams is returned

Video Subscription

stopAllRemoteVideoStreamsStop/Receive all video stream data
stopRemoteVideoStreamStop/Receive video stream data of a specified user
setRemoteCanvasScaleModeSet a scaling mode of a remote canvas
setRemoteVideoCanvasSet the rendering view of remote video stream.
onRemoteVideoStoppedCallback on stopping/publishing user’s video stream
onRemoteVideoStatsOfUidStatistics callback for remote video streams
onRemoteVideoPlayCallback on displayed first remote video frame
onVideoSizeChangedCallback on change in local/remote video resolution

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
removePublishTranscodingStreamUrlRemove a stream publishing address of a transcoding stream
addPublishTranscodingStreamUrlAdd 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
onPublishStreamToCDNStatusCallback on CDN stream publishing result

Audio Recording

startAudioRecordingStart audio recording
stopAudioRecordingStop audio recording

Cross-room Microphone Connection

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

Camera Management


Screen Sharing

startScreenCaptureForHwndStart capturing specific screen
startScreenCaptureForScreenStart capturing specific region on desktop
updateScreenCaptureRectUpdate the displayed region for capturing
stopScreenCaptureStop capturing the desktop or window
pauseScreenCapturePause capturing the desktop or window
resumeScreenCaptureResume capturing the desktop or window

Real-time Watermark

setVideoWatermarkSet watermark of local video
removeVideoWatermarksRemove local video watermark

Video Dual Stream


Audio Player

createThunderAudioPlayerCreate an object for audio file player IThunderAudioPlayer
destroyThunderAudioPlayerDestroy an object for audio file player IThunderAudioPlayer
openOpen an accompaniment file
closeClose the accompaniment file
playStart playing
StopStop playing
pausePause playing
resumeResume playing
seekJump to specified time for playing
getTotalPlayTimeMSObtain the total duration of the audio file
getCurrentPlayTimeMSObtain the current playback duration of the audio file
setPlayerLocalVolumeSet the local playing volume of the audio file
setPlayerPublishVolumeSet the remote playing volume of the audio file
getPlayerLocalVolumeObtain the local playing volume of the audio file
getPlayerPublishVolumeGet the remote playing volume of the audio file
setLoopingSet a looping count
SetFilePlayerNotifyCallback when the audio file player is configured
onAudioFileVolumeCallback on play progress information
onAudioFilePlayEndCallback on play end status

Voice Change and Reverb


Voice Positioning


Volume Prompt

setAudioVolumeIndicationEnable/Disable speaker volume callback
onPlayVolumeIndicationCallback on speaker volume

Voice Routing


Audio Device Management

Major methods are encapsulated in the IAudioDeviceManager interface class and obtain object pointers through the getAudioDeviceMgr interface.

getAudioDeviceMgrGet pointers of audio/video device management objects
enumInputDevicesEnumerate audio input devices
setInputtingDeviceSet audio input devices
getInputtingDeviceGet the currently selected audio input device
setInputtingVolumeSet the volume of the current audio input device
getInputtingVolumeGet the volume of the current audio input device
setInputtingMuteMute or unmute the current audio input device
getInputtingMuteGet the mute status of the current audio input device
startInputDeviceTestStart testing the current audio input device
stopInputDeviceTestStop testing the current audio input device
enumOutputDevicesEnumerate audio playback devices
setOutputtingDeviceSpecify the audio playback device
getOutputtingDeviceGet the current audio playback device
setOuttingVolumeSet the volume of the current playback device
getOuttingVolumeGet the volume of the current playback device
setOutputtingMuteMute/Unmute the current playback device
getOutputtingMuteGet the mute status of the current playback device
startOutputDeviceTestStart testing the current audio playback device
stopOutputDeviceTestStop testing the current audio playback device
enableMicEnhancementEnable/Disable microphone enhancement
enableMicDenoiseEnable/Disable microphone noise reduction
enableAECEnable/Disable AEC
enableAGCEnable/Disable Automatic Gain Control (AGC)
onAudioCaptureStatusCallback on changes in audio device capture status
onInputVolumeCallback on test volume of the current audio input device
onOutputVolumeCallback on test volume of the current audio playback device

Video Device Management

Major methods are encapsulated in the IVideoDeviceManager interface class and obtain object pointers through the getVideoDeviceMgr interface.

getVideoDeviceMgrGet pointers of video device management objects
enumVideoDevicesEnumerate video input devices
startVideoDeviceCaptureStart video device capture
stopVideoDeviceCaptureStop video device capture
enumMonitorDevicesEnumerate monitor input devices
onVideoCaptureStatusCallback on changes in camera capture status

Media extra information

registerMediaExtraInfoObserverRegister the monitored object of media secondary information IThunderMediaExtraInfoObserver
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

registerAudioFrameObserverRegister video monitored object IAudioFrameObserver
setRecordingAudioFrameParametersSet the mode for using raw audio recording data during callback onRecordAudioFrame
setPlaybackAudioFrameParametersSet the mode for using raw audio playback data during callback onPlaybackAudioFrame
onRecordAudioFrameCallback on raw audio capture data
onPlaybackAudioFrameCallback on raw audio play data
onPlaybackAudioFrameBeforeMixingCallback on raw data after the audio remote data decoding (differentiated among users)

Raw Video Data

registerVideoFrameObserverRegister video monitor object IVideoFrameObserver
registerVideoCaptureObserverRegister monitoring object for camera data capture IVideoCaptureObserver.
onPreviewVideoFrameOccurs when local video preview data is returned.
onRenderVideoFrameCallback on rendering video data of other users
onCaptureVideoFrameCallback on video data collected locally

Custom Audio Capture

setCustomAudioSourceSet parameters of external audio capture
pushCustomAudioFramePushing an external audio frame

Custom Video Capture

setCustomVideoSourceSet parameters for external video capture
pushCustomVideoFramePush external video frame

Audio Self-rendering


Video Self-rendering


Custom Messages

sendUserAppMsgDataSend custom broadcast message of service
onRecvUserAppMsgDataCallback custom broadcast message of service
onSendAppMsgDataFailedStatusCallback on failure to send customized broadcast message by the anchor

Log Management

setLogFilePathSetting directory for SDK to output log files
setLogLevelSetting log levels

Other methods

enableWebSdkCompatibilityEnable/Disable WebSDK compatibility mode