Single-person co-mic | Multi-person co-mic |
| |
Click the co-mic request button | Choose the way to connect the microphone | Send a connection request and wait for the host to agree | After the host agrees, the connection is successful |
| | | |
Received the audience's connection request | Click on the connected mic user to open the connection dashboard | After clicking agree, the connection is successful |
| | |
// File Location:Flutter/lib/widget/live_room/anchor/live_streaming/link/link // Host mic connection related view directory├── anchor_link_mic_manage_panel_widget.dart // Mic connection management panel: Accept audience mic connection, Reject audience mic connection, Hang up mic connection└── apply_link_mic_float_widget.dart // When an audience applies for mic connection, the floating prompt mic connection view at the top level
// File location:Flutter/lib/widget/live_room/audience/component/live_streaming/link/
link // Audience mic connection related view directory├── select_link_mic_type_panel_widget.dart // Audience mic connection pop-up view to choose between voice or video mic connection└── video_link_settings_panel_widget.dart // Video mic connection settings panel view
createEngine()
, and then call the related API functions to implement the audience mic connection feature. As an example, Audience B requests to connect the mic with Anchor A. The specific interaction sequence can be referred to in the diagram below.// File Location:Flutter/lib/service/impl/room_engine_service.dart@overrideTUIRequest takeSeat(int seatIndex, int timeout, TUIRequestCallback? requestCallback) {return roomEngine.takeSeat(seatIndex, timeout, requestCallback);}
// File Location:Flutter/lib/manager/observer/live_observer.dartsuper.onRequestReceived = (request) {LiveKitLogger.info("$tag onRequestReceived:[request:$request");liveController.seatController.onRequestReceived(request);};
// File Location:Flutter/lib/service/impl/room_engine_service.dartmTUIRoomEngine.cancelRequest(requestId, new TUIRoomDefine.ActionCallback() { @Override public void onSuccess() {} @Override public void onError(TUICommonDefine.Error error, String message) {} });
// File Location:Flutter/lib/manager/observer/live_observer.dartsuper.onRequestCancelled = (requestId, userId) {LiveKitLogger.info("$tag onRequestCancelled:[requestId:$requestId,userId:$userId");liveController.seatController.onRequestCancelled(requestId, userId);};
// File Location:Flutter/lib/service/impl/room_engine_service.dartmTUIRoomEngine.responseRemoteRequest(requestId, true, new TUIRoomDefine.ActionCallback() { @Override public void onSuccess() {} @Override public void onError(TUICommonDefine.Error error, String message) {} });
// File Location:Flutter/lib/service/impl/room_engine_service.dartmLiveService.kickUserOffSeatByAdmin(0, userId, new TUIRoomDefine.ActionCallback() { @Override public void onSuccess() {} @Override public void onError(TUICommonDefine.Error error, String message) {} });
// File Location:Flutter/lib/service/impl/room_engine_service.dartmLiveService.leaveSeat(new TUIRoomDefine.ActionCallback() { @Override public void onSuccess() {} @Override public void onError(TUICommonDefine.Error error, String message) {} });
Was this page helpful?