public interface LVRTCCallback
Modifier and Type | Method and Description |
---|---|
void |
onAddRemoter(LVUser user)
有成员加入房间
|
default void |
onAudioMixerPlayerFinish()
混音结束回掉
|
default void |
onAudioMixerPlayerProgress(int timeInMs)
当前混音播发进度
|
void |
onAudioMixStream(java.nio.ByteBuffer audioBuffer,
int sampleRate,
int channels,
int samplesPerChannel,
int bitsPerSample,
LVConstants.AudioRecordType type)
|
void |
onAudioVolumeUpdate(java.util.ArrayList<LVAudioVolume> volumes)
音量回调
|
void |
onDeleteRemoter(java.lang.String userId)
有成员离开
|
long |
onDrawFrame(java.nio.ByteBuffer i420Buffer,
int width,
int height,
int stride,
java.lang.String userId,
java.lang.String ext)
远端解码后的每帧i420数据回调
|
void |
onError(int code)
未归类错误回调
|
void |
onExitRoomComplete()
房间退出成功回调
|
void |
onKickOff(int reason,
java.lang.String roomId)
用户被踢出房间
|
java.lang.String |
onMediaSideInfoInPublishVideoFrame()
给当前推流视频添加额外数据,通过返回值return设置.
|
void |
onMixComplete(boolean success)
服务端混流结果回调
|
void |
onPlayQualityUpdate(LVVideoStatistic stats,
java.lang.String userId)
拉流质量回调
|
void |
onPlayStateUpdate(int state,
java.lang.String userId)
拉流状态回调
|
void |
onPublishQualityUpdate(LVVideoStatistic stats)
推流质量回调
|
void |
onPublishStateUpdate(int state)
推流状态变化回调
|
default void |
onReceivedFirstAudioFrame(java.lang.String userId,
java.lang.String streamId)
收到音频首帧回调通知事件
|
default void |
onReceivedFirstVideoFrame(java.lang.String userId,
java.lang.String streamId)
收到视频首帧回调通知事件
|
void |
onRoomDisconnected(int reason)
房间已断开
|
void |
onRoomReconnected()
房间重连成功
|
long onDrawFrame(java.nio.ByteBuffer i420Buffer, int width, int height, int stride, java.lang.String userId, java.lang.String ext)
i420Buffer
- i420 byte数组width
- 视频帧宽height
- 视频帧高stride
- 该帧数据strideuserId
- 该帧数据对应的userIdext
- 该帧数据携带的扩展信息default void onReceivedFirstVideoFrame(java.lang.String userId, java.lang.String streamId)
userId
- 视频发送者用户 IDstreamId
- 流 ID,默认为空字符串,如果使用自定义视频流时为自定义视频流对应的流名称default void onReceivedFirstAudioFrame(java.lang.String userId, java.lang.String streamId)
userId
- 音频发送者用户 IDstreamId
- 流 ID,默认为空字符串void onDeleteRemoter(java.lang.String userId)
userId
- 用户Idvoid onKickOff(int reason, java.lang.String roomId)
reason
- 101:后台调用踢人API被踢出 102:同时加入不同房间导致被踢 103:加入同一房间两次导致被踢roomId
- 被踢房间Idvoid onRoomDisconnected(int reason)
reason
- 详见LVErrorCode
void onRoomReconnected()
void onMixComplete(boolean success)
success
- true:混流成功 false:混流失败void onPublishQualityUpdate(LVVideoStatistic stats)
stats
- 请参考LVVideoStatistic
void onPublishStateUpdate(int state)
state
- 详见LVErrorCode
void onPlayQualityUpdate(LVVideoStatistic stats, java.lang.String userId)
stats
- 请参考LVVideoStatistic
userId
- 该stats对应用户Idvoid onPlayStateUpdate(int state, java.lang.String userId)
state
- 详见LVErrorCode
userId
- 该状态对应用户Idvoid onAudioMixStream(java.nio.ByteBuffer audioBuffer, int sampleRate, int channels, int samplesPerChannel, int bitsPerSample, LVConstants.AudioRecordType type)
audioBuffer
- 音频数据内容sampleRate
- 音频数据对应采样率channels
- 声道数samplesPerChannel
- 每声道采样数bitsPerSample
- 每个sample占多少bittype
- 详见LVConstants.AudioRecordType
void onAudioVolumeUpdate(java.util.ArrayList<LVAudioVolume> volumes)
volumes
- 详见LVAudioVolume
void onExitRoomComplete()
java.lang.String onMediaSideInfoInPublishVideoFrame()
void onError(int code)
code
- 详见LVErrorCode
default void onAudioMixerPlayerProgress(int timeInMs)
timeInMs
- 当前播发进度,单位毫秒default void onAudioMixerPlayerFinish()