麦位列表 | 观众申请上麦 | 主播处理上麦 |
| | |
val seatIndex = 1;val timeout = 60;seatGridView.takeSeat(seatIndex, timeout, object : VoiceRoomDefine.RequestCallback {override fun onAccepted(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "申请上麦被同意")}override fun onRejected(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "申请上麦被拒绝")}override fun onCancelled(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "申请上麦被取消")}override fun onTimeout(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "申请上麦超时")}override fun onError(userInfo: TUIRoomDefine.UserInfo, error: TUICommonDefine.Error, message: String) {Log.i(TAG, "申请上麦错误")}})
int seatIndex = 1;int timeout = 60;seatGridView.takeSeat(seatIndex, timeout, new VoiceRoomDefine.RequestCallback() {@Overridepublic void onAccepted(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "申请上麦被同意");}@Overridepublic void onRejected(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "申请上麦被拒绝");}@Overridepublic void onCancelled(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "申请上麦被取消");}@Overridepublic void onTimeout(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "申请上麦超时");}@Overridepublic void onError(TUIRoomDefine.UserInfo userInfo, TUICommonDefine.Error error, String message) {Log.i(TAG, "申请上麦错误");}});
override fun onSeatRequestReceived(type: VoiceRoomDefine.RequestType, userInfo: TUIRoomDefine.UserInfo) {if (type == VoiceRoomDefine.RequestType.APPLY_TO_TAKE_SEAT) {Log.i(TAG, "收到观众申请上麦请求:${userInfo.userId}")}}
@Overridepublic void onSeatRequestReceived(VoiceRoomDefine.RequestType type, TUIRoomDefine.UserInfo userInfo) {if (type == VoiceRoomDefine.RequestType.APPLY_TO_TAKE_SEAT) {Log.i(TAG, "收到观众上麦请求:" + userInfo.userId);}}
// 主播同意观众上麦seatGridView.responseRemoteRequest(userId, true, null);// 主播拒绝观众上麦seatGridView.responseRemoteRequest(userId, false, null);
// 主播同意观众上麦seatGridView.responseRemoteRequest(userId, true, null);// 主播拒绝观众上麦seatGridView.responseRemoteRequest(userId, false, null);
override fun updateSeatView(seatGridView: SeatGridView, seatInfo: TUIRoomDefine.SeatInfo, seatView: View) {Log.i(TAG, "麦位信息发生变化");}
@Overridepublic void void updateSeatView(SeatGridView seatGridView, TUIRoomDefine.SeatInfo seatInfo, View seatView) {Log.i(TAG, "麦位信息发生变化");}
val seatIndex = 1;val userId = "userIdC";val timeout = 60;seatGridView.takeUserOnSeatByAdmin(seatIndex, timeout, userId, object : VoiceRoomDefine.RequestCallback {override fun onAccepted(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "邀请上麦被同意")}override fun onRejected(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "邀请上麦被拒绝")}override fun onCancelled(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "邀请上麦被取消")}override fun onTimeout(userInfo: TUIRoomDefine.UserInfo) {Log.i(TAG, "邀请上麦超时")}override fun onError(userInfo: TUIRoomDefine.UserInfo, error: TUICommonDefine.Error, message: String) {Log.i(TAG, "邀请上麦错误")}})
val seatIndex = 1;val userId = "userIdC";val timeout = 60;seatGridView.takeUserOnSeatByAdmin(seatIndex, userId, timeout, new VoiceRoomDefine.RequestCallback() {@Overridepublic void onAccepted(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "邀请上麦被同意");}@Overridepublic void onRejected(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "邀请上麦被拒绝");}@Overridepublic void onCancelled(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "邀请上麦被取消");}@Overridepublic void onTimeout(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "邀请上麦超时");}@Overridepublic void onError(TUIRoomDefine.UserInfo userInfo, TUICommonDefine.Error error, String message) {Log.i(TAG, "邀请上麦错误");}});
override fun onSeatRequestReceived(type: VoiceRoomDefine.RequestType, userInfo: TUIRoomDefine.UserInfo) {if (type == VoiceRoomDefine.RequestType.INVITE_TO_TAKE_SEAT) {Log.i(TAG, "收到主播邀请上麦请求:${userInfo.userId}")}}
@Overridepublic void onSeatRequestReceived(VoiceRoomDefine.RequestType type, TUIRoomDefine.UserInfo userInfo) {if (type == VoiceRoomDefine.RequestType.INVITE_TO_TAKE_SEAT) {Log.i(TAG, "收到主播邀请上麦请求:" + userInfo.userId);}}
// 观众同意主播邀请seatGridView.responseRemoteRequest("", true, null);// 观众拒绝主播邀请seatGridView.responseRemoteRequest("", false, null);
// 观众同意主播邀请seatGridView.responseRemoteRequest("", true, null);// 观众拒绝主播邀请seatGridView.responseRemoteRequest("", false, null);
seatGridView.leaveSeat()
seatGridView.leaveSeat();
val userId = "userIdB"seatGridView.kickUserOffSeatByAdmin(userId, null)
String userId = "userIdB";seatGridView.kickUserOffSeatByAdmin(userId, null);
override fun onKickedOffSeat(inviterUser: UserInfo) {Log.i(TAG, "主播踢下麦")}
@Overridepublic void onKickedOffSeat(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "主播踢下麦");}
val index = 1;val isLockSeat = trueval params = TUIRoomDefine.SeatLockParams().apply {lockSeat = isLockSeat}seatGridView.lockSeat(index, params, null)
int index = 1;bool isLockSeat = true;TUIRoomDefine.SeatLockParams params = new TUIRoomDefine.SeatLockParams();params.lockSeat = isLockSeat;seatGridView.lockSeat(index, params, null);
val index = 1;bool isAudioLocked = true;val params = TUIRoomDefine.SeatLockParams().apply {isAudioLocked = isLockSeat}seatGridView.lockSeat(index, params, null)
int index = 1;bool isAudioLocked = true;TUIRoomDefine.SeatLockParams params = new TUIRoomDefine.SeatLockParams();params.lockAudio = seatInfo.isAudioLocked;seatGridView.lockSeat(index, params, null);
本页内容是否解决了您的问题?