Overview

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

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

Basic Method

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

Room Management

MethodFunction
setAreaSet user’s area
setMediaModeSet media mode
setRoomModeSet room mode
joinRoomJoin a room
leaveRoomLeave a room
updateTokenUpdate Token
CallbackFunction
onJoinRoomSuccessCallback when the local user joins a room
onLeaveRoomCallback after the local user leaves 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 when a remote user joins the 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

MethodFunction
setAudioConfigSets audio parameters and application scenarios.
adjustRecordingSignalVolumeSet microphone volume
stopLocalAudioStreamStop broadcasting/Publishing audio (including starting collection, encoding, and stream publishing)
enableLoopbackRecordingEnable/Disable graphic card capture.
setAudioSourceTypeSet audio publishing type
CallbackFunction
onFirstLocalAudioFrameSentCallback on first local audio frame sent successfully
onLocalAudioStatsReporting audio streaming sending statistics in every 2s

Audio Subscription

MethodFunction
stopAllRemoteAudioStreamsStop/Receive all audio streaming data
stopRemoteAudioStreamStop/Receive audio streaming data of a specified user
adjustPlaybackSignalVolumeSet local playing volume
CallbackFunction
onRemoteAudioStoppedCallback when a remote user stops broadcasting/publishing audio streams
onRemoteAudioStatsOfUidReporting remote audio streams statistics by user in every 2s

Video Publishing

MethodFunction
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 streaming (codes included)
CallbackFunction
onFirstLocalVideoFrameSentCallback when the first video frame is successfully sent
onLocalVideoStatsCallback every 2s, reporting video streaming sending statistics

Video Subscription

MethodFunction
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.
CallbackFunction
onRemoteVideoStoppedCallback on stopping/publishing user’s video stream
onRemoteVideoStatsOfUidReporting remote video streams statistics by user in every 2s
onRemoteVideoPlayCallback on displayed first remote video frame
onVideoSizeChangedCallback on change in local/remote video resolution

Network status

CallbackFunction
onNetworkQualityReporting the network statistics in every 2s
onNetworkTypeChangedCallback on network status change
onConnectionStatusCallback on server network connection status change
onConnectionLostCallback on lost network connection with a server

Publishing detection

N/A

Video mixing and stream publishing

MethodFunction
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
CallbackFunction
onPublishStreamToCDNStatusReporting CDN stream publishing result

Audio Recording

MethodFunction
startAudioRecordingStart audio recording
stopAudioRecordingStop audio recording

Cross-room Microphone Connection

MethodFunction
addSubscribeSubscribe a stream of the specified user in other rooms
removeSubscribeUnSubscribe a stream stream of the specified user in other rooms

Camera Management

N/A

Screen Sharing

MethodFunction
startScreenCaptureForHwndStart screen capturing specific window
startScreenCaptureForScreenStart screen capturing a specific region on desktop
updateScreenCaptureRectUpdate the region of screen capturing
stopScreenCaptureStop screen capturing the desktop or window
pauseScreenCapturePause screen capturing the desktop or window
resumeScreenCaptureResume screen capturing the desktop or window

Real-time Watermark

MethodFunction
setVideoWatermarkSet video watermark
removeVideoWatermarksRemove video watermark

Video Dual Stream

N/A

Audio Player

MethodFunction
createThunderAudioPlayerCreate audio file player objectIThunderAudioPlayer
destroyThunderAudioPlayerDestroy the audio file player objectIThunderAudioPlayer
MethodFunction
openOpen an file for accompaniment
closeClose an file for accompaniment
playStart playing the file
StopStop playing the file
pausePause playing the file
resumeResume playing the file
seekSeek time for playing the file
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
CallbackFunction
onAudioFileVolumeReporting the playing progress
onAudioFilePlayEndReporting the playing-end status

Voice Change and Reverb

N/A

Voice Positioning

N/A

Volume Prompt

MethodFunction
setAudioVolumeIndicationEnable/Disable speaker volume callback
CallbackFunction
onPlayVolumeIndicationReporting the speakers' volume

Voice Routing

N/A

In-ear Monitor

N/A

Audio Device Management

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

MethodFunction
getAudioDeviceMgrGet pointers of audio/video device management objects
MethodFunction
enumInputDevicesEnumerate audio input devices
setInputtingDeviceSet audio input devices for capturing
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)
CallbackFunction
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.

MethodFunction
getVideoDeviceMgrGet the pointer of the video device management object
MethodFunction
enumVideoDevicesEnumerate video input devices
startVideoDeviceCaptureStart video device capturing
stopVideoDeviceCaptureStop video device capturing
enumMonitorDevicesEnumerate monitor input devices
CallbackFunction
onVideoCaptureStatusReporting the camera capturing status

Media extra information

MethodFunction
registerMediaExtraInfoObserverRegister the monitored object of media extra information IThunderMediaExtraInfoObserver
sendMediaExtraInfoSend media extra information
CallbackFunction
onSendMediaExtraInfoFailedStatusCallback on failure in sending media extra information
onRecvMediaExtraInfoReceived media extra information
onRecvMixAudioInfoReceived extra information of mixed audio stream
onRecvMixVideoInfoReceived extra information of mixed video stream

Audio Raw Data

MethodFunction
registerAudioFrameObserverRegister a observer 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
  • the IAudioFrameObserver interface class reports the information of the Audio Raw Data information.
CallbackFunction
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)

Video Raw Data

MethodFunction
registerVideoFrameObserverRegister video monitor object IVideoFrameObserver
registerVideoCaptureObserverRegister monitoring object for camera data capture IVideoCaptureObserver.
  • the IVideoFrameObserver interface class reports the Video Raw Data (rendering & preview)information.
CallbackFunction
onPreviewVideoFrameOccurs when local video preview data is returned.
onRenderVideoFrameCallback on rendering video data of other users
CallbackFunction
onCaptureVideoFrameCallback on video data collected locally

Custom Audio Capture

MethodFunction
setCustomAudioSourceSet parameters of external audio capturing
pushCustomAudioFramePublishing an external audio frame

Custom Video Capture

MethodFunction
setCustomVideoSourceSet parameters for external video capturing
pushCustomVideoFramePublishing external video frame

Audio Self-rendering

N/A

Video Self-rendering

N/A

Custom Messages

MethodFunction
sendUserAppMsgDataSend custom broadcasting message
CallbackFunction
onRecvUserAppMsgDataReporting custom broadcasting message
onSendAppMsgDataFailedStatusCallback on failure when sending broadcasting message

Log Management

MethodFunction
setLogFilePathSet a directory for SDK to write the log files
setLogLevelSet the log levels

Other methods

MethodFunction
enableWebSdkCompatibilityEnable/Disable WebSDK compatibility
<