Overview

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

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

Basic APIs

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

Room Management

APIDescription
setAreaSet user's country/region
setSceneIdSet a scenario ID
setMediaModeSet a media mode
setRoomModeSet a room mode
joinRoomJoin a room
leaveRoomExit a room
updateTokenUpdate a token
CallbackDescription
onJoinRoomSuccessCallback of joining a room
onLeaveRoomWithStatsCallback of exiting a room
sdkAuthResultCallback of SDK authentication results. See details in User Authentication
onUserBannedCallback of banning a user
onRoomStatsCallback of joining a room for reporting the upstream and downstream traffic (every two seconds)
bizAuthResultCallback of reporting service authentication results
onTokenWillExpireCallback of a token about to expire
thunderEngineTokenRequestCallback of authentication expired

Audio Publishing

APIDescription
setAudioConfigSet audio profiles
setMicVolumeSet microphone volume
stopLocalAudioStreamDisable/enable a local audio (including audio capture, encoding and upload)
setAudioSourceTypeSet a publishing mode
CallbackDescription
onFirstLocalAudioFrameSentCallback of the first local audio frame sent
onLocalAudioStatsCallback of reporting statistics of the local audio streams
onLocalAudioStatusChangedCallback of local audio status changes

Audio Subscription

APIDescription
stopAllRemoteAudioStreamsStop/resume receiving the audio data of all users
stopRemoteAudioStreamStop/resume receiving audio stream of a specified user
setPlayVolumeSet local playing volume of a user
CallbackDescription
onRemoteAudioStoppedCallback of starting/stopping sending the audio of a remote user
onRemoteAudioStatsOfUidCallback of remote audio stream information during the call
onRemoteAudioPlayCallback of the first remote audio frame displayed
onRemoteAudioStateChangedOfUidCallback of remote audio status changes

Video Publishing

APIDescription
setVideoEncoderConfigSet video encoding parameters
setLocalVideoCanvasSet a local video render view
enableLocalVideoCaptureEnable/disable the local video capture
startVideoPreviewEnable local video preview
stopVideoPreviewDisable local video preview
setLocalCanvasScaleModeSet a local view display mode
stopLocalVideoStreamEnable/disable local video sending
getVideoEncoderParamGet video encoding parameters by encoding gear
CallbackDescription
onFirstLocalVideoFrameSentCallback of the first local video frame sent
onLocalVideoStatsCallback of reporting the statistics of local video
onLocalVideoStatusChangedCallback of local video status changes

Video Subscription

APIDescription
stopAllRemoteVideoStreamsStop/receive all remote video streams
stopRemoteVideoStreamStop/receive video stream of a specified user
setRemoteCanvasScaleModeSet the scale mode of the remote video stream on the canvas
setRemoteVideoCanvasSet a remote video render view
setRemotePlayTypeSet the type of remote user's render view
setMultiVideoViewLayoutSet the layout parameters of the multi videos on the view
CallbackDescription
onRemoteVideoStoppedCallback of a remote user stopping/resuming publishing the video stream
onRemoteVideoStatsOfUidCallback of reporting statistics of remote video streams
onRemoteVideoPlayCallback of the first displayed remote video frame
onVideoSizeChangedOfUidCallback of the resolution of local or remote video changes
onRemoteVideoStateChangedOfUidCallback of remote video status changes

Network Status

APIDescription
getConnectionStatusGet the network connection status
CallbackDescription
onNetworkQualityCallback of reporting the network quality of each user (every two seconds)
onNetworkTypeChangedCallback of network type changes
onConnectionStatusCallback of changes to connection status between the SDK and the server
thunderEngineConnectionLostCallback of the SDK's failure to reconnect to the server 10 seconds after its connection to the server is interrupted

Publishing Test

N/A

Stream Pushing to CDN

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

Audio Recording

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

Co-hosting across Rooms

APIDescription
addSubscribeSubscribe to a specific user’s streams across rooms
removeSubscribeRemove a specific user’s streams subscribed to across rooms

Camera Management

APIDescription
switchFrontCameraSwitch front/rear cameras
setVideoCaptureOrientationSet portrait/landscape, default is portrait. Available for publishing before preview.
setLocalVideoMirrorModeSet camera mirroring. Available for publishing before preview, valid for front camera only
isCameraManualFocusPositionSupportedWhether it supports manual focus
isCameraManualExposurePositionSupportedWhether it supports manual exposure
setCameraZoomFactorSet the zoom scale
setCameraFocusPositionSet the focus position
setCameraExposurePositionSet the exposure position
CallbackDescription
onCameraFocusAreaChangedCalled when the focus area of cameras changes
onCameraExposureAreaChangedCalled when the exposure area of cameras changes

Screen Sharing

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

Real-Time Watermark

APIDescription
setVideoWatermarkAdd a local video watermark

Video Dual Stream

N/A

Audio Player

APIDescription
createAudioFilePlayerCreate a file player object ThunderAudioFilePlayer
destroyAudioFilePlayerDestroy a file player object ThunderAudioFilePlayer
APIDescription
openOpen an audio file (supports mp3, aac, wav)
closeClose an audio file
playStart playing an audio file
stopStop playing an audio file
pausePause playing an audio file
resumeContinue to play
seekSkip 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 of turning on/off volume
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
getCurrentSpectrumGet the spectrum information; value range [0-1]
setTempoSet video playback speed
setPositionSet video playback direction
CallbackDescription
onAudioFileVolumeCallback of audio playing volume changes
onAudioFilePlayEndCallback of end playing
onAudioFilePlayErrorCallback of audio playing error occurring
onAudioFilePlayingCallback of starting playing audios
onAudioFilePauseCallback of pausing
onAudioFileResumeCallback of resuming
onAudioFileStopCallback of the user actively stopping playing
onAudioFileSeekCompleteCallback of the audio file seeking completed
onAudioFileStateChangeCallback of audio file playing status
onAudioFileStateChangePlayer status callback

