单人连麦 | 多人连麦 |
| |
val userId = "anchorUserId";val timeout = 60;liveCoreView.requestIntraRoomConnection(userId, 10, null)
String userId = "anchorUserId";int timeout = 60; liveCoreView.requestIntraRoomConnection(userId, timeout, true, null);
override fun onUserConnectionRequest(inviterUser: UserInfo) {Log.i(TAG, "收到观众连线请求:${inviterUser.userId}")}
@Override public void onUserConnectionRequest(LiveStreamDefine.LiveUser inviterUser) { Log.i(TAG, "收到观众连线请求:" + inviterUser.userId); }
// 主播同意连麦liveCoreView.respondIntraRoomConnection(audienceBUserId, true, null)
// 主播同意连麦liveCoreView.respondIntraRoomConnection(userId, true, null);// 主播拒绝连麦liveCoreView.respondIntraRoomConnection(userId, false, null);
override fun onUserConnectionAccepted(inviterUser: UserInfo) {Log.i(TAG, "观众同意连线:${inviterUser.userId}")}
@Override public void onUserConnectionAccepted(LiveStreamDefine.LiveUser liveUser) { Log.i(TAG, "观众同意连线:" + liveUser.userId); } @Override public void onUserConnectionRejected(LiveStreamDefine.LiveUser liveUser) { Log.i(TAG, "观众拒绝连线:" + liveUser.userId); }
override fun onConnectedUsersUpdated(inviterUser: UserInfo) {Log.i(TAG, "连麦用户列表发生变化")}
@Override public void onConnectedUsersUpdated(List<UserInfo> userList, List<UserInfo> joinList, List<UserInfo> leaveList) { Log.i(TAG, "连麦用户列表发生变化"); }
val userId = "audienceBUserId"liveCoreView.disconnectUser(userId, null)
String userId = "audienceUserId";liveCoreView.disconnectUser(userId, null);
override fun onUserConnectionTerminated(inviterUser: UserInfo) {Log.i(TAG, "主播关闭连线")}
@Override public void onUserConnectionTerminated() { Log.i(TAG, "主播关闭连线"); }
liveCoreView.terminateIntraRoomConnection()
liveCoreView.terminateIntraRoomConnection();
override fun onUserConnectionExited(inviterUser: LiveStreamDefine.LiveUser) {Log.i(TAG, "观众退出连线")}
@Override public void onUserConnectionExited(UserInfo liveUser) { Log.i(TAG, "观众退出连线:${liveUser.userId}"); }
本页内容是否解决了您的问题?