Event Callback

Callback List

  • IThunderEventHandler

Public Member FunctionFunction Name
virtual voidonJoinRoomSuccess(const char* roomId, const char* uid, int elapsed) = 0
virtual voidonLeaveRoom() = 0
virtual voidonPlayVolumeIndication(const AudioVolumeInfo* speakers, int speakerCount, int totalVolume) = 0
virtual voidonInputVolume(unsigned volume) = 0
virtual voidonOutputVolume(unsigned volume) = 0
virtual voidonBizAuthResult(bool bPublish, AUTH_RESULT result) = 0
virtual voidonSdkAuthResult(AUTH_RESULT result) = 0
virtual voidonTokenWillExpire(const char* token) = 0
virtual voidonTokenRequest() = 0
virtual voidonUserBanned(bool status) = 0
virtual voidonNetworkQuality(const char* uid, NetworkQuality txQuality, NetworkQuality rxQuality) = 0
virtual voidonFirstLocalVideoFrameSent(int elapsed) = 0
virtual voidonFirstLocalAudioFrameSent(int elapsed) = 0
virtual voidonRemoteAudioStopped(const char* uid, bool stop) = 0
virtual voidonConnectionStatus(ThunderConnectionStatus status) = 0
virtual voidonConnectionLost() = 0
virtual voidonRemoteVideoStopped(const char* uid, bool stop) = 0
virtual voidonVideoSizeChanged(const char* uid, int width, int height, int rotation) = 0
virtual voidonRemoteVideoPlay(const char* uid, int width, int height, int elapsed) = 0
virtual voidonNetworkTypeChanged(ThunderNetworkType type) = 0
virtual voidonAudioCaptureStatus(ThunderAudioDeviceStatus type) = 0
virtual voidonPublishStreamToCDNStatus(const char* url, ThunderPublishCDNErrorCode errorCode) = 0
virtual voidonRoomStats(RoomStats stats) = 0
virtual voidonRecvUserAppMsgData(const char* uid, const char* msgData) = 0
virtual voidonSendAppMsgDataFailedStatus(int status) = 0
virtual voidonVideoCaptureStatus(int status) = 0
virtual voidonLocalVideoStats(const LocalVideoStats stats) = 0
virtual voidonLocalAudioStats(const LocalAudioStats stats) = 0
virtual voidonRemoteVideoStatsOfUid(const char* uid, const RemoteVideoStats stats) = 0
virtual voidonRemoteAudioStatsOfUid(const char* uid, const RemoteAudioStats stats) = 0
virtual voidonRemoteAudioPlay(const char* uid, int elapsed)
virtual voidonLocalAudioStatusChanged(LOCAL_AUDIO_STREAM_STATUS status, LOCAL_AUDIO_STREAM_ERROR_REASON errorReason)
virtual voidonLocalVideoStatusChanged(LOCAL_VIDEO_STREAM_STATUS status, LOCAL_VIDEO_STREAM_ERROR_REASON error)
virtual voidonRemoteAudioStateChangedOfUid(const char* uid, REMOTE_AUDIO_STATE state, REMOTE_AUDIO_REASON reason, int elapsed)
virtual voidonRemoteVideoStateChangedOfUid(const char* uid, REMOTE_VIDEO_STATE state, REMOTE_VIDEO_REASON reason, int elapsed)
virtual voidonDeviceStats(const DeviceStats& stats)
virtual voidonCaptureVolumeIndication(int totalVolume, int cpt, int micVolume)
virtual voidonAudioDeviceVolumeChanged(int deviceType, int volume, bool muted)
virtual voidonVideoDeviceStateChanged(const char* deviceId, MEDIA_DEVICE_TYPE deviceType, MEDIA_DEVICE_STATE_TYPE deviceState)
virtual voidonHowlingDetectResult
virtual voidonEchoDetectResult(bool bEcho)
virtual voidonWarning
  • IAudioFrameObserver

Public Member FunctionFunction Name
virtual boolonRecordAudioFrame(AudioFrame& audioFrame) = 0
virtual boolonPlaybackAudioFrame(AudioFrame& audioFrame) = 0
virtual boolonPlaybackAudioFrameBeforeMixing(char* uid, AudioFrame& audioFrame) = 0
  • IThunderAudioPlayerNotify

Public Member FunctionFunction Name
virtual voidonAudioFileVolume(unsigned int volume, unsigned int currentMs, unsigned int totalMs) = 0
virtual voidonAudioFilePlayEnd() = 0
virtual voidonAudioFileStateChange(ThunderAudioFilePlayerEvent event, ThunderAudioFilePLayerErrorCode errorCode)
  • IVideoFrameObserver

Public Member FunctionFunction Name
virtual boolonPreviewVideoFrame(VideoFrame& videoFrame) = 0
virtual boolonRenderVideoFrame(const char* uid, VideoFrame& videoFrame) = 0
  • IVideoCaptureObserver

Public Member FunctionFunction Name
virtual boolonCaptureVideoFrame(VideoFrame& videoFrame) = 0
  • IThunderMediaExtraInfoObserver

Public Member FunctionFunction Name
virtual voidonSendMediaExtraInfoFailedStatus(int status) = 0
virtual voidonRecvMediaExtraInfo(const char* uid, const char* pData, int dataLen) = 0
virtual boolonRecvMixAudioInfo(const char* uid, MixAudioInfoList& infos) = 0
virtual boolonRecvMixVideoInfo(const char* uid, MixVideoInfoList& infos) = 0

Callback Details

IThunderEventHandler

IThunderEventHandler::onJoinRoomSuccess

virtual void Thunder::IThunderEventHandler::onJoinRoomSuccess(const char* roomName, const char* uid, int elapsed);

Callback of successfully joining a room.

Notes:

Return following IThunderEngine::joinRoom indicates successful connection to the server. At this point you can use any APIs restricted to in-room calling.

Parameters
ParameterTypeDescription
roomNameOUTRoom name
uidOUTUser ID
elapsedOUTTime elapsed (ms) from calling IThunderEngine::joinRoom to callback event

IThunderEventHandler::onLeaveRoom

virtual void Thunder::IThunderEventHandler::onLeaveRoom();

Callback of exiting the room.

Notes:

You will receive this callback if exiting the room normally by calling leaveRoom.


IThunderEventHandler::onPlayVolumeIndication

virtual void Thunder::IThunderEventHandler::onPlayVolumeIndication(const AudioVolumeInfo* speakers, int speakerCount, int totalVolume);

Report who is currently speaking and their volume.

Notes:

After calling this method, receive onPlayVolumeIndication notifications whenever someone speaks in the room.

Parameters
ParameterTypeDescription
speakersOUTSpeaker (array). See details in AudioVolumeInfo.
speakerCountOUTNumber of speakers
totalVolumeOUTTotal volume (after audio mixing) [0-100]

IThunderEventHandler::onInputVolume

virtual void Thunder::IThunderEventHandler::onInputVolume(unsigned volume);

Report test input volume.

Notes:

Receive this callback upon calling startInputDeviceTest. Call frequency is every 120 ms.

