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.

Note:

Generally, all event callbacks in the document are listened to through ThunderEventHandler.

Basic APIs

APIDescription
createEngineCreate and initialize a ThunderEngine instance
createWithLoopCreate and initialize a ThunderEngine instance, and specify running threads of callbacks in the ThunderEventHandler class
destroyEngineDestroy the ThunderEngine instance
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 the token
CallbackDescription
onJoinRoomSuccessCalled when a user joins a room
onLeaveRoomCalled when a user exits a room
onSdkAuthResultCalled 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
onBizAuthResultCalled for reporting service authentication results
onTokenWillExpireCalled when a token is about to expire
onTokenRequestedCalled when a token expires

Audio Publishing

APIDescription
setAudioConfigSet an audio mode
setAudioSourceTypeSet the audio publishing mode
setMicVolumeSet the microphone volume
stopLocalAudioStreamPublish audio (including capture activation, encoding and streams pushing)
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 audio stream of a specific user
setRemoteAudioStreamsVolumeSet the local playing volume for a remote user
CallbackDescription
onRemoteAudioStoppedCalled when starting/stopping sending the audio streams of a remote user
onRemoteAudioStatsOfUidCalled for reporting statistics of the remote audio streams
onRemoteAudioPlayCalled when the first frame playback of remote video is sent
onRemoteAudioStateChangedOfUidCalled when the video stream of remote users changes

Video Publishing

APIDescription
setVideoEncoderConfigSet video encoding parameters
setLocalVideoCanvasSet the local video renderer view
enableLocalVideoCaptureEnable/Disable local video capture
startVideoPreviewEnable local video preview
stopVideoPreviewDisable local video preview
setLocalCanvasScaleModeSet the local view scaling mode
setLocalVideoMirrorModeSet the local video mirroring mode
stopLocalVideoStreamStop/Resume sending the local video stream (including encoding information)
CallbackDescription
onFirstLocalVideoFrameSentCalled when the first local video frame is sent
onLocalVideoStatsCalled for reporting the statistics of local video stream
getVideoEncoderParamCalled for getting video coding parameters by coding gear

Video Subscription

APIDescription
stopAllRemoteVideoStreamsStop/Receive the video data of all users
stopRemoteVideoStreamStop/Receive video data of a specific user
setRemoteCanvasScaleModeSet the scaling mode of a remote video view
setMultiVideoViewLayoutSet layout parameters about renderer view of multi-person co-hosting
setRemoteVideoCanvasSet the remote video renderer view
setRemotePlayTypeSet the renderer view type of a remote user
CallbackDescription
onRemoteVideoStoppedCalled when a remote user stops/resumes publishing the video stream
onRemoteVideoStatsOfUidCalled when the remote video status changes
onRemoteVideoPlayCalled when the first remote video frame is displayed
onVideoSizeChangedCalled when the resolution of a subscribed video changes
onRemoteVideoStateChangedOfUidCalled when the remote video status changes

Network status

APIDescription
getConnectionStatusCalled every two seconds for reporting the network quality of each user
CallbackDescription
onNetworkQualityReport the uplink and downlink network quality of each user
onNetworkTypeChangedCalled when the network status changes
onConnectionStatusCalled when the connection status between the SDK and the server changes
onConnectionLostCalled when the SDK cannot reconnect to the server 10 seconds after its connection to the server is interrupted

Stream pushing to CDN

APIDescription
setLiveTranscodingTaskAdd/Update transcoding task
removeLiveTranscodingTaskDelete 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
onPublishStreamToCDNStatusCalled 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

Cross-room subscription

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

Camera Management

APIDescription
switchFrontCameraSwitch front/rear camera
setVideoCaptureOrientationSet camera publishing orientation (landscape/portrait)

Screen Sharing

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

Real-time Watermark

APIDescription
setVideoWatermarkSet the watermark of local video

Video Dual Stream

N/A

Audio Player

APIDescription
createAudioFilePlayerCreate an audio player file instance ThunderAudioFilePlayer
destroyAudioFilePlayerDestroy an audio player file instance ThunderAudioFilePlayer
APIDescription
openOpen an accompaniment file
closeClose an accompaniment file
playStart playing a audio file
stopStop playing a audio file
pausePause playing a audio file
resumeResume playing a audio file
seekPlay in a specified time
getTotalPlayTimeMSGet the the duration of an audio file
getCurrentPlayTimeMSGet the current playing time of an audio file
setPlayVolumeSet current file’s output volume
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
getAudioTrackCountGet the number of audio tracks
selectAudioTrackSelect a audio track
setSemitoneSet the audio playing tone
setLoopingSet the number of audio playback loops
enablePublishUse the currently played audio file as accompaniment for live streaming
setPlayerNotifySet the playing callback ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback
enableVolumeIndicationEnable the callback of file playing volume ThunderAudioFilePlayer.IThunderAudioFilePlayerCallback.onAudioFileVolume
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
CallbackDescription
onAudioFilePlayErrorCalled when the audio playing error occurs
onAudioFileVolumeCalled when audio playing volume changes
onAudioFileSeekCompleteCalled when fast forwarding to the appointed time
onAudioFilePlayingCalled when starting playing audios
onAudioFilePauseCalled when pause playing audios
onAudioFileResumeCalled when resume playing audios
onAudioFileStopCalled when stop playing audios
onAudioFilePlayEndCalled when end playing audios
CallbackDescription
onAudioFileVolumePlayback volume callback
onAudioFileStateChangePlayer status callback

