addSignalingListener
Introduction
Add a signaling listener.
Invoking this method will add a new signaling listener to the array of listeners.
Signaling APIs are a set of invitation process control APIs based on IM messages. They can be used to implement a variety of real-time features, including:
Audio-video chat rooms: mic on or mic off
Chatting: audio/video calls
Education: control of the process for teachers to invite students to "raise hands"
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
listener | V2TimSignalingListener | yes | The instance of the signaling listener. |
Returned template
void
Return value details
This function has no return value
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const listener = {
onInvitationCancelled: (inviteID, inviter, data) => {
},
onInvitationTimeout: (inviteID, inviteeList) => {
},
onInviteeAccepted: (inviteID, invitee, data) => {
},
onInviteeRejected: (inviteID, invitee, data) => {
},
onReceiveNewInvitation: (inviteID, inviter, groupID, inviteeList, data) => {
},
};
TencentImSDKPlugin.v2TIMManager
.getSignalingManager()
.addSignalingListener(listener);