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.
Solo microphone connection
Group Mic Connection
Access Process
Audience mic connection process
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 methods described below are actively invoked and provided by LiveCoreView.
All callback methods refer to the callback methods in the ConnectionObserver object set by LiveCoreView.
Audience sends mic connection request
Audience B sends a mic connection request to anchor A. Anchor A will receive audience B's mic connection request in the onUserConnectionRequest callback.
After anchor A receives the audience's mic connection request, they can call respondIntraRoomConnection to respond to whether they agree to audience B's mic connection.
After anchor A agrees to audience B's mic connection request, audience B will receive anchor A's acceptance callback via the onUserConnectionAccepted callback.
Kotlin
Java
override fun onUserConnectionAccepted(inviterUser:UserInfo){
Log.i(TAG,"Audience accepts the connection:${inviterUser.userId}")
Log.i(TAG,"The list of connected users has changed");
}
Mic connection disconnection process
After audience's mic connect succeeds, host hangs up the mic connect
After audience B and anchor A successfully connect their mics, anchor A disconnects the mic connection with audience B.
Kotlin
Java
val userId ="audienceBUserId"
liveCoreView.disconnectUser(userId,null)
String userId ="audienceUserId";
liveCoreView.disconnectUser(userId,null);
The audience receives a callback when the host disconnects.
After anchor A disconnects the mic connection with audience B, audience B will receive the onUserConnectionTerminated callback.
Kotlin
Java
override fun onUserConnectionTerminated(inviterUser:UserInfo){
Log.i(TAG,"Anchor disconnected the mic connection")
}
@Override
publicvoidonUserConnectionTerminated(){
Log.i(TAG,"The host has closed the connection");
}
After audience's mic connect succeeds, audience ends the mic connect
After audience B and anchor A successfully connect their mics, audience B can proactively disconnect the mic connection by calling terminateIntraRoomConnection.
Kotlin
Java
liveCoreView.terminateIntraRoomConnection()
liveCoreView.terminateIntraRoomConnection();
Anchor receives the callback for audience disconnecting the mic connection
When audience B proactively disconnects the mic connection, the anchor will receive the onUserConnectionExited callback.
Kotlin
Java
override fun onUserConnectionExited(inviterUser:LiveStreamDefine.LiveUser){
Log.i(TAG,"Audience disconnected the mic connection")