Parameters
ParameterTypeDescription
volumeOUTVolume value [0-100]

IThunderEventHandler::onOutputVolume

virtual void Thunder::IThunderEventHandler::onOutputVolume(unsigned volume);

Report test input volume.

Notes:

Receive this callback upon calling startOutputDeviceTest. Call frequency is every 150 ms.

Parameters
ParameterTypeDescription
volumeOUTVolume value [0-100]

IThunderEventHandler::onBizAuthResult

virtual void Thunder::IThunderEventHandler::onBizAuthResult(bool bPublish, AUTH_RESULT result);

Callback of service authentication results.

Notes:

  • When business authentication is required, Jocloud will forward the authentication request to the business authentication server, and after passing through, return the authentication results.
  • You will receive this callback once there is an uplink media stream if service is configured to require business authenticiation.
Parameters
ParameterTypeDescription
bPublishOUTTrue: publishing authentication; false: playing authentication
resultOUTAuthentication results: 0: success;
other values: failure

IThunderEventHandler::onSdkAuthResult

virtual void Thunder::IThunderEventHandler::onSdkAuthResult(AUTH_RESULT result);

Callback of SDK authentication results.

Notes:

  • Report authentication result upon calling IThunderEngine::joinRoom if there is uplink and downlink media data.
Parameters
ParameterTypeDescription
resultOUTSee details in AUTH_RESULT.

IThunderEventHandler::onTokenWillExpire

virtual void Thunder::IThunderEventHandler::onTokenWillExpire(const char* token);

Callback of imminent user token expiration.

Parameters
ParameterTypeDescription
tokenOUTExpiring token

IThunderEventHandler::onTokenRequest

virtual void Thunder::IThunderEventHandler::onTokenRequest();

Callback of user token expired.


IThunderEventHandler::onUserBanned

virtual void Thunder::IThunderEventHandler::onUserBanned(bool status);

Callback of changes to a user’s banned status.

Parameters
ParameterTypeDescription
statusOUTTrue: banned; false: unbanned

IThunderEventHandler::onUserJoined

virtual void Thunder::IThunderEventHandler::onUserJoined(const char* uid, int elapsed);

Callback of a remote user joining the current room.

Notes:

  • This API became obsolete with V2.8.0.
  • Local users receive this callback when subsequent users enter their current room. Effective in an audio-only mode.
Parameters
ParameterTypeDescription
uidOUTUser ID
elapsedOUTDelay (ms) from calling joinRoom to triggering callback

IThunderEventHandler::onUserOffline

virtual void Thunder::IThunderEventHandler::onUserOffline(const char* uid, USER_OFFLINE_REASON_TYPE reason);

Callback of a remote user exiting the current room.

Notes:

  • This API became obsolete with V2.8.0.
  • Local users receive this callback when other users leave their current room. Effective in an audio-only mode.
Parameters
ParameterTypeDescription
uidOUTUser ID
reasonOUTReason for going offline. See details in USER_OFFLINE_REASON_TYPE.

IThunderEventHandler::onNetworkQuality

virtual void Thunder::IThunderEventHandler::onNetworkQuality(const char* uid, NetworkQuality txQuality, NetworkQuality rxQuality);

Reports on user uplink/downlink network quality.

Parameters
ParameterTypeDescription
uidOUTUser ID
txQualityOUTUser's uplink network quality. See details in NetworkQuality.
rxQualityOUTUser's downlink network quality. See details in NetworkQuality.

IThunderEventHandler::onFirstLocalVideoFrameSent

virtual void Thunder::IThunderEventHandler::onFirstLocalVideoFrameSent(int elapsed);

Callback of the first frame of local video sent successfully. Receive upon successful video stream publishing.

Parameters
ParameterTypeDescription
elapsedOUTTime elapsed (ms) from calling IThunderEngine::joinRoom to callback event

IThunderEventHandler::onFirstLocalAudioFrameSent

virtual void Thunder::IThunderEventHandler::onFirstLocalAudioFrameSent(int elapsed);

Callback of the first frame of local audio sent successfully. Receive upon successful audio stream publishing.

Parameters
ParameterTypeDescription
elapsedOUTTime elapsed (ms) from calling IThunderEngine::joinRoom to callback event

IThunderEventHandler::onRemoteAudioStopped

virtual void Thunder::IThunderEventHandler::onRemoteAudioStopped(const char* uid, bool stopped);

Callback of remote user audio stream status. Receive after calling IThunderEngine::joinRoom whenever there are changes to the status of existing or subsequent audio streams in the room.

Parameters
ParameterTypeDescription
uidOUTRemote user ID
muteOUTTrue: audio stream disabled;
false: audio stream enabled

IThunderEventHandler::onConnectionStatus

virtual void Thunder::IThunderEventHandler::onConnectionStatus(ThunderConnectionStatus status);

Callback of server network connection status. Receive after calling IThunderEngine::joinRoom whenever there are changes to the SDK's connection with the server network.

Parameters
ParameterTypeDescription
statusOUTNetwork connection status. See details in ThunderConnectionStatus.

IThunderEventHandler::onConnectionLost

virtual void Thunder::IThunderEventHandler::onConnectionLost();

Callback of server network disconnection. Receive after calling IThunderEngine::joinRoom if the SDK's connection with the server network is interrupted.


IThunderEventHandler::onRemoteVideoStopped

virtual void Thunder::IThunderEventHandler::onRemoteVideoStopped(const char* uid, bool stopped);

Callback of user enabling/disabling video streams. Receive after calling IThunderEngine::joinRoom whenever there are changes to the status of existing and subsequent video streams in the room.

Parameters
ParameterTypeDescription
uidOUTRemote user ID
muteOUTTrue: video stream disabled; false: video stream enabled

IThunderEventHandler::onVideoSizeChanged

virtual void Thunder::IThunderEventHandler::onVideoSizeChanged(const char* uid, int width, int height, int rotation);

Callback of changes to local or remote video resolution. Receive after calling IThunderEngine::joinRoom whenever video resolution changes.

Parameter
ParameterTypeDescription
uidOUTUser ID
widthOUTWidth (after change)
heightOUTHeight (after change)
rotationOUTReserved parameter, unrealized

IThunderEventHandler::onRemoteVideoPlay

virtual void Thunder::IThunderEventHandler::onRemoteVideoPlay(const char* uid, int width, int height, int elapsed);

Callback of the first frame of remote video displayed. Used to calculate video speed. Receive after calling setRemoteVideoCanvas when video streams are successfully received and displayed.

Parameter
ParameterTypeDescription
uidOUTUser ID
widthOUTWidth
heightOUTHeight
elapsedOUTTime elapsed (ms) from calling IThunderEngine::joinRoom to callback event

IThunderEventHandler::onNetworkTypeChanged

virtual void Thunder::IThunderEventHandler::onNetworkTypeChanged(ThunderNetworkType type);

Callback of network type changes. Receive after completing initialization (initialize) whenever the network type changes.

Parameter
ParameterTypeDescription
typeOUTNetwork connection type. See details in ThunderNetworkType.

IThunderEventHandler::onAudioCaptureStatus

