hyphenate_SDK3.0
3.6.1
hyphenatejavaIMSDK
|
类 | |
enum | EMConferenceRole |
enum | EMConferenceType |
class | Role |
Public 成员函数 | |
void | set (String accessToken, String appKey, String username) |
void | addConferenceListener (EMConferenceListener listener) |
void | removeConferenceListener (EMConferenceListener listener) |
int | startAudioMixing (String filePath, int loop, boolean sendAudio) |
int | stopAudioMixing () |
int | adjustAudioMixingVolume (int volume) |
void | getConferenceInfo (final String confId, final String password, final EMValueCallBack< EMConference > callback) |
void | createAndJoinConference (final EMConferenceType type, final String password, final EMValueCallBack< EMConference > callback) |
void | createAndJoinConference (final EMConferenceType type, final String password, final boolean recordOnServer, final boolean mergeStream, final EMValueCallBack< EMConference > callback) |
void | createAndJoinConference (final @NonNull EMConferenceType type, final String password, final EMStreamParam param, final boolean recordOnServer, final boolean mergeStream, final EMValueCallBack< EMConference > callback) |
void | joinConference (final String confId, final String password, final EMValueCallBack< EMConference > callback) |
void | joinConference (final String confId, final String password, final EMStreamParam param, final EMValueCallBack< EMConference > callback) |
void | joinConferenceWithTicket (final String ticket, final EMStreamParam param, final EMValueCallBack< String > callback) |
void | inviteUserToJoinConference (final String confId, final String password, final String username, final String extension, final EMValueCallBack callback) |
void | grantRole (final String confId, final EMConferenceMember member, final EMConferenceRole toRole, final EMValueCallBack< String > callback) |
void | setConferenceAttribute (@NonNull String key, @NonNull String value, final EMValueCallBack< Void > callback) |
void | deleteConferenceAttribute (@NonNull String key, final EMValueCallBack< Void > callback) |
void | destroyConference (final EMValueCallBack callback) |
void | exitConference (final EMValueCallBack callback) |
void | publish (EMStreamParam param, final EMValueCallBack< String > callback) |
void | unpublish (String pubStreamId, final EMValueCallBack< String > callback) |
void | subscribe (final EMConferenceStream stream, EMCallSurfaceView surfaceView, final EMValueCallBack< String > callback) |
void | updateSubscribe (final EMConferenceStream stream, EMCallSurfaceView surfaceView, final EMValueCallBack< String > callback) |
void | unsubscribe (final EMConferenceStream stream, final EMValueCallBack< String > callback) |
void | inputExternalVideoData (EMConferenceStream.StreamType type, byte[] data, RtcConnection.FORMAT format, int width, int height, int rotation) |
void | inputExternalVideoData (Bitmap bitmap) |
void | inputExternalVideoData (EMConferenceStream.StreamType type, byte[] data, int width, int height, int rotation) |
void | inputExternalVideoData (byte[] data, int width, int height, int rotation) |
void | startMonitorSpeaker (int interval) |
void | stopMonitorSpeaker () |
void | setLocalSurfaceView (EMCallSurfaceView localView) |
void | updateLocalSurfaceView (EMCallSurfaceView localView) |
void | updateRemoteSurfaceView (String streamId, EMCallSurfaceView remoteView) |
void | updateVideoMaxKbps (int maxKbps) |
int | getCameraId () |
void | switchCamera () |
void | closeVideoTransfer () |
void | openVideoTransfer () |
void | closeVoiceTransfer () |
void | openVoiceTransfer () |
void | muteRemoteAudio (String streamId, boolean mute) |
void | muteRemoteVideo (String streamId, boolean mute) |
void | enableStatistics (boolean enable) |
List< EMConferenceMember > | getConferenceMemberList () |
Map< String, EMConferenceStream > | getAvailableStreamMap () |
Map< String, EMConferenceStream > | getSubscribedStreamMap () |
void | setLocalVideoViewMirror (@EMMirror.MIRROR int mirror) |
void | setRotation (int rotation) |
Protected 成员函数 | |
EMConferenceManager (EMACallManager manager) | |
void | addCommonParams (Map< String, Object > params) |
Created by lzan13 on 2017/8/16.
多人音视频会议管理类,封装多人音视频会议操作方法,创建,加入,邀请等
|
protected |
preventing to instantiate this EMConferenceManager
void com.hyphenate.chat.EMConferenceManager.addConferenceListener | ( | EMConferenceListener | listener | ) |
添加会议监听
int com.hyphenate.chat.EMConferenceManager.adjustAudioMixingVolume | ( | int | volume | ) |
设置伴奏音量,请在加入会议成功后调用
volume | 伴奏音量范围为 0~100。默认 100 为原始文件音量 |
void com.hyphenate.chat.EMConferenceManager.closeVideoTransfer | ( | ) |
关闭视频传输
void com.hyphenate.chat.EMConferenceManager.closeVoiceTransfer | ( | ) |
关闭语音传输
void com.hyphenate.chat.EMConferenceManager.createAndJoinConference | ( | final EMConferenceType | type, |
final String | password, | ||
final EMValueCallBack< EMConference > | callback | ||
) |
创建并加入会议
password | 会议密码 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.createAndJoinConference | ( | final EMConferenceType | type, |
final String | password, | ||
final boolean | recordOnServer, | ||
final boolean | mergeStream, | ||
final EMValueCallBack< EMConference > | callback | ||
) |
创建并加入会议
password | 会议密码 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.createAndJoinConference | ( | final @NonNull EMConferenceType | type, |
final String | password, | ||
final EMStreamParam | param, | ||
final boolean | recordOnServer, | ||
final boolean | mergeStream, | ||
final EMValueCallBack< EMConference > | callback | ||
) |
创建并加入会议
password | 会议密码 |
param | 加入会议时 publish 自己本地数据参数 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.deleteConferenceAttribute | ( | @NonNull String | key, |
final EMValueCallBack< Void > | callback | ||
) |
删除频道属性,该会议中的所有人(包括自己)都会收到EMConferenceListener#onAttributesUpdated回调. 该方法需要在加入会议后调用.
key | |
callback |
void com.hyphenate.chat.EMConferenceManager.destroyConference | ( | final EMValueCallBack | callback | ) |
销毁会议
void com.hyphenate.chat.EMConferenceManager.enableStatistics | ( | boolean | enable | ) |
启用统计
enable | 是否启用统计 |
void com.hyphenate.chat.EMConferenceManager.exitConference | ( | final EMValueCallBack | callback | ) |
退出会议
Map<String, EMConferenceStream> com.hyphenate.chat.EMConferenceManager.getAvailableStreamMap | ( | ) |
获取当前会议可订阅 Stream
int com.hyphenate.chat.EMConferenceManager.getCameraId | ( | ) |
获取当前摄像头 id, 0 表示后置摄像头,1 表示前置摄像头
void com.hyphenate.chat.EMConferenceManager.getConferenceInfo | ( | final String | confId, |
final String | password, | ||
final EMValueCallBack< EMConference > | callback | ||
) |
查询会议信息
confId | 会议id |
password | 会议密码 |
callback | 获取结果回调 |
List<EMConferenceMember> com.hyphenate.chat.EMConferenceManager.getConferenceMemberList | ( | ) |
获取当前会议成员
Map<String, EMConferenceStream> com.hyphenate.chat.EMConferenceManager.getSubscribedStreamMap | ( | ) |
获取当前会议已订阅 Stream
void com.hyphenate.chat.EMConferenceManager.grantRole | ( | final String | confId, |
final EMConferenceMember | member, | ||
final EMConferenceRole | toRole, | ||
final EMValueCallBack< String > | callback | ||
) |
用户角色: Admin > Talker > Audience 当角色升级时,用户需要给管理员发送申请,管理通过该接口改变用户接口. 当角色降级时,用户直接调用该接口即可. 注意: 暂时不支持Admin降级自己
confId | 会议id |
member | EMConferenceMember,目前使用memberName进行的操作 |
toRole | 目标角色,EMConferenceRole |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.inputExternalVideoData | ( | EMConferenceStream.StreamType | type, |
byte [] | data, | ||
RtcConnection.FORMAT | format, | ||
int | width, | ||
int | height, | ||
int | rotation | ||
) |
外部输入数据方法
type | 传入当前流的类型, 查看 EMConferenceStream.StreamType |
data | 视频数据流,需要是 YUV 格式数据 |
format | 查看 RtcConnection.FORMAT |
width | 视频数据帧宽 |
height | 视频数据帧高 |
rotation | 旋转角度 |
void com.hyphenate.chat.EMConferenceManager.inputExternalVideoData | ( | Bitmap | bitmap | ) |
外部输入视频数据方法,此方法主要是为分享桌面回调使用
bitmap | bitmap (格式 - ARGB_8888) 数据 |
void com.hyphenate.chat.EMConferenceManager.inputExternalVideoData | ( | EMConferenceStream.StreamType | type, |
byte [] | data, | ||
int | width, | ||
int | height, | ||
int | rotation | ||
) |
外部输入数据方法
type | 传入当前流的类型, 查看 EMConferenceStream.StreamType |
data | 视频数据流,需要是 YUV (格式 - YUV420SP) 数据 |
width | 视频数据帧宽 |
height | 视频数据帧高 |
rotation | 旋转角度 |
void com.hyphenate.chat.EMConferenceManager.inputExternalVideoData | ( | byte [] | data, |
int | width, | ||
int | height, | ||
int | rotation | ||
) |
外部输入数据方法,
data | 视频数据流,需要是 YUV (格式 - YUV420SP) 数据 |
width | 视频数据帧宽 |
height | 视频数据帧高 |
rotation | 旋转角度 |
void com.hyphenate.chat.EMConferenceManager.inviteUserToJoinConference | ( | final String | confId, |
final String | password, | ||
final String | username, | ||
final String | extension, | ||
final EMValueCallBack | callback | ||
) |
邀请其他人加入会议
confId | 会议 id |
password | 会议密码 |
username | 被邀请者名字 |
extension | 邀请他人加入的扩展信息 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.joinConference | ( | final String | confId, |
final String | password, | ||
final EMValueCallBack< EMConference > | callback | ||
) |
加入会议
confId | 会议 id |
password | 会议密码 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.joinConference | ( | final String | confId, |
final String | password, | ||
final EMStreamParam | param, | ||
final EMValueCallBack< EMConference > | callback | ||
) |
加入会议
confId | 会议 id |
password | 会议密码 |
param | 加入会议时 publish 自己本地数据参数 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.joinConferenceWithTicket | ( | final String | ticket, |
final EMStreamParam | param, | ||
final EMValueCallBack< String > | callback | ||
) |
通过 Ticket 加入会议
ticket | 加入会议需要的凭证 |
param | 加入会议所需参数 EMStreamParam |
void com.hyphenate.chat.EMConferenceManager.muteRemoteAudio | ( | String | streamId, |
boolean | mute | ||
) |
mute远端音频
void com.hyphenate.chat.EMConferenceManager.muteRemoteVideo | ( | String | streamId, |
boolean | mute | ||
) |
~\chinese mute远端视频
void com.hyphenate.chat.EMConferenceManager.openVideoTransfer | ( | ) |
打开视频传输
void com.hyphenate.chat.EMConferenceManager.openVoiceTransfer | ( | ) |
打开语音传输
void com.hyphenate.chat.EMConferenceManager.publish | ( | EMStreamParam | param, |
final EMValueCallBack< String > | callback | ||
) |
本地推流
param | 推送本地流时配置信息 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.removeConferenceListener | ( | EMConferenceListener | listener | ) |
移除会议监听
void com.hyphenate.chat.EMConferenceManager.set | ( | String | accessToken, |
String | appKey, | ||
String | username | ||
) |
设置单独使用视音频功能时所需参数
accessToken | |
appKey | |
username |
void com.hyphenate.chat.EMConferenceManager.setConferenceAttribute | ( | @NonNull String | key, |
@NonNull String | value, | ||
final EMValueCallBack< Void > | callback | ||
) |
设置频道属性,该会议中的所有人(包括自己)都会收到EMConferenceListener#onAttributesUpdated回调. 该方法需要在加入会议后调用.
key | |
value | |
callback |
void com.hyphenate.chat.EMConferenceManager.setLocalSurfaceView | ( | EMCallSurfaceView | localView | ) |
设置显示自己本地预览画面控件
localView | 显示本地图像的控件 |
void com.hyphenate.chat.EMConferenceManager.setLocalVideoViewMirror | ( | @EMMirror.MIRROR int | mirror | ) |
设置本地视频view镜像,可在通话过程中动态设置
mirror |
void com.hyphenate.chat.EMConferenceManager.setRotation | ( | int | rotation | ) |
设置视频会议中Camera采集到的VideoFrame的rotation
rotation | 必须是90的倍数 |
int com.hyphenate.chat.EMConferenceManager.startAudioMixing | ( | String | filePath, |
int | loop, | ||
boolean | sendAudio | ||
) |
开启本地伴音功能,请在加入会议成功后调用,该伴音配置只存在于该会议存在期间.默认音量为原音频文件音量的%50. 可以通过adjustAudioMixingVolume(int volume)调节伴音音量.
filePath | 文件路径. 如果用户提供的目录以 /assets/ 开头,则去 assets 里面查找该文件 如果用户提供的目录不是以 /assets/ 开头,一律认为是在绝对路径里查找该文件 |
loop | 指定音频文件循环播放的次数: 正整数:循环的次数 -1:无限循环 |
void com.hyphenate.chat.EMConferenceManager.startMonitorSpeaker | ( | int | interval | ) |
开启正在说话监听器
interval | EMConferenceListener#onSpeakers(List) 回调间隔 |
int com.hyphenate.chat.EMConferenceManager.stopAudioMixing | ( | ) |
关闭本地混音功能,请在加入会议成功后调用
void com.hyphenate.chat.EMConferenceManager.stopMonitorSpeaker | ( | ) |
停止正在说话监听器
void com.hyphenate.chat.EMConferenceManager.subscribe | ( | final EMConferenceStream | stream, |
EMCallSurfaceView | surfaceView, | ||
final EMValueCallBack< String > | callback | ||
) |
订阅成员推送流数据
stream | 当前操作的流 |
surfaceView | 用来显示订阅的流画面的控件 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.switchCamera | ( | ) |
切换摄像头
void com.hyphenate.chat.EMConferenceManager.unpublish | ( | String | pubStreamId, |
final EMValueCallBack< String > | callback | ||
) |
取消本地推流
pubStreamId | 本地数据流 id |
void com.hyphenate.chat.EMConferenceManager.unsubscribe | ( | final EMConferenceStream | stream, |
final EMValueCallBack< String > | callback | ||
) |
取消订阅成员推送流数据
stream | 当前流 |
callback | 结果回调接口 |
void com.hyphenate.chat.EMConferenceManager.updateLocalSurfaceView | ( | EMCallSurfaceView | localView | ) |
更新显示本地画面控件
localView | 显示本地图像的控件 |
void com.hyphenate.chat.EMConferenceManager.updateRemoteSurfaceView | ( | String | streamId, |
EMCallSurfaceView | remoteView | ||
) |
更新显示远端画面控件
streamId | 当前控件显示的流 id |
remoteView | 显示远端图像控件 |
void com.hyphenate.chat.EMConferenceManager.updateSubscribe | ( | final EMConferenceStream | stream, |
EMCallSurfaceView | surfaceView, | ||
final EMValueCallBack< String > | callback | ||
) |
更新订阅成员推送流数据
stream | 当前操作的流 |
surfaceView | 用来显示订阅的流画面的控件 |
callback | 结果回调 |
void com.hyphenate.chat.EMConferenceManager.updateVideoMaxKbps | ( | int | maxKbps | ) |
更新视频最大码率
maxKbps | 最大码率 |