getSignalingManager

Introduction

The entry point for for the signaling-related methods.

The main class of TencentImSDKPlugin.v2TIMManager.getSignalingManager().

Parameter details

This API has no parameters

Returned template

V2TIMSignalingManager

Return value details

name type description
V2TIMSignalingManager V2TIMSignalingManager The entry point for for the signaling-related methods.

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);

const invitee = '';
const data = 'data';
const timeout = 30;
const onlineUserOnly = false;
const offlinePushInfo = {
    title: '',
};
const inviteRes = await TencentImSDKPlugin.v2TIMManager
    .getSignalingManager()
    .invite(invitee, data, timeout, onlineUserOnly, offlinePushInfo);
if (inviteRes.code === 0) {

    const inviteId = inviteRes.data;
    console.log(inviteId);
}

results matching ""

    No results matching ""