virtual void Thunder::IThunderEventHandler::onAudioCaptureStatus(ThunderAudioDeviceStatus type);

Callback of audio device capture status changes. After enabling audio capture, receive notification for changes in its status.

Parameter
ParameterTypeDescription
typeOUTAudio device capture status. See details in ThunderAudioDeviceStatus.

IThunderEventHandler::onPublishStreamToCDNStatus

virtual void Thunder::IThunderEventHandler::onPublishStreamToCDNStatus(const char* url, ThunderPublishCDNErrorCode errorCode);

Callback of stream pushing to CDN results. After calling addPublishOriginStreamUrl or addPublishTranscodingStreamUrl to push streams, receive this callback whenever the stream pushing status changes.

Parameter
ParameterTypeDescription
urlOUTStream pushing URL
errorCodeOUTStream pushing error code. See details in ThunderPublishCDNErrorCode.

IThunderEventHandler::onRoomStats

virtual void Thunder::IThunderEventHandler::onRoomStats(RoomStats stats);

Callback of upstream/downstream traffic (periodic at two-second intervals). Receive upon joining a channel.

Parameter
ParameterTypeDescription
statsOUTSpecific status. See details in RoomStats.

IThunderEventHandler::onRecvUserAppMsgData

virtual void Thunder::IThunderEventHandler::onRecvUserAppMsgData(const char* uid, const char* msgData);

Callback of service-customized broadcast messages. Users receive callback upon joining a channel if an anchor sends data through sendUserAppMsgData.

Parameter
ParameterTypeDescription
uidOUTSender ID
msgDataOUTReceived service-customized broadcast message

IThunderEventHandler::onSendAppMsgDataFailedStatus

virtual void Thunder::IThunderEventHandler::onSendAppMsgDataFailedStatus(ThunderSendAppMsgDataFailedStatus status);

Users receive this callback if an anchor fails to send data by calling sendUserAppMsgData.

Parameter
ParameterTypeDescription
statusOUTReason that a service-customized broadcast message fails to be sent. See details in ThunderSendAppMsgDataFailedStatus.

IThunderEventHandler::onVideoCaptureStatus

virtual void Thunder::IThunderEventHandler::onVideoCaptureStatus(ThunderCaptureStatus status);

Callback of camera capture status changes. After enabling camera capture, receive notification for changes in its status.

Parameter
ParameterTypeDescription
statusOUTCamera capture status. See details in ThunderCaptureStatus.

IThunderEventHandler::onLocalVideoStats

virtual void Thunder::IThunderEventHandler::onLocalVideoStats(const LocalVideoStats stats);

Provide statistics on local device video stream output. Timing: 1. immediate callback upon calling the publishing API; 2. immediate callback of mid-publishing bracket changes; 3. periodically at two-second intervals.

Parameter
ParameterTypeDescription
statsOUTLocal video statistics. See details in LocalVideoStats..

IThunderEventHandler::onLocalAudioStats

virtual void Thunder::IThunderEventHandler::onLocalAudioStats(const LocalAudioStats stats);

Provide statistics on local device audio stream output. Timing: periodically at two-second intervals.

Parameter
ParameterTypeDescription
statsOUTLocal audio statistics. See details in LocalAudioStats..

IThunderEventHandler::onRemoteVideoStatsOfUid

virtual void Thunder::IThunderEventHandler::onRemoteVideoStatsOfUid(const char* uid, const RemoteVideoStats stats);

Provide the E2E video stream status during remote user calls. Trigger periodically at two-second intervals for each remote user/anchor—that is, when there are multiple remote users/anchors, callback will trigger that many times every two seconds.

Parameter
ParameterTypeDescription
uidOUTRemote user/anchor ID
statsOUTRemote video statistics. See details in RemoteVideoStats..

IThunderEventHandler::onRemoteAudioStatsOfUid

virtual void Thunder::IThunderEventHandler::onRemoteAudioStatsOfUid(const char* uid, const RemoteAudioStats stats);

Provide E2E audio stream status during remote user calls. Trigger periodically at two-second intervals for each remote user/anchor—that is, when there are multiple remote users/anchors, callback will trigger that many times every two seconds.

Parameter
ParameterTypeDescription
uidOUTRemote user/anchor ID
statsOUTRemote audio statistics. See details in RemoteAudioStats..

IThunderEventHandler::onRemoteAudioPlay

virtual void onRemoteAudioPlay(const char* uid, int elapsed);

Callback of the first frame of remote audio played.

Parameter
ParameterTypeDescription
uidOUTRemote user/anchor ID
elapsedOUTTime elapsed (ms) from calling joinRoom to callback event

IThunderEventHandler::onLocalAudioStatusChanged

virtual void onLocalAudioStatusChanged(LOCAL_AUDIO_STREAM_STATUS status, LOCAL_AUDIO_STREAM_ERROR_REASON errorReason);

Callback of local audio status changes.

Parameter
ParameterTypeDescription
statusOUTLocal audio status, see details in LOCAL_AUDIO_STREAM_STATUS.
errorReasonOUTReason for local audio error, see LOCAL_AUDIO_STREAM_ERROR_REASON.

IThunderEventHandler::onLocalVideoStatusChanged

virtual void onLocalVideoStatusChanged(LOCAL_VIDEO_STREAM_STATUS status, LOCAL_VIDEO_STREAM_ERROR_REASON error);

Callback of local video status changes.

Parameter
ParameterTypeDescription
statusOUTLocal video status. See details in LOCAL_VIDEO_STREAM_STATUS.
errorOUTReason for local video error. See details in LOCAL_VIDEO_STREAM_ERROR_REASON.

IThunderEventHandler::onRemoteAudioStateChangedOfUid

virtual void onRemoteAudioStateChangedOfUid(const char* uid,
                                            REMOTE_AUDIO_STATE state,
	                                        REMOTE_AUDIO_REASON reason,
	                                        int elapsed);

Callback of remote user's audio status changes.

Parameter
ParameterTypeDescription
uidOUTRemote user/anchor ID)
stateOUTAudio stream status. See details in REMOTE_AUDIO_STATE.
reasonOUTReason for change. See details in REMOTE_AUDIO_REASON.
elapsedOUTElapsed time (ms) from calling joinRoom to callback event

IThunderEventHandler::onRemoteVideoStateChangedOfUid

virtual void onRemoteVideoStateChangedOfUid(const char* uid,
	                                        REMOTE_VIDEO_STATE state,
	                                        REMOTE_VIDEO_REASON reason,
	                                        int elapsed);

Callback of remote user's video status changes.

Parameter
ParameterTypeDescription
uidOUTRemote user/anchor ID
stateOUTVideo stream status, see details in REMOTE_VIDEO_STATE.
reasonOUTReason for change, see details in REMOTE_VIDEO_REASON.
elapsedOUTTime elapsed (ms) from calling joinRoom to callback event

IThunderEventHandler::onDeviceStats

virtual void onDeviceStats(const DeviceStats& stats);

Callback of CPU or memory usage status.

Parameter
ParameterTypeDescription
statsOUTCPU or memory usage status. See details in DeviceStats.

