麦位列表 | 观众申请上麦 | 主播处理上麦 |
| | |
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, "申请上麦错误");}});
let seatIndex = 1let timeout = 60seatGridView.takeSeat(index: index, timeout: timeout) { userInfo inprint("申请上麦被同意")} onRejected: { userInfo inprint("申请上麦被拒绝")} onCancelled: { userInfo inprint("申请上麦被取消")} onTimeout: { userInfo inprint("申请上麦超时")} onError: { userInfo, code, message inprint("申请上麦错误")}
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);}}
func onSeatRequestReceived(type: SGRequestType, userInfo: TUIUserInfo) {if type == .applyToTakeSeat {print("收到观众申请上麦请求:\\(userInfo.userId)")}}
// 主播同意观众上麦seatGridView.responseRemoteRequest(userId, true, null);// 主播拒绝观众上麦seatGridView.responseRemoteRequest(userId, false, null);
// 主播同意观众上麦seatGridView.responseRemoteRequest(userId, true, null);// 主播拒绝观众上麦seatGridView.responseRemoteRequest(userId, false, null);
// 主播同意观众上麦seatGridView.responseRemoteRequest(userId, true) {} onError: { code, message in}// 主播拒绝观众上麦seatGridView.responseRemoteRequest(userId, false) {} onError: { code, message in}
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, "麦位信息发生变化");}
func seatGridView(_ view: SeatGridView, updateSeatView seatInfo: TUISeatInfo, seatView: UIView) {print("麦位信息发生变化")}
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, "邀请上麦错误");}});
let seatIndex = 1let userId = "userIdC"seatGridView.takeUserOnSeatByAdmin(index: seatIndex, timeout: timeout, userId: userId) { userInfo inprint("邀请上麦被同意")} onRejected: { userInfo inprint("邀请上麦被拒绝")} onCancelled: { userInfo inprint("邀请上麦被取消")} onTimeout: { userInfo inprint("邀请上麦超时")} onError: { userInfo, code, message inprint("邀请上麦错误")}
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);}}
func onSeatRequestReceived(type: SGRequestType, userInfo: TUIUserInfo) {if type == .inviteToTakeSeat {print("收到主播邀请上麦请求:\\(userInfo.userId)")}}
// 观众同意主播邀请seatGridView.responseRemoteRequest("", true, null);// 观众拒绝主播邀请seatGridView.responseRemoteRequest("", false, null);
// 观众同意主播邀请seatGridView.responseRemoteRequest("", true, null);// 观众拒绝主播邀请seatGridView.responseRemoteRequest("", false, null);
// 观众同意主播邀请seatGridView.responseRemoteRequest("userId of anchor", true) {} onError: { code, message in}// 观众拒绝主播邀请seatGridView.responseRemoteRequest("userId of anchor", false, null) {} onError: { code, message in}
seatGridView.leaveSeat()
seatGridView.leaveSeat();
seatGridView.leaveSeat() {} onError: { code, message in}
val userId = "userIdB"seatGridView.kickUserOffSeatByAdmin(userId, null)
String userId = "userIdB";seatGridView.kickUserOffSeatByAdmin(userId, null);
userId = "userIdB"seatGridView.kickUserOffSeatByAdmin(userId) {} onError: { code, message in}
override fun onKickedOffSeat(inviterUser: UserInfo) {Log.i(TAG, "主播踢下麦")}
@Overridepublic void onKickedOffSeat(TUIRoomDefine.UserInfo userInfo) {Log.i(TAG, "主播踢下麦");}
func onKickedOffSeat(userInfo: TUIUserInfo) {print("主播踢下麦")}
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);
let index = 1let isLockSeat = truelet params = TUISeatLockParams()params.lockSeat = isLockSeatseatGridView.lockSeat(index: index, lockMode: params) {} onError: { code, message in}
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);
let index = 1let isAudioLocked = truelet params = TUISeatLockParams()params.lockAudio = isAudioLockedseatGridView.lockSeat(index: index, lockMode: params) {} onError: { code, message in}
本页内容是否解决了您的问题?