public interface AVChatStateObserverLite
Modifier and Type | Method and Description |
---|---|
void |
onAudioDeviceChanged(int device,
java.util.Set<java.lang.Integer> set,
boolean shouldSelect)
Callback for audio devices changes
|
boolean |
onAudioFrameFilter(AVChatAudioFrame frame)
Voice data processing interface.
|
void |
onCallEstablished()
Get notified when a session is established
|
void |
onConnectionTypeChanged(int netType)
Callback for connection type changes
|
void |
onDeviceEvent(int code,
java.lang.String desc)
Callback for audio or video capture devices events
|
void |
onDisconnectServer(int code)
Get notified when a client gets disconnected from the server
|
void |
onFirstVideoFrameAvailable(java.lang.String account)
Get notified before rendering the first video frame
|
void |
onFirstVideoFrameRendered(java.lang.String account)
Get notified for rendering the first video frame
|
void |
onJoinedChannel(int code,
java.lang.String audioFile,
java.lang.String videoFile,
int elapsed)
Callback for connections to the server
|
void |
onLeaveChannel()
Get notified when a user leaves a channel
|
void |
onLiveEvent(int event)
Callback for live events
|
void |
onNetworkQuality(java.lang.String account,
int quality,
AVChatNetworkStats stats)
Network status changes
|
void |
onProtocolIncompatible(int status)
Get notified when local and remote protocols are incompatible
|
void |
onReportSpeaker(java.util.Map<java.lang.String,java.lang.Integer> speakers,
int mixedEnergy)
Callback for the speaker
AVChatParameters.KEY_AUDIO_REPORT_SPEAKER is required. |
void |
onSessionStats(AVChatSessionStats sessionStats)
Session stats
|
void |
onUserJoined(java.lang.String account)
Get notified when a user joins a channel
|
void |
onUserLeave(java.lang.String account,
int event)
Get notified when a user leaves a channel
|
void |
onVideoFpsReported(java.lang.String account,
int fps)
Callback for video FPS updates.
|
boolean |
onVideoFrameFilter(AVChatVideoFrame frame,
boolean maybeDualInput)
Video data external processing interface.
|
boolean |
onVideoFrameFilter(VideoFrame input,
VideoFrame[] outputFrames,
VideoFilterParameter filterParameter)
Video data external processing interface.
|
void |
onVideoFrameResolutionChanged(java.lang.String account,
int width,
int height,
int rotate)
Callback for video resolution changes
|
void onJoinedChannel(int code, java.lang.String audioFile, java.lang.String videoFile, int elapsed)
code
- the result of the join operation AVChatResCode.JoinChannelCode
audioFile
- audio file generated by server recordingvideoFile
- video file generated by server recordingelapsed
- the time consumed by the following operations and joining a channel. Unit: millisecondsAVChatManagerLite.call2(String, AVChatType, AVChatNotifyOption, AVChatCallback)
,
AVChatManagerLite.accept2(long, AVChatCallback)
,
AVChatManagerLite.joinRoom2(String, AVChatType, AVChatCallback)
void onUserJoined(java.lang.String account)
account
- User accountAVChatManagerLite.call2(String, AVChatType, AVChatNotifyOption, AVChatCallback)
,
AVChatManagerLite.accept2(long, AVChatCallback)
,
AVChatManagerLite.joinRoom2(String, AVChatType, AVChatCallback)
void onUserLeave(java.lang.String account, int event)
account
- user IDevent
- AVChatUserQuitType
AVChatManagerLite.hangUp2(long, AVChatCallback)
,
AVChatManagerLite.leaveRoom2(String, AVChatCallback)
void onLeaveChannel()
void onProtocolIncompatible(int status)
status
- AVChatResCode.ERROR_PROTO_INCOMPATIBLE_LOCAL_LOW
local protocol is low, AVChatResCode.ERROR_PROTO_INCOMPATIBLE_REMOTE_LOW
remote protocol is lowAVChatResCode.ERROR_PROTO_INCOMPATIBLE_REMOTE_LOW
,
AVChatResCode.ERROR_PROTO_INCOMPATIBLE_LOCAL_LOW
void onDisconnectServer(int code)
code
- AVChatResCode.ERROR_DISCONNECT_SERVER_TIMEOUT
connection timeout, AVChatResCode.ERROR_DISCONNECT_SERVER_CHANNEL_CLOSED
the channel is closedAVChatResCode.ERROR_DISCONNECT_SERVER_TIMEOUT
,
AVChatResCode.ERROR_DISCONNECT_SERVER_CHANNEL_CLOSED
void onNetworkQuality(java.lang.String account, int quality, AVChatNetworkStats stats)
account
- User accountquality
- Network status levelstats
- network status infoAVChatNetworkQuality
void onCallEstablished()
void onDeviceEvent(int code, java.lang.String desc)
code
- Event IDdesc
- Event descriptionAVChatDeviceEvent
void onConnectionTypeChanged(int netType)
netType
- current connection typeAVChatConnectionType
void onFirstVideoFrameAvailable(java.lang.String account)
account
- User accountvoid onFirstVideoFrameRendered(java.lang.String account)
account
- User accountvoid onVideoFrameResolutionChanged(java.lang.String account, int width, int height, int rotate)
account
- User accountwidth
- frame widthheight
- frame heightrotate
- orientationvoid onVideoFpsReported(java.lang.String account, int fps)
AVChatParameters.KEY_VIDEO_FPS_REPORTED
parameter is required.account
- User accountfps
- Current frame rateAVChatParameters.KEY_VIDEO_FPS_REPORTED
,
AVChatManagerLite.setParameter(AVChatParameters.Key, Object)
boolean onVideoFrameFilter(AVChatVideoFrame frame, boolean maybeDualInput)
frame
- data be be processesmaybeDualInput
- If the value is true
, two streams of external data are taken
AVChatVideoFrame.data
raw data after processing. AVChatVideoFrame.dataMirror
mirror data after processing
If false
, one stream of external data is captured. AVChatVideoFrame.data
is supported.
In practice, users must decide whether mirror data is required based on the business requirements. If external processing such as watermarking is used, two streams of data are input. Otherwise, this parameter can be ignored.boolean onVideoFrameFilter(VideoFrame input, VideoFrame[] outputFrames, VideoFilterParameter filterParameter)
input
- data to be processedoutputFrames
- VideoFrame[0]
raw data after processing. VideoFrame[1]
mirror data after processing
If false
, one stream of external data is captured. VideoFrame[0]
is supported.
In practice, users must decide whether mirror data is required based on the business requirements. If external processing such as watermarking is used, two streams of data are input. Otherwise, this parameter can be ignored.filterParameter
- parameter for data to be processedboolean onAudioFrameFilter(AVChatAudioFrame frame)
AVChatParameters.KEY_AUDIO_FRAME_FILTER
is required.frame
- Audio frameAVChatParameters.KEY_AUDIO_FRAME_FILTER
,
AVChatManagerLite.setParameter(AVChatParameters.Key, Object)
void onAudioDeviceChanged(int device, java.util.Set<java.lang.Integer> set, boolean shouldSelect)
device
- audio deviceset
- audio device optionsshouldSelect
- true: bluetooth speaker and headset are optionalAVChatAudioDevice
void onReportSpeaker(java.util.Map<java.lang.String,java.lang.Integer> speakers, int mixedEnergy)
AVChatParameters.KEY_AUDIO_REPORT_SPEAKER
is required.speakers
- user account and acoustic intensity pairmixedEnergy
- acoustic intensity of all users' voices after mixing excpet the current userAVChatParameters.KEY_AUDIO_REPORT_SPEAKER
,
AVChatManagerLite.setParameter(AVChatParameters.Key, Object)
void onSessionStats(AVChatSessionStats sessionStats)
sessionStats
- Detail statsvoid onLiveEvent(int event)
event
- AVChatResCode.LiveEventCode