IThunderEventHandler::onCaptureVolumeIndication

virtual void onCaptureVolumeIndication(int totalVolume, int cpt, int micVolume);

Callback of volume capture. Disabled by default; call enableCaptureVolumeIndication to enable.

Parameter
ParameterTypeDescription
totalVolumeOUTVolume, value range: [0-100]
cptOUTCapture time
micVolumeOUTVolume captured by microphone, value range: [0-100]

IThunderEventHandler::onAudioDeviceVolumeChanged

virtual void onAudioDeviceVolumeChanged(int deviceType, int volume, bool muted);

Callback of volume changes (in playing device, recording device, or audio player application).

Parameter
ParameterTypeDescription
deviceTypeOUTDevice type. See details in MEDIA_DEVICE_TYPE.
volumeOUTVolume
mutedOUTMuted status: 0-no, not muted, 1-yes, muted

IThunderEventHandler::onVideoDeviceStateChanged

virtual void onVideoDeviceStateChanged(const char* deviceId, MEDIA_DEVICE_TYPE deviceType, MEDIA_DEVICE_STATE_TYPE deviceState);

Callback of video device status changes (for example, plugging in or unplugging a camera).

Parameter
ParameterTypeDescription
deviceIdOUTVideo device ID according to the VideoDeviceInfo.index
deviceTypeOUTDevice type. See details in MEDIA_DEVICE_TYPE.
deviceStateOUTVideo device status. See details in MEDIA_DEVICE_STATE_TYPE.

IThunderEventHandler::onHowlingDetectResult

virtual void onHowlingDetectResult(bool bHowling);

Callback of howling detection results.

Note:

  • The callback is received when the enableHowlingDetector is enabled and the microphone is on.
  • The callback is called when the echo detection status changes.
  • The callback will be recevied when the enableHowlingDetector is enabled and the microphone status changes.
  • This callback will be received once from enableHowlingDetector(false) to enableHowlingDetector(true) when the microphone is on.
Parameter
ParameterTypeDescription
bHowlingOUTDetection result: "true"-detected, "false"-not detected

IThunderEventHandler::onEchoDetectResult

virtual void onEchoDetectResult(bool bEcho);

Callback of echo detection results.

Note:

  • The callback is received when the enableEchoDetector is enabled and the microphone is on.
  • The callback is called when the echo detection status changes.
  • The callback will be recevied when the enableEchoDetector is enabled and the microphone status changes.
  • This callback will be received once from enableEchoDetector(false) to enableEchoDetector(true) when the microphone is on.
Parameter
ParameterTypeDescription
bEchoOUTDetection result: "true"-detected, "false"-not detected

IThunderEventHandler::onWarning

virtual void onWarning(ThunderWarningCode warnCode, const char *msg);

Inform the business layer of SDK warnings.

| Parameter | Type | Description | | :--- | :--- | | :--- | | warnCode | OUT | Warning code, see details in ThunderWaringCode | | msg | OUT | Warning details |


IAudioFrameObserver

IAudioFrameObserver::onRecordAudioFrame

virtual void Thunder::IAudioFrameObserver::onRecordAudioFrame(AudioFrame& audioFrame);

Callback of raw audio capture data.

Parameter
ParameterTypeDescription
audioFrameOUTRaw audio data. See details in AudioFrame.

IAudioFrameObserver::onPlaybackAudioFrame

virtual void Thunder::IAudioFrameObserver::onPlaybackAudioFrame(AudioFrame& audioFrame);

Callback of raw audio playing data.

Parameter
ParameterTypeDescription
audioFrameOUTFor raw audio data, see details in AudioFrame.

IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing

virtual void Thunder::IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing(char* uid, AudioFrame& audioFrame);

Callback of remote user-decoded raw audio data. Users are differentiated by ID.

Parameter
ParameterTypeDescription
uidOUTRemote user ID
audioFrameOUTFor raw audio data, see details in AudioFrame.

IThunderAudioPlayerNotify

IThunderAudioPlayerNotify::onAudioFileVolume

virtual void Thunder::IThunderAudioPlayerNotify::onAudioFileVolume(unsigned int volume, unsigned int currentMs, unsigned int totalMs);

Callback of audio player progress.

  • Call IThunderAudioPlayer::SetFilePlayerNotify with IThunderAudioPlayerNotify
  • set as the monitoring object.
Parameter
ParameterTypeDescription
volumeOUTVolume range: [0-100]
currentMsOUTCurrent playing progress (ms)
totalMsOUTTotal audio file duration (ms)

IThunderAudioPlayerNotify::onAudioFilePlayEnd

Caution:

virtual void Thunder::IThunderAudioPlayerNotify::onAudioFilePlayEnd();