Voice Change & Reverb

APIDescription
setVoiceChangerSet a voice change mode
setSoundEffectSet different sound effects
setEnableReverbEnable/disable reverb
setReverbParamSet reverb parameters
setEnableEqualizerEnable/disable an equalizer
setEqGainsSet equalizer parameters
setEnableCompressorEnable/disable a compressor
setCompressorParamSet compressor parameters
setEnableLimiterEnable/disable a pressure limiter
setLimiterParamSet the pressure limiter parameters

Voice Positioning

APIDescription
enableVoicePositionEnable/disable stereo panning for remote users
setRemoteUidVoicePositionSet the sound position and volume for remote users

Volume Prompts

APIDescription
enableCaptureVolumeIndicationEnable/disable capture volume callback
setAudioVolumeIndicationEnable/disable speaker volume callback
CallbackDescription
onCaptureVolumeIndicationCallback of enabling/disabling volume capture
onPlayVolumeIndicationCallback of someone speaking

Audio Router

APIDescription
enableLoudspeakerSearch whether it is played by a loudspeaker
isLoudspeakerEnabledSearch whether the loudspeaker is enabled
setLoudSpeakerVolumeSet the loudspeaker volume
CallbackDescription
:---:---
onAudioRouteChangedCalled when audio routing changes

Howling Detection

APIDescription
enableHowlingDetectorEnable/Disable howling detection
CallbackDescription
onHowlingDetectResultCalled for reporting howling detection results

Echo Detection

APIDescription
enableEchoDetectorEnable/disable echo detection
CallbackDescription
onEchoDetectResultCallback of echo detection results

In-ear Monitoring

APIDescription
setEnableInEarMonitorEnable/disable in-ear monitoring

Audio Device Management

CallbackDescription
onAudioCaptureStatusCallback of reporting the status of the audio capture device

Video Device Management

CallbackDescription
onVideoCaptureStatusCallback of reporting the status of the video capture device

SEI (Supplemental Enhancement Information)

APIDescription
setMediaExtraInfoDelegateListen to the SEI callback ThunderMediaExtraInfoDelegate
sendMediaExtraInfoSend SEI (during audio/video streaming)
CallbackDescription
onSendMediaExtraInfoFailedStatusCallback of failure to send SEI
onRecvMediaExtraInfoCallback of SEI received
onRecvMixAudioInfoCallback of the mixed audio stream SEI received
onRecvMixVideoInfoCallback of the mixed video stream SEI received

Raw Audio Data

APIDescription
enableAudioPlaySpectrumEnable/disable the audio spectrum data callback
setAudioPlaySpectrumInfoSet the 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
setMixedAudioFrameParametersSet the audio data mixed with the captured data and the playback data
CallbackDescription
onAudioPlaySpectrumDataCallback of audio play spectrum data
CallbackDescription
onRecordAudioFrameCallback of retrieving the captured audio data
onPlaybackAudioFrameCallback of retrieving the audio playback frame for getting the audio data
onPlaybackAudioFrameBeforeMixingCallback of retrieving the audio data of a specific user before mixing
onMixedAudioFrameCallback of audio data mixed with the captured data and the playback data

Raw Video Data

APIDescription
registerVideoCaptureFrameObserverSet the interface for callback on local video preprocessing
registerVideoDecodeFrameObserverCustomize decoding picture rendering
CallbackDescription
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
CallbackDescription
onVideoDecodeFrameCustom rendering of a decoded image is to cut out the decoded image of SDK for custom rendering of services

External Audio Data

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

External Video Data

APIDescription
setCustomVideoSourceSet external video capture source
CallbackDescription
onInitializeInitialize the video source
bufferTypeGet the buffer type
onStartStart the video source
onStopStop the video source
onDisposeRelease the video source
CallbackDescription
consumePixelBufferInterface for pushing raw video data
consumeRawDataInterface for pushing raw video data
consumeCMSampleBufferInterface for pushing raw video data

Custom Audio Rendering

APIDescription
enableRenderPcmDataCallBackEnable/disable callback of audio rendering data
CallbackDescription
onAudioRenderPcmDataCallback of audio rendering data

Custom Video Rendering

APIDescription
registerVideoDecodeFrameObserverSet the decoding data callback for video stream of a certain user ID
CallbackDescription
onVideoDecodeFrameReceive the decoded frame data from decoder

Custom Messages

APIDescription
sendUserAppMsgDataSend custom broadcast messages
CallbackDescription
onRecvUserAppMsgDataCallback of receiving custom broadcast messages
onSendAppMsgDataFailedStatusCallback of failure to send custom broadcast messages

Log Management

APIDescription
setLogFilePathSet the saving path of log files outputted by the SDK. A directory with write permissions must be specified.
setLogLevelSet the log saving level
setLogCallbackSet the log callback. Once log callback is set, setLogFilePath is invalid
CallbackDescription
onThunderRtcLogWithLevelCallback of log information reporting

Device Resource Monitoring

CallbackDescription
onDeviceStatsCPU/memory usage callback

Other APIs

APIDescription
enableWebSdkCompatibilityEnable/disable Web SDK compatibility

Was this page helpful?

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