Overview

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.

  • ThunderEngine responds to all the APIs an application might call, by way of the following classes or interfaces.
  • ThunderEventDelegate class enables callbacks to your application.

Basic APIs

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

Room Management

APIDescription
setAreaSet user's country/region
setSceneIdSet scenario ID
setMediaModeSet a media mode
setRoomModeSet a room mode
joinRoomJoin a room
leaveRoomLeave a room
updateTokenUpdate a token
CallbackDescription
onJoinRoomSuccessCaled when the local user joins a room
onLeaveRoomWithStatsCalled when exiting a room
sdkAuthResultCalled 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
bizAuthResultCalled for reporting service authentication results
onTokenWillExpireCalled when a token is about to expire
thunderEngineTokenRequestCalled when a token expires

Audio Publishing

APIDescription
setAudioConfigSet the audio mode
setMicVolumeSet the microphone volume
stopLocalAudioStreamPublish audio (including capture activation, encoding and streams pushing)
setAudioSourceTypeSet the audio publishing mode
CallbackDescription
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

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

Video Publishing

APIDescription
setVideoEncoderConfigSet video encoding parameters
setLocalVideoCanvasSet the local video renderer view
enableLocalVideoCaptureEnable/Disable the local video capture
startVideoPreviewEnable local video preview
stopVideoPreviewDisable local video preview
setLocalCanvasScaleModeSet the local view scaling mode
stopLocalVideoStreamEnable/Disable local video sending
getVideoEncoderParamGet video coding parameters by coding gear
CallbackDescription
onFirstLocalVideoFrameSentCalled when the first local video frame is sent
onLocalVideoStatsCalled for reporting the local video statistics
onLocalVideoStatusChangedCalled when the local video status changes

Video Subscription

APIDescription
stopAllRemoteVideoStreamsStop/Resume receiving all remote video streams
stopRemoteVideoStreamStop/Resume receiving video stream of a specific user
setRemoteCanvasScaleModeSet the scaling mode of a remote video view
setRemoteVideoCanvasSet the rendering view of the remote video
setRemotePlayTypeSets the type of remote user's render view
setMultiVideoViewLayoutSet layout parameters about renderer view of multi-person co-hosting
CallbackDescription
onRemoteVideoStoppedCalled when a remote user stops/resumes publishing the video stream
onRemoteVideoStatsOfUidReport statistics of remote user video stream
onRemoteVideoPlayCalled when the first remote video frame is displayed
onVideoSizeChangedOfUidCalled when the resolution of local or remote video changes
onRemoteVideoStateChangedOfUidCalled when the remote video status changes

Network Status

APIDescription
getConnectionStatusGet network connection status
CallbackDescription
onNetworkQualityCalled every two seconds for reporting the network quality of each user
onNetworkTypeChangedCalled when the network status changes
onConnectionStatusCalled when the connection status between the SDK and the server changes
thunderEngineConnectionLostCalled when the SDK cannot reconnect to the server 10 seconds after its connection to the server is interrupted

Publishing Detection

N/A

Stream Pushing to CDN

APIDescription
setLiveTranscodingTaskAdd or update transcoding task
removeLiveTranscodingTaskRemove a 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
CallbackDescription
onPublishStreamToCDNStatusWithUrlCalled when the status of stream pushing to CDN changes

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 to front/rear cameras
setVideoCaptureOrientationSet camera publishing orientation (landscape/portrait)
setLocalVideoMirrorModeSet camera mirroring. Available for publishing before preview, valid for front camera only

Screen Sharing

N/A

Real-time Watermark

APIDescription
setVideoWatermarkSet the local video watermark

Video Dual Stream

N/A

Audio Player

