The 'audience mic link' feature is a real-time interactive communication method. By using the audience mic link feature, hosts can interact in real time with up to 9 audience members, whether it's answering questions, sharing experiences, or engaging in entertainment interactions, all of which significantly enhance the audience's engagement and satisfaction. This direct interaction and communication provide a more convenient and efficient channel for commercial operations and also offer the audience a more personalized and customized shopping experience. The audience mic link feature is suitable for multiple scenarios, including e-commerce live streaming, entertainment live streaming, and online teaching.
Dual-person Mic Connection
Group Mic Connection
Use Instructions
Note:
This note introduces the audience mic connection feature in TUILiveKit. If you are not using TUILiveKit and are directly using LiveCoreView or RTCRoomEngine, you can skip this step and go directly to the Access Process or the corresponding API documentation.
Audience initiates join microphone application.
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
The host handles the audience's mic connection requests.
Received the audience's connection request
Click on the connected mic user to open the connection dashboard
After clicking agree, the connection is successful
Access Process
Audience mic connection process
The TUILiveKit audience mic connection feature is mainly implemented through LiveCoreView. You can call the following API functions to implement the audience mic connection feature. As an example, Audience B requests to connect with Anchor A as follows.
Note:
The following are active call methods provided by LiveCoreView.
All callback methods refer to the callback methods in the ConnectionObserver object set by LiveCoreView.
In Flutter TUILiveKit, the audience mic connection feature is directly implemented through RTCRoomEngine. All Flutter-related content below is in TUILiveKit, calling methods provided by RTCRoomEngine to achieve the corresponding feature for your reference.
Audience sends a mic connection request
Audience B sends a mic connection request to Anchor A. Anchor A will receive the mic connection request from Audience B in the onUserConnectionRequest callback.
Android
iOS
Flutter
Kotlin
Java
val userId ="anchorUserId";// Change to the UserId of the anchor. If an empty string is passed in, it defaults to the UserId of the anchor.
After Anchor A receives Audience B's mic connection request, they can call respondIntraRoomConnection to respond to Audience B on whether the mic connection is accepted.
The audience receives the anchor's response callback
After Anchor A agrees to the co-broadcast request from Audience B, Audience B will receive Anchor A's agreement to co-broadcast through the onUserConnectionAccepted callback.
Android
iOS
Flutter
Kotlin
Java
override fun onUserConnectionAccepted(inviterUser:UserInfo){
Log.i(TAG,"Audience agrees to connect:${inviterUser.userId}")
In Flutter, the callback for the audience receiving the host's response to the mic connection request is provided by the takeSeat API's requestCallback. For specific examples, refer to the following code:
Callback for changes in the list of co-broadcasting users
After Host A agrees to the co-broadcast request from Audience B, LiveCoreView will send notifications to both Host A and Audience B about the changes in co-broadcasting users.
Android
iOS
Flutter
Kotlin
Java
override fun onConnectedUsersUpdated(inviterUser:UserInfo){
Log.i(TAG,"Callback for changes in the list of co-broadcasting user")
The audience receives a callback when the host disconnects the interactive connection.
After Host A disconnects the mic connection with Audience B, Audience B will receive the onUserConnectionTerminated callback.
Android
iOS
Flutter
Kotlin
Java
override fun onUserConnectionTerminated(inviterUser:UserInfo){
Log.i(TAG,"Host closes the connection")
}
@Override
publicvoidonUserConnectionTerminated(){
Log.i(TAG,"Host closes the connection");
}
Swift
OC
funconUserConnectionTerminated(){
print("Host closes the connection")
}
-(void)onUserConnectionTerminated {
NSLog(@"Host closes the connection");
}
In Flutter, after Anchor A disconnects the mic connection request with Audience B, Audience B will receive a notification in the RTCRoomEngine's onKickedOffSeat callback.
The connection feature is implemented based on LiveCoreView. If you need to extend the connection feature, please refer to the LiveCoreView documentation.