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 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

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
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

MethodFunction
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
CallbackFunction
onFirstLocalAudioFrameSentCallback on first local audio frame sent successfully
onLocalAudioStatsCallback when statistics on locally sent audio streams is returned

Audio Subscription

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

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 (codes included)
CallbackFunction
onFirstLocalVideoFrameSentCallback when the first video frame is successfully sent
onLocalVideoStatsCallback when statistics on locally sent video streams is returned

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
onRemoteVideoStatsOfUidStatistics callback for remote video streams
onRemoteVideoPlayCallback on displayed first remote video frame
onVideoSizeChangedCallback on change in local/remote video resolution

Network status

CallbackFunction
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

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
onPublishStreamToCDNStatusCallback on CDN stream publishing result

Audio Recording

MethodFunction
startAudioRecordingStart audio recording
stopAudioRecordingStop audio recording

Cross-room Microphone Connection

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

Camera Management

N/A

Screen Sharing

MethodFunction
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

MethodFunction
setVideoWatermarkSet watermark of local video
removeVideoWatermarksRemove local video watermark

Video Dual Stream

N/A

Audio Player

MethodFunction
createThunderAudioPlayerCreate an object for audio file player IThunderAudioPlayer
destroyThunderAudioPlayerDestroy an object for audio file player IThunderAudioPlayer
MethodFunction
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
CallbackFunction
onAudioFileVolumeCallback on play progress information
onAudioFilePlayEndCallback on play end status

Voice Change and Reverb

N/A

Voice Positioning

N/A

Volume Prompt

MethodFunction
setAudioVolumeIndicationEnable/Disable speaker volume callback
CallbackFunction
onPlayVolumeIndicationCallback on speaker volume

Voice Routing

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
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 pointers of video device management objects
MethodFunction
enumVideoDevicesEnumerate video input devices
startVideoDeviceCaptureStart video device capture
stopVideoDeviceCaptureStop video device capture
enumMonitorDevicesEnumerate monitor input devices
CallbackFunction
onVideoCaptureStatusCallback on changes in camera capture status

Media extra information

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

MethodFunction
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
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)

Raw Video Data

MethodFunction
registerVideoFrameObserverRegister video monitor object IVideoFrameObserver
registerVideoCaptureObserverRegister monitoring object for camera data capture IVideoCaptureObserver.
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 capture
pushCustomAudioFramePushing an external audio frame

Custom Video Capture

MethodFunction
setCustomVideoSourceSet parameters for external video capture
pushCustomVideoFramePush external video frame

Audio Self-rendering

N/A

Video Self-rendering

N/A

Custom Messages

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

Log Management

MethodFunction
setLogFilePathSetting directory for SDK to output log files
setLogLevelSetting log levels

Other methods

MethodFunction
enableWebSdkCompatibilityEnable/Disable WebSDK compatibility mode
<