APIDescription
createAudioFilePlayerCreate an audio player file instance ThunderAudioFilePlayer
destroyAudioFilePlayerDestroy an audio player file instance ThunderAudioFilePlayer
APIDescription
openOpen audio file, formats supported: mp3, aac, wav
closeClose audio file
playStart playing a audio file
StopStop playing a audio file
pausePause playing a audio file
resumeResume playing a audio file
seekSkipping to specified play time
getTotalPlayTimeMSGet the the duration of an audio file
getCurrentPlayTimeMSGet the current playing time of an audio file
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
setLoopingSet the number of audio playback loops
setPlayerDelegateSet a player callback delegate
enableSpectrumEnable/Disable spectrum
enableVolumeIndicationEnable the callback of file playing 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 spectrum information; value range: [0-1]
setTempoSet video playback speed
setPositionSet video playback direction
CallbackDescription
onAudioFileVolumeCalled when playing volume
onAudioFilePlayEndCalled when playing ends
onAudioFilePlayErrorCalled when the audio playing error occurs
onAudioFilePlayingCalled when starting playing audios
onAudioFilePauseCalled when pauseing playback
onAudioFileResumeCalled when resuming playback
onAudioFileStopCalled when stoping playback
onAudioFileSeekCompleteCalled when the audio file seeking is completed
onAudioFileStateChangeCalled when the playing status the audio file changes
onAudioFileStateChangeCalled when the player status changes

Voice Change & Reverb

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

Voice Positioning

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

Volume Prompt

APIDescription
enableCaptureVolumeIndicationEnable/Disable the callback of turning on/off microphone volume
setAudioVolumeIndicationEnable/Disable the callback of turning on/off user volume to report which users are speaking and the speakers' volume
CallbackDescription
onCaptureVolumeIndicationCalled when enabling/disabling volume capture
onPlayVolumeIndicationCalled when someone is speaking

Voice Routing

APIDescription
enableLoudspeakerEnable a loudspeaker
isLoudspeakerEnabledCheck 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
onAudioCaptureStatusCalled when the capture status of the audio device changes

Video Device Management

CallbackDescription
onVideoCaptureStatusCalled when the camera capture status changes
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

SEI (Supplemental Enhancement Information)

APIDescription
setMediaExtraInfoDelegateSet callback delegate of SEI ThunderMediaExtraInfoDelegate
sendMediaExtraInfoSend SEI (during audio/video streaming)
CallbackDescription
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

APIDescription
enableAudioPlaySpectrumEnable/Disable the audio spectrum data callback
setAudioPlaySpectrumInfoSet the information for audio spectrum data callback
enableCapturePcmDataCallBackEnable/Disable captured audio data callback
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 format for raw data capture callback
setPlaybackAudioFrameParametersSet format for playing data callback
CallbackDescription
onAudioPlaySpectrumDataCallback on audio play spectrum data
CallbackDescription
onRecordAudioFrameCalled for retrieving the captured audio data
onPlaybackAudioFrameCalled for retrieving the audio playback frame for getting the audio
onPlaybackAudioFrameBeforeMixingCalled for retrieving the audio data of a specific user before mixing

Raw Video Data

APIDescription
registerVideoCaptureFrameObserverRegister a video capture observer object
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 streams
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 video source
bufferTypeObtain Buffer type
onStartStart video source
onStopStop video source
onDisposeDispose video source
CallbackDescription
consumePixelBufferInterface for pushing raw video data
consumeRawDataInterface for pushing raw video data
consumeCMSampleBufferInterface for pushing raw video data

External Audio Sink

APIDescription
enableRenderPcmDataCallBackEnable/Disable callback on audio rending data
CallbackDescription
onAudioRenderPcmDataCallback audio rendering data

External Video Sink

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

Custom Messages

APIDescription
sendUserAppMsgDataSend custom broadcast messages
CallbackDescription
onRecvUserAppMsgDataCalled for receiving custom broadcast messages
onSendAppMsgDataFailedStatusCalled when sending custom broadcast messages failed

Log Management

APIDescription
setLogFilePathSet the saving path of log files outputed by the SDK
setLogLevelSet log levels
setLogCallbackSet log callback. Once log callback is set, setLogFilePath is invalid
CallbackDescription
onThunderRtcLogWithLevelCalled for reporting log information

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