Public 成员函数 | |
void | onMediaChannelStateChange (@JCMediaChannel.MediaChannelState int state, @JCMediaChannel.MediaChannelState int oldState) |
void | onMediaChannelPropertyChange (JCMediaChannel.PropChangeParam propChangeParam) |
void | onJoin (boolean result, @JCMediaChannel.MediaChannelReason int reason, String channelId) |
void | onLeave (@JCMediaChannel.MediaChannelReason int reason, String channelId) |
void | onStop (boolean result, @JCMediaChannel.MediaChannelReason int reason) |
void | onQuery (int operationId, boolean result, @JCMediaChannel.MediaChannelReason int reason, JCMediaChannelQueryInfo queryInfo) |
void | onParticipantJoin (JCMediaChannelParticipant participant) |
void | onParticipantLeft (JCMediaChannelParticipant participant) |
void | onParticipantUpdate (JCMediaChannelParticipant participant, JCMediaChannelParticipant.ChangeParam changeParam) |
void | onMessageReceive (String type, String content, String fromUserId) |
void | onInviteSipUserResult (int operationId, boolean result, @JCMediaChannel.MediaChannelReason int reason) |
void | onParticipantVolumeChange (JCMediaChannelParticipant participant) |
详细描述
JCMediaChannelCallback 对象,用于回调多方通话相关事件
成员函数说明
◆ onMediaChannelStateChange()
void com.juphoon.cloud.JCMediaChannelCallback.onMediaChannelStateChange | ( | @JCMediaChannel.MediaChannelState int | state, |
@JCMediaChannel.MediaChannelState int | oldState | ||
) |
自身频道状态变化回调
状态:
- STATE_IDLE: 空闲状态
- STATE_JOINING: 加入中
- STATE_JOINED: 已加入
- STATE_LEAVING: 离开中
- 参数
-
state 当前状态 oldState 变化前状态
◆ onMediaChannelPropertyChange()
void com.juphoon.cloud.JCMediaChannelCallback.onMediaChannelPropertyChange | ( | JCMediaChannel.PropChangeParam | propChangeParam | ) |
属性变化回调
- 参数
-
propChangeParam JCMediaChannel.PropChangeParam 变化标识集合
◆ onJoin()
void com.juphoon.cloud.JCMediaChannelCallback.onJoin | ( | boolean | result, |
@JCMediaChannel.MediaChannelReason int | reason, | ||
String | channelId | ||
) |
加入频道结果回调
- 参数
-
result 加入频道是否成功 - true:成功
- false:失败
reason 加入失败原因,当 result 为 false 时该值有效。失败原因参见:JCMediaChannel 错误码 channelId 频道标识符
◆ onLeave()
void com.juphoon.cloud.JCMediaChannelCallback.onLeave | ( | @JCMediaChannel.MediaChannelReason int | reason, |
String | channelId | ||
) |
离开频道结果回调
- 参数
-
reason 离开原因,参见:JCMediaChannel 离开原因 channelId 频道标识符
◆ onStop()
void com.juphoon.cloud.JCMediaChannelCallback.onStop | ( | boolean | result, |
@JCMediaChannel.MediaChannelReason int | reason | ||
) |
解散频道结果回调
- 参数
-
result 解散频道是否成功 - true:成功
- false:失败
reason 解散失败原因,当 result 为 false 时该值有效。失败原因参见:JCMediaChannel 失败原因
◆ onQuery()
void com.juphoon.cloud.JCMediaChannelCallback.onQuery | ( | int | operationId, |
boolean | result, | ||
@JCMediaChannel.MediaChannelReason int | reason, | ||
JCMediaChannelQueryInfo | queryInfo | ||
) |
查询频道信息结果回调
- 参数
-
operationId 操作id,由 query 接口返回 result 查询频道信息是否成功 - true:查询成功
- false:查询失败
reason 查询失败原因,当 result 为 false 时该值有效。失败原因参见:JCMediaChannel 错误码 queryInfo JCMediaChannelQueryInfo 对象,查询到的频道信息,当失败时只需关注 getChannelId 获取的 channelId
◆ onParticipantJoin()
void com.juphoon.cloud.JCMediaChannelCallback.onParticipantJoin | ( | JCMediaChannelParticipant | participant | ) |
新成员加入回调
- 参数
-
participant JCMediaChannelParticipant 成员对象
◆ onParticipantLeft()
void com.juphoon.cloud.JCMediaChannelCallback.onParticipantLeft | ( | JCMediaChannelParticipant | participant | ) |
成员离开回调
- 参数
-
participant JCMediaChannelParticipant 成员对象
◆ onParticipantUpdate()
void com.juphoon.cloud.JCMediaChannelCallback.onParticipantUpdate | ( | JCMediaChannelParticipant | participant, |
JCMediaChannelParticipant.ChangeParam | changeParam | ||
) |
成员更新回调
- 参数
-
participant JCMediaChannelParticipant 成员对象 changeParam JCMediaChannelParticipant.ChangeParam 更新标识类
◆ onMessageReceive()
void com.juphoon.cloud.JCMediaChannelCallback.onMessageReceive | ( | String | type, |
String | content, | ||
String | fromUserId | ||
) |
接收频道消息的回调
- 参数
-
type 消息类型,对应 sendMessage 方法中的 type 参数 content 消息内容,对应 sendMessage 方法中的 content 参数 fromUserId 消息发送成员的userId
◆ onInviteSipUserResult()
void com.juphoon.cloud.JCMediaChannelCallback.onInviteSipUserResult | ( | int | operationId, |
boolean | result, | ||
@JCMediaChannel.MediaChannelReason int | reason | ||
) |
邀请Sip用户操作结果回调
成功后会触发 onParticipantJoin 回调
- 参数
-
operationId 操作id,由 inviteSipUser 接口返回 result 邀请用户是否成功 - true:成功
- false:失败
reason 失败原因,当 result 为 false 时该值有效。失败原因参见:JCMediaChannel 错误码
◆ onParticipantVolumeChange()
void com.juphoon.cloud.JCMediaChannelCallback.onParticipantVolumeChange | ( | JCMediaChannelParticipant | participant | ) |
该接口的文档由以下文件生成:
- cloud/src/main/mediachannel/com/juphoon/cloud/JCMediaChannelCallback.java