Voice Change & Reverb

APIDescription
setVoiceChangerSet the voice change mode
setSoundEffectSet the sound effect mode
setEnableEqualizerEnable/Disable the local voice equalizer
setEqGainsSet voice equalizer parameters
setEnableReverbEnable/Disable local voice reverberation
setReverbExParameterSet local voice reverberation parameters
setEnableCompressorEnable/Disable the audio compressor
setCompressorParamSet audio compressor parameters
setEnableLimiterEnable/Disable limiter
setLimiterParamSet limiter parameters
setVoicePitchSet the voice pitch of the speaker

Voice Positioning

APIDescription
enableVoicePositionEnable/Disable stereo panning for remote users
setRemoteUidVoicePositionSet spatial location and volume of remote user's voice

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

Volume Prompt

APIDescription
enableCaptureVolumeIndicationEnable/Disable the callback onCaptureVolumeIndication to report the capture volume of the microphone
setAudioVolumeIndicationEnable/Disable the callback onPlayVolumeIndication to report which users are speaking and the speakers' volume
CallbackDescription
onCaptureVolumeIndicationCalled when enabling/disabling volume capture
onPlayVolumeIndicationCalled when someone is speaking to report the speaker name and speaking volume

Voice Routing

APIDescription
isLoudspeakerEnabledSearch whether it is played by a loudspeaker
enableLoudspeakerEnable a loudspeaker
setLoudSpeakerVolumeSet loudspeaker volume
CallbackDescription
onAudioRouteChangedCalled when audio routing changes

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

SEI (Supplemental Enhancement Information)

APIDescription
setMediaExtraInfoCallbackListen to the SEI callback IThunderMediaExtraInfoCallback
sendMediaExtraInfoSend SEI
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 onAudioPlaySpectrumData
setAudioPlaySpectrumInfoSet the information for audio spectrum data callback
enableCapturePcmDataCallBackEnable/Disable captured audio data callback onAudioCapturePcmData
setRecordingAudioFrameParametersSet the format for raw data capture callback
setPlaybackAudioFrameParametersSet format for playing data callback
registerAudioFrameObserverRegister an audio observer object IAudioFrameObserver
setMixedAudioFrameParametersSet the format of audio data mixed with the captured data and the playback data
CallbackDescription
onAudioPlaySpectrumDataCalled for reporting the audio playback spectrum data
CallbackDescription
onRecordAudioFrameCalled for retrieving the captured audio data
onPlaybackAudioFrameCalled for retrieving the audio playback frame for getting the audio of all users
onPlaybackAudioFrameBeforeMixingCalled for retrieving the raw 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
registerVideoCaptureTextureObserverRegister a video texture capture observe object IGPUProcess
registerVideoCaptureFrameObserverRegistering a video capture frame observer IVideoCaptureObserver
registerVideoDecodeFrameObserverRegister a video capture observer object IVideoCaptureObserver
CallbackDescription
onInitCalled when users use the third-party effects to reporting the effect information
onDestroyCalled when destroying effects resources
onDrawCalled when rendering each frame
onOutputSizeChangedCalled when the texture size updates
CallbackDescription
onCaptureVideoFrameCalled for getting the original YUV video data captured by cameras
CallbackDescription
onVideoDecodeFrameCalled for reporting the decoded YUV (I420) video data

External Audio Data

APIDescription
setCustomAudioSourceSet external audio capture parameters
pushCustomAudioFramePush external audio frames

External Video Data

APIDescription
setCustomVideoSourceSet custom video sources
CallbackDescription
onInitializeInitialize the video source
onStartStart the video source
onStopStop the video source
onDisposeRelease the video source
CallbackDescription
consumeByteArrayFrameCalled for pushing external raw video data
consumeTextureFramePush video frames in texture

Custom Messages

APIDescription
sendUserAppMsgDataSend developer's 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 the log saving level
setLogCallbackSet log callback IThunderLogCallback
CallbackDescription
onThunderLogWithLevelCalled for reporting log informatio

Device Resource Monitoring

APIDescription
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