Callback of audio player playing.

  • Call IThunderAudioPlayer::[SetFilePlayerNotify](/en/
  • product_category/rtc_service/rt_video_interaction/api/Windows/v2.9.10/function.html#IThunderAudioPlayer::SetFilePlayerNotify) with IThunderAudioPlayerNotify set as the monitoring object.

IThunderAudioPlayerNotify::onAudioFileStateChange

virtual void onAudioFileStateChange(ThunderAudioFilePlayerEvent event, ThunderAudioFilePLayerErrorCode errorCode);

Callback of player status changes.

  • Call API IThunderAudioPlayer::SetFilePlayerNotify to set IThunderAudioPlayerNotify as a listener object.
Parameter
ParameterTypeDescription
eventOUTPlaying status. See details in ThunderAudioFilePlayerEvent
errorCodeOUTError code. See details in ThunderAudioFilePLayerErrorCode

IVideoFrameObserver

IVideoFrameObserver::onPreviewVideoFrame

virtual bool Thunder::IVideoFrameObserver::onPreviewVideoFrame(VideoFrame& videoFrame);

Callback of local video preview data, currently in YUV420 format.

Parameter
ParameterTypeDescription
videoFrameOUTLocal video preview data. See details in VideoFrame.

IVideoFrameObserver::onRenderVideoFrame

virtual bool Thunder::IVideoFrameObserver::onRenderVideoFrame(const char* uid, VideoFrame& videoFrame);

Callback of user's video rendering data in YUV420 format.

Parameter
ParameterTypeDescription
uidOUTUser ID
videoFrameOUTVideo rendering data. See details in VideoFrame..

IVideoCaptureObserver

IVideoCaptureObserver::onCaptureVideoFrame

virtual bool Thunder::IVideoCaptureObserver::onCaptureVideoFrame(VideoFrame& videoFrame);

Callback of local video capture data, currently in BGRA format.

Parameter
ParameterTypeDescription
videoFrameOUTLocal video capture data. See details in VideoFrame.

IThunderMediaExtraInfoObserver

IThunderMediaExtraInfoObserver::onSendMediaExtraInfoFailedStatus

virtual void Thunder::IThunderMediaExtraInfoObserver::onSendMediaExtraInfoFailedStatus(int status);

Callback of failure to send Supplemental Enhancement Information (SEI).

Parameter
ParameterTypeDescription
statusOUTError code. See details in ThunderSendMediaExtraInfoFailedStatus.

IThunderMediaExtraInfoObserver::onRecvMediaExtraInfo

virtual void Thunder::IThunderMediaExtraInfoObserver::onRecvMediaExtraInfo(const char* uid, const char* pData, int dataLen);

Callback of SEI received.

Parameter
ParameterTypeDescription
uidOUTUser ID
pDataOUTSEI
dataLenOUTSEI length

IThunderMediaExtraInfoObserver::onRecvMixAudioInfo

virtual bool Thunder::IThunderMediaExtraInfoObserver::onRecvMixAudioInfo(const char* uid, MixAudioInfoList& infos);

Callback of received mixed audio stream SEI.

Parameter
ParameterTypeDescription
uidOUTUser ID
infosOUTMixed audio stream information

IThunderMediaExtraInfoObserver::onRecvMixVideoInfo

virtual bool Thunder::IThunderMediaExtraInfoObserver::onRecvMixVideoInfo(const char* uid, MixVideoInfoList& infos);

Callback of received mixed video stream SEI.

Parameter
ParameterTypeDescription
uidOUTUser ID
infosOUTMixed video stream information

Enumeration & Structure

AudioVolumeInfo

#define MAX_THUNDER_UID_LEN 65 // UID length

struct AudioVolumeInfo
{
  char uid[MAX_THUNDER_UID_LEN]; // User ID
  int volume; // Volume
};

Playing volume information


AUTH_RESULT

enum Thunder::AUTH_RESULT

Authentication results

MemberDescription
AUTHRES_SUCCUSS(0)Authentication succeeded
AUTHRES_ERR_SERVER_INTERNAL(10000)Internal server error, try again
AUTHRES_ERR_NO_TOKEN(10001)No token, call updateToken
AUTHRES_ERR_TOKEN_ERR(10002)Token authentication failed (incorrect digital signature); appSecret may be incorrect
AUTHRES_ERR_APPID(10003)Application ID in token is inconsistent with the application ID used in authentication
AUTHRES_ERR_UID(10004)User ID in token is inconsistent with the user ID used in authentication
AUTHRES_ERR_TOKEN_EXPIRE(10005)Token expired
AUTHRES_ERR_NO_APP(10006)The application does not exist, and is not registered in the management background
AUTHRES_ERR_TOKEN_WILL_EXPIRE(10007)Token will expire. Callback returned 30 seconds in advance.
AUTHRES_ERR_NO_BAND(10008)The user is banned

USER_OFFLINE_REASON_TYPE

enum Thunder::USER_OFFLINE_REASON_TYPE

Cause of user going offline

MemberDescription
USER_OFFLINE_QUIT(1)The user actively went offline
USER_OFFLINE_DROPPED(2)Timeout, no data received for a long time. Note: because the SDK's unreliable channel is used, the other party may have actively gone offline and it is misjudged as timeout
USER_OFFLINE_BECOME_AUDIENCE(3)User status switched from anchor to audience (live streaming mode)

NetworkQuality

enum Thunder::NetworkQuality

Network quality

MemberDescription
THUNDER_QUALITY_UNKNOWN(0)Unknown quality
THUNDER_QUALITY_EXCELLENT(1)Excellent network quality
THUNDER_QUALITY_GOOD(2)Good network quality
THUNDER_QUALITY_POOR(3)Poor network quality; communication is not affected but the user can sense the deficiency
THUNDER_QUALITY_BAD(4)Bad network quality; communication is hindered but possible
THUNDER_QUALITY_VBAD(5)Very bad network quality; communication is essentially impossible
THUNDER_QUALITY_DOWN(6)Disconnected; communication is impossible

ThunderConnectionStatus

enum Thunder::ThunderConnectionStatus

Server connection status

MemberDescription
THUNDER_CONNECTION_STATUS_CONNECTING(0)Connecting
THUNDER_CONNECTION_STATUS_CONNECTED(1)Connected
THUNDER_CONNECTION_STATUS_DISCONNECTED(2)Disconnected

ThunderNetworkType

enum Thunder::ThunderConnectionStatus

Network types

MemberDescription
THUNDER_NETWORK_TYPE_UNKNOWN(0)Unknown connection type
THUNDER_NETWORK_TYPE_DISCONNECTED(1)Disconnected
THUNDER_NETWORK_TYPE_CABLE(2)Wired network
THUNDER_NETWORK_TYPE_WIFI(3)Wi-Fi (hotspot included)
THUNDER_NETWORK_TYPE_MOBILE(4)Mobile network. 2G, 3G and 4G network are not identified
THUNDER_NETWORK_TYPE_MOBILE_2G(5)2G mobile network
THUNDER_NETWORK_TYPE_MOBILE_3G(6)3G mobile network
THUNDER_NETWORK_TYPE_MOBILE_4G(7)4G mobile network

ThunderAudioDeviceStatus

enum Thunder::ThunderConnectionStatus

Audio device status

MemberDescription
THUNDER_AUDIO_DEVICE_STATUS_INIT_CAPTURE_SUCCESS(0)Callback of successful audio capture device initialization
THUNDER_AUDIO_DEVICE_STATUS_INIT_CAPTURE_ERROR_OR_NO_PERMISSION(1)Callback of failed audio capture initialization, possibly caused by no permission
THUNDER_AUDIO_DEVICE_STATUS_RELEASE_CAPTURE_SUCCESS(2)Callback of successful audio capture device release

ThunderPublishCDNErrorCode

enum Thunder::ThunderPublishCDNErrorCode

Error codes for stream pushing to CDN

MemberDescription
THUNDER_PUBLISH_CDN_ERR_SUCCESS(0)Stream pushing succeeded
THUNDER_PUBLISH_CDN_ERR_TOCDN_FAILED(1)Pushing streams to external server (CDN) failed. 1. Check whether the URL is correct. 2. Check whether the token in the URL is valid (generally, CDN stream pushing requires a token; if not, you can ignore it).
THUNDER_PUBLISH_CDN_ERR_THUNDERSERVER_FAILED(2)Pushing streams to the internal thunder server failed. 1. Check the anchor uplink network. 2. Contact us to troubleshoot internal transmission problems.
THUNDER_PUBLISH_CDN_ERR_THUNDERSERVER_STOP(3)Stop stream pushing

RoomStats

struct Thunder::RoomStats
{
  int totalDuration; // Total call duration (s)
  int txBitrate; // Link sending bit rate (bps)
  int rxBitrate; // Link receiving bit rate (bps)
  int txBytes; // Total bytes sent
  int rxBytes; // Total bytes received
  int txAudioBytes; // Total audio bytes sent
  int rxAudioBytes; // Total audio bytes received
  int txVideoBytes; // Total video bytes sent
  int rxVideoBytes; // Total video bytes received
  int txAudioBitrate; // Audio packet sending bit rate (bps)
  int rxAudioBitrate; // Audio packet receiving bit rate (bps)
  int txVideoBitrate; // Video packet sending bit rate (bps)
  int rxVideoBitrate; // Video packet receiving bit rate (bps)
  int lastmileDelay;  // Local client-to-edge server delay (ms)
};

Upstream/downstream room traffic information


ThunderSendAppMsgDataFailedStatus

enum Thunder::ThunderSendAppMsgDataFailedStatus

Reasons that user-customized messages fail to be sent

MemberDescription
THUNDER_SEND_APP_DATA_HIGHT_FREQUENCY(1)Sending frequency too high. The recommended setting is less frequent than twice per second.
THUNDER_SEND_APP_DATA_LARGE_MSG_DATA(2)Sent data too large. Each instance should not exceed 200 bytes.
THUNDER_SEND_APP_DATA_NO_PUBLISH_SUCCESS(3)Publishing failed

ThunderCaptureStatus

enum Thunder::ThunderCaptureStatus

Camera capture status

MemberDescription
THUNDER_VIDEO_CAPTURE_STATUS_SUCCESS(0)Capture enabled
THUNDER_VIDEO_CAPTURE_STATUS_AUTHORIZED(1)The user has not given permission (temporarily unsupported on PC)
THUNDER_VIDEO_CAPTURE_STATUS_NOT_DETERMINED(2)have not given permission (temporarily unsupported on PC)
THUNDER_VIDEO_CAPTURE_STATUS_RESTRICTED(3)Occupied
THUNDER_VIDEO_CAPTURE_STATUS_DENIED(4)No permission
THUNDER_VIDEO_CAPTURE_STATUS_DENIED(5)Camera disabled
THUNDER_VIDEO_CAPTURE_STATUS_LOST(6)Device removed
THUNDER_VIDEO_CAPTURE_STATUS_RESUME(7)Device was removed and reinserted

QUALITY_ADAPT_INDICATION

enum Thunder::QUALITY_ADAPT_INDICATION

Adaptive video quality

MemberDescription
ADAPT_NONE(0)Local video quality is constant
ADAPT_UP_BANDWIDTH(1)Local video quality has improved due to higher network bandwidth
ADAPT_DOWN_BANDWIDTH(2)Local video quality has worsened due to lower network bandwidth

VIDEO_CODEC_TYPE

enum Thunder::QUALITY_ADAPT_INDICATION

Video encoding types

MemberDescription
VIDEO_CODEC_UNKNOW(0)Unknown
VIDEO_CODEC_VP8(1)Standard VP8
VIDEO_CODEC_H264(2)Standard H264
VIDEO_CODEC_H265(3)Standard H265
VIDEO_CODEC_EVP(4)Enhanced VP8
VIDEO_CODEC_E264(5)Enhanced H264

VIDEO_ENCODED_TYPE

enum Thunder::VIDEO_ENCODED_TYPE

Video encoding modes

MemberDescription
VIDEO_ENCODED_TYPE_UNKNOWN(0)Unknown
VIDEO_ENCODED_TYPE_HARD(1)Hard-coding
VIDEO_ENCODED_TYPE_SOFT(2)Soft-coding

LocalVideoStats

struct Thunder::LocalVideoStats
{
int sendBitrate;// Actual sending bit rate (kbps), not including videos reloaded after packet loss
  int sendFrameRate;// Actual sending frame rate (fps), not including videos reloaded after packet loss
  int encoderOutputFrameRate;// Local encoder output frame rate (fps)
  int rendererOutputFrameRate;// Local preview output frame rate (fps)
  int targetBitrate;// Current encoder target encoding bit rate (kbps). The SDK estimates this value according to current network status
  int targetFrameRate;// Current encoder target encoding frame rate (fps). The SDK estimates this value according to current network status
  QUALITY_ADAPT_INDICATION qualityAdaptIndication;// Self-adaptive local video quality since last statistics (based on target frame rate and target bit rate)
  int encodedBitrate;// Video encoding bit rate (kbps), not including videos reloaded after packet loss
  int encodedFrameWidth;// Encoded video width (px)
  int encodedFrameHeight;// Encoded video height (px)
  int encodedFrameCount;// Video frames sent; cumulative
  VIDEO_ENCODED_TYPE encodedType;// Encoding mode
  VIDEO_CODEC_TYPE codecType;// Video encoding type
  int configBitRate;//Configured bit rate (kbps)
  int configFrameRate;// Configured frame rate
  int configWidth;// Configured video width
  int configHeight;// Configured video height 
};

Statistics for video streams sent by local device


LocalAudioStats

struct LocalAudioStats
{
  int encodeBitrate; // Encoding rate (kbps) 
  int numChannels;    // Number of channels
  int sendSampleRate; // Sampling rate (Hz)
  int sendBitrate;    // Sending bit rate (average value in kbps)
  int enableVad; // Whether to enable VAD when sending audio: 0-no, disable, 1-yes, enable
};

Statistics for audio streams sent by local device


REMOTE_VIDEO_STREAM_TYPE

enum Thunder::REMOTE_VIDEO_STREAM_TYPE

High/Low quality stream types

MemberDescription
REMOTE_VIDEO_STREAM_HIGH(0)High quality stream
REMOTE_VIDEO_STREAM_LOW(1)Low quality stream

RemoteVideoStats

struct RemoteVideoStats
{
 int delay; // Delay between pushing and playing remote video stream
  int width; // Width of remote video stream
  int height; // Height of remote video stream
  int receivedBitrate; // Receiving bit rate (kbps)
  int decoderOutputFrameRate; // Remote video decoder output frame rate (fps)
  int rendererOutputFrameRate; // Remote video renderer output frame rate (fps)
  int packetLossRate; // Remote video packet loss rate (%) after anti-packet loss measures
  REMOTE_VIDEO_STREAM_TYPE rxStreamType; // Video stream types, including high and low quality streams
  int totalFrozenTime; // Cumulative time (ms) from a remote user first publishing to the first instance of video freezing
  int frozenRate; // The cumulative duration of video freezing since a remote user started publishing as a percentage (%) of the total video duration
};

E2E video stream status during remote user calls


RemoteAudioStats

struct RemoteAudioStats
{
   int quality;// Remote user audio stream quality. 0: Unknown; 1: Excellent; 2: Good; 3: Poor, communication is not affected but the user can sense the deficiency; 4: Bad, communication is hindered but possible; 5: Very Bad, communication is essentially impossible; 6: Disconnected, communication is impossible 
    int networkTransportDelay;// Network delay from audio sending end to receiving end
    int jitterBufferDelay;// Receiving-end delay due to network jitter buffer
    int frameLossRate;// Remote audio stream frame loss rate (%) 
    int numChannels;// Number of channels
    int receivedSampleRate;// Remote audio sampling rate (Hz)
    int receivedBitrate;// Average bit rate for remote audio within the statistical period
    int totalFrozenTime;// Cumulative time (ms) from a remote user joining a channel until audio freezing occurs
    int frozenRate;// The cumulative duration of audio freezing after a remote user joined a channel as a percentage (%) of the total audio duration
};

E2E audio stream status during remote user calls


AUDIO_FRAME_TYPE

enum IAudioFrameObserver::AUDIO_FRAME_TYPE

Audio frame types

MemberDescription
FRAME_TYPE_PCM16(0)PCM 16bit little endian

AudioFrame

struct IAudioFrameObserver::AudioFrame
{
  AUDIO_FRAME_TYPE type;
  int samples; // Number of samples in this frame
  int bytesPerSample; // Bytes per sample: PCM (16 digits) contains two bytes
  int channels; // The number of channels (data are interleaved if stereo); 1: single channel, 2: dual channel
  int samplesPerSec; // Sampling rate
  void* buffer; // data buffer
  long long renderTimeMs; // Not used
  int avsync_type; //  Not used
};

Audio data information. See audio frame type details in AUDIO_FRAME_TYPE.


VIDEO_FRAME_TYPE

enum Thunder::VIDEO_FRAME_TYPE

Video frame types

MemberDescription
FRAME_TYPE_YUV420(0)YUV420
FRAME_TYPE_BGRA(1)BGRA

VideoFrame

#define MAX_THUNDER_VIDEO_BUFFER_PLANE 8 // Maximum plane number of video frames (I420: 3, RGB: 1)

struct VideoFrame
{
  void* dataPtr[MAX_THUNDER_VIDEO_BUFFER_PLANE]; // Data pointer of each video frame plane
  int dataLength[MAX_THUNDER_VIDEO_BUFFER_PLANE]; // Data length of each video frame plane
  int dataStride[MAX_THUNDER_VIDEO_BUFFER_PLANE]; // Data step size of each video frame plane
  int width; // Width of video frame
  int height; // Width and height of video frame
  VIDEO_FRAME_TYPE type; // Type of video frame
  int rotation; // Rotation angle
  __int64 timeStamp; // Display timestamp
};

Video data information. See video frame type details in VIDEO_FRAME_TYPE.


ThunderSendMediaExtraInfoFailedStatus

enum IThunderMediaExtraInfoObserver::ThunderSendMediaExtraInfoFailedStatus

Cause of failure to send SEI

MemberDescription
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_DATA_EMPTY(1)SEI is null
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_DATA_TOO_LARGE(2)Data oversized
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_FREQUENCY_TOO_HIGHT(3)Overly frequent
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_NOT_IN_ANCHOR_SYSTEM(4)Not an anchor system
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_NO_JOIN_MEDIA(5)Not in a channel
THUNDER_SEND_MEDIA_EXTRA_INFO_FAILED_NO_PUBLISH_SUCCESS(6)Publishing failed

MixAudioInfo

  struct MixAudioInfo // Information about mixed audio stream
  {
    char uid[MAX_THUNDER_UID_LEN]; // User ID
    int volume;    // Volume of mixed audio stream [0,100]
  };

Mixed audio streams information


MixAudioInfoList

  struct MixAudioInfoList // Mixed audio streams information list
  {
    int count; // Number of mixed audio streams information lists
    MixAudioInfo mixAudio[MAX_THUNDER_MIX_AUDIO_COUNT]; // Specific information about mixed audio streams
  };

Mixed audio streams information list


MixVideoInfo

  struct MixVideoInfo
  {
    char uid[MAX_THUNDER_UID_LEN]; // User ID
    int width; // Original width of user's video
    int height; // Original height of user's video
    int cropX; // In the source video, the x-coordinate of the origin point to use for clipping when video mixing
    int cropY; // In the source video, the y-coordinate of the origin point to use for cropping when video mixing
    int cropW; // Width of the source video to be clipped in video mixing
    int cropH; // Height of the source video to be clipped in video mixing
    int layoutX; // x-coordinate of origin for user's video on video mixing canvas
    int layoutY; // y-coordinate of the origin for user's video on video mixing canvas
    int layoutW; // Width of user's video on video mixing canvas
    int layoutH; // Height of user's video on video mixing canvas
    int zOrder; // Layer number of this user's video frame in video mixing. Values are integers from [0, 100], and the minimum value is 0, indicating the bottommost level
    float alpha; // User's video frame transparency in video mixing
                 // Value range: [0.0, 1.0]; 0.0 indicates complete transparency;  1.0 indicates complete opacity
  };

Information about mixed video streams


MixVideoInfoList

  struct MixVideoInfoList // List of information about mixed video streams
  {
    int count; // Number of mixed video streams information lists
    MixVideoInfo mixVideo[MAX_THUNDER_MIX_VIDEO_COUNT]; // Specific information about mixed video streams
  };

List of information about mixed video streams


ThunderAudioFilePlayerEvent

enum Thunder::ThunderAudioFilePlayerEvent

Local file playing status

MemberDescription
AUDIO_PLAY_EVENT_OPEN(1)File opened
AUDIO_PLAY_EVENT_PLAY(2)Playing started
AUDIO_PLAY_EVENT_STOP(3)Playing stopped
AUDIO_PLAY_EVENT_PAUSE(4)Paused
AUDIO_PLAY_EVENT_RESUME(5)Playing resumed
AUDIO_PLAY_EVENT_END(6)Playing completed
AUDIO_PLAY_EVENT_SEEK_COMPLETE(7)Fast forwarding

ThunderAudioFilePLayerErrorCode

enum Thunder::ThunderAudioFilePLayerErrorCode

Local file playing error codes

MemberDescription
AUDIO_PLAYER_OPEN_FILE_PATH_ERROR(-4)Incorrect file path
AUDIO_PLAYER_OPEN_FILE_FORMAT_NOT_SUPPORT(-3)Incorrect file format
AUDIO_PLAYER_OPEN_FILE_DECODER_FAILED(-2)Decoding file format failed
AUDIO_PLAYER_CREATE_FILE_DECODER_FAILED(-1)Parsing file format failed
AUDIO_PLAYER_STATUS_SUCCESS(0)Succeeded

LOCAL_AUDIO_STREAM_STATUS

enum Thunder::LOCAL_AUDIO_STREAM_STATUS

Local audio stream status

MemberDescription
THUNDER_LOCAL_AUDIO_STREAM_STATUS_STOPPED(0)Default initialization status
THUNDER_LOCAL_AUDIO_STREAM_STATUS_CAPTURING(1)Recording device successfully enabled
THUNDER_LOCAL_AUDIO_STREAM_STATUS_ENCODING(2)First frame of local audio successfully coded
THUNDER_LOCAL_AUDIO_STREAM_STATUS_SENDING(3)First frame of local audio successfully sent
THUNDER_LOCAL_AUDIO_STREAM_STATUS_FAILED(4)Enabling local audio failed

LOCAL_AUDIO_STREAM_ERROR_REASON

enum Thunder::LOCAL_AUDIO_STREAM_ERROR_REASON

Cause of local audio failure

MemberDescription
THUNDER_LOCAL_AUDIO_STREAM_ERROR_OK(0)Normal
THUNDER_LOCAL_AUDIO_STREAM_ERROR_UNKOWN(1)Unknown
THUNDER_LOCAL_AUDIO_STREAM_ERROR_CAPTURE_FAILURE(2)Local audio capture failed
THUNDER_LOCAL_AUDIO_STREAM_ERROR_ENCODE_FAILURE(3)Local audio encoding failed

LOCAL_VIDEO_STREAM_STATUS

enum Thunder::LOCAL_VIDEO_STREAM_STATUS

Local video stream status

MemberDescription
THUNDER_LOCAL_VIDEO_STREAM_STATUS_STOPPED(0)Default initialization status
THUNDER_LOCAL_VIDEO_STREAM_STATUS_CAPTURING(1)Recording device successfully enabled
THUNDER_LOCAL_VIDEO_STREAM_STATUS_PREVIEWING(2)Local video preview succeeded
THUNDER_LOCAL_VIDEO_STREAM_STATUS_ENCODING(3)First frame of local video is encoded
THUNDER_LOCAL_VIDEO_STREAM_STATUS_SENDING(4)First frame of local video is sent
THUNDER_LOCAL_VIDEO_STREAM_STATUS_FAILED(5)Enabling local video failed

LOCAL_VIDEO_STREAM_ERROR_REASON

enum Thunder::LOCAL_VIDEO_STREAM_ERROR_REASON

Cause of local video failure

MemberDescription
THUNDER_LOCAL_VIDEO_STREAM_ERROR_OK(0)Normal
THUNDER_LOCAL_VIDEO_STREAM_ERROR_FAILURE(1)Unknown
THUNDER_LOCAL_VIDEO_STREAM_ERROR_DEVICE_DENIED(2)No permission to enable the capture device
THUNDER_LOCAL_VIDEO_STREAM_ERROR_DEVICE_RESTRICTED(3)The capture device is in use
THUNDER_LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE(4)Local video capture failed. Check whether the device is working properly
THUNDER_LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE(5)Local video encoding failed

REMOTE_AUDIO_STATE

enum Thunder::REMOTE_AUDIO_STATE

Remote audio stream status

MemberDescription
THUNDER_REMOTE_AUDIO_STATE_STOPPED(0)Default initialization status, reported under these conditions: THUNDER_REMOTE_AUDIO_REASON_LOCAL_STOPPED(4) or THUNDER_REMOTE_AUDIO_REASON_REMOTE_STOPPED(6)
THUNDER_REMOTE_AUDIO_STATE_STARTING(1)Local user has accepted the first remote audio stream package
THUNDER_REMOTE_AUDIO_STATE_DECODING(2)Decoding, playing is normal
THUNDER_REMOTE_AUDIO_STATE_FROZEN(3)Remote audio is frozen, reported under the condition of THUNDER_REMOTE_AUDIO_REASON_NETWORK_CONGESTION(2)

REMOTE_AUDIO_REASON

enum Thunder::REMOTE_AUDIO_REASON

Cause of remote audio stream status changes

MemberDescription
THUNDER_REMOTE_AUDIO_REASON_OK(0)Normal
THUNDER_REMOTE_AUDIO_REASON_INTERNAL(1)Internal reason
THUNDER_REMOTE_AUDIO_REASON_NETWORK_CONGESTION(2)Network blocked
THUNDER_REMOTE_AUDIO_REASON_NETWORK_RECOVERY(3)Network recovered
THUNDER_REMOTE_AUDIO_REASON_LOCAL_STOPPED(4)Local user stopped receiving remote audio or disabled the audio module
THUNDER_REMOTE_AUDIO_REASON_LOCAL_STARTED(5)Local user resumed receiving remote audio or enabled the audio module
THUNDER_REMOTE_AUDIO_REASON_REMOTE_STOPPED(6)Remote user stopped sending audio or disabled the audio module
THUNDER_REMOTE_AUDIO_REASON_REMOTE_STARTED(7)Remote user resumed sending remote audio or enabled the audio module

REMOTE_VIDEO_STATE

enum Thunder::REMOTE_VIDEO_STATE

Remote video stream status.

MemberDescription
THUNDER_REMOTE_VIDEO_STATE_STOPPED(0)Default initialization status, reported under these conditions: THUNDER_REMOTE_VIDEO_REASON_LOCAL_STOPPED(4) or THUNDER_REMOTE_VIDEO_REASON_REMOTE_STOPPED(6)
THUNDER_REMOTE_VIDEO_STATE_STARTING(1)Local user has accepted the first remote video package
THUNDER_REMOTE_VIDEO_STATE_DECODING(2)Remote video is being decoded
THUNDER_REMOTE_VIDEO_STATE_RENDERING(3)Remote video is being rendered
THUNDER_REMOTE_VIDEO_STATE_FROZEN(4)Remote video is frozen, reported under the condition of THUNDER_REMOTE_VIDEO_REASON_NETWORK_CONGESTION(2)

REMOTE_VIDEO_REASON

enum Thunder::REMOTE_VIDEO_REASON

Cause of the remote video stream status changes.

MemberDescription
THUNDER_REMOTE_VIDEO_REASON_OK(0)Normal
THUNDER_REMOTE_VIDEO_REASON_INTERNAL(1)Internal reason
THUNDER_REMOTE_VIDEO_REASON_NETWORK_CONGESTION(2)Network blocked
THUNDER_REMOTE_VIDEO_REASON_NETWORK_RECOVERY(3)Network recovered
THUNDER_REMOTE_VIDEO_REASON_LOCAL_STOPPED(4)Local user stopped receiving remote video or disabled the video module
THUNDER_REMOTE_VIDEO_REASON_LOCAL_STARTED(5)Local user resumed receiving remote video or enabled the video module
THUNDER_REMOTE_VIDEO_REASON_REMOTE_STOPPED(6)Remote user stopped sending video or disabled the video module
THUNDER_REMOTE_VIDEO_REASON_REMOTE_STARTED(7)Remote user resumed sending remote video or enabled the video module

MEDIA_DEVICE_TYPE

enum Thunder::MEDIA_DEVICE_TYPE

Media device types

MemberDescription
UNKNOWN_AUDIO_DEVICE(-1)Unknown device
AUDIO_PLAYOUT_DEVICE(0)Audio player
AUDIO_RECORDING_DEVICE(1)Audio recording device
VIDEO_RENDER_DEVICE(2)Video rendering device
VIDEO_CAPTURE_DEVICE(3)Video capture device
AUDIO_APPLICATION_PLAYOUT_DEVICE(4)Audio player application

MEDIA_DEVICE_STATE_TYPE

enum Thunder::MEDIA_DEVICE_STATE_TYPE

Media device status.

MemberDescription
MEDIA_DEVICE_STATE_ACTIVE(1)The device is available
MEDIA_DEVICE_STATE_DISABLED(2)The device is not available
MEDIA_DEVICE_STATE_NOT_PRESENT(4)The device does not exist
MEDIA_DEVICE_STATE_UNPLUGGED(8)The device is unplugged

ThunderWaringCode

enum Thunder::ThunderWaringCode

Warning code

Enumeration ValueDescription
THUNDER_PACK_AUDIO_WARING(3001)The capture volume of the audio capture device is too low

DeviceStats

CPU/memory usage status

struct Thunder::DeviceStats
{
  double cpuTotalUsage; // Current system CPU usage (%)
  double cpuAppUsage; // Current application CPU usage (%)
  double memoryAppUsage; // Current application memory usage (%)
  double memoryTotalUsage; // Current system memory usage (%)
};

Was this page helpful?

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