# tsignaling

> 腾讯云 Web 信令 SDK

Latest version **1.0.8** (published 2023-10-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install tsignaling
pnpm add tsignaling
yarn add tsignaling
bun add tsignaling
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2023-10-24 |
| First published | 2020-06-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 92.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2758 |
| Author | Tencent Cloud Terminal R&D Center |
| Maintainers | raingxm, yangq, tencent-cloud-im, rgzhaoh |
| Keywords | 信令, 腾讯云即时通信 IM, 腾讯云实时音视频 TRTC, WebRTC, Electron |

## Links

- npm: https://www.npmjs.com/package/tsignaling
- Repository: https://github.com/tencentyun/TIMSDK
- Homepage: https://github.com/tencentyun/TIMSDK#readme
- Issues: https://github.com/tencentyun/TIMSDK/issues
- npm.io page: https://npm.io/package/tsignaling

## Recent versions

- 1.0.8 (latest) — 2023-10-24
- 1.0.7 — 2023-08-09
- 1.0.6 — 2023-05-18
- 1.0.5 — 2023-02-22
- 1.0.4 — 2023-01-13
- 1.0.3 — 2022-12-14
- 1.0.2 — 2022-11-18
- 1.0.1 — 2022-11-01
- 0.10.0 — 2022-01-18
- 0.9.0 — 2021-11-29
- 0.8.0 — 2021-09-23
- 0.7.0 — 2021-07-06
- 0.6.0 — 2021-05-13
- 0.5.0 — 2021-04-25
- 0.4.0 — 2021-01-06
- … 6 more at https://npm.io/package/tsignaling/versions

## README

### 简介

腾讯云 Web 信令 SDK，以腾讯云即时通信 IM 为基础，在实时音视频场景用于发送和接收信令消息，如发起单人、多人通话等。接入前，您需要在 [云通信控制台](https://console.cloud.tencent.com/avc) 中创建一个云通信应用，并取得 SDKAppID，并了解腾讯云实时音视频 [TRTC](https://cloud.tencent.com/product/trtc/developer)。

### api list

| api | 含义 |
| :--- | :--- |
| new TSignaling(options) | 初始化信令 SDK |
| setLogLevel(level) | 设置日志级别 |
| on(eventName, handler, context) | 监听事件 |
| login(options) | 登录 |
| logout() | 登出 |
| joinGroup(groupID) | 加群 |
| quitGroup(groupID) | 退群 |
| sendTextMessage(options) | 发送文本消息 |
| sendCustomMessage(options) | 发送自定义消息 |
| invite(options) | 邀请单个人 |
| inviteInGroup(options) | 群内邀请某些人 |
| cancel(options) | 邀请发起者取消邀请 |
| accept(options) | 被邀请人接受邀请 |
| reject(options) | 被邀请人拒绝邀请 |

### event list
| event | 含义 |
| :--- | :--- |
| TSignaling.EVENT.NEW_INVITATION_RECEIVED | 收到新的邀请 |
| TSignaling.EVENT.INVITEE_ACCEPTED | 被邀请人接受了邀请 |
| TSignaling.EVENT.INVITEE_REJECTED | 被邀请人拒绝了邀请 |
| TSignaling.EVENT.INVITATION_CANCELLED | 邀请被发起者取消 |
| TSignaling.EVENT.INVITATION_TIMEOUT | 邀请超时 |
| TSignaling.EVENT.SDK_READY | sdk ready,可以发信令消息 |
| TSignaling.EVENT.SDK_NOT_READY | sdk not ready,不可以发信令消息 |
| TSignaling.EVENT.TEXT_MESSAGE_RECEIVED | 收到普通文本消息 |
| TSignaling.EVENT.CUSTOM_MESSAGE_RECEIVED | 收到普通自定义消息 |
| TSignaling.EVENT.REMOTE_USER_JOIN | 有远端用户加入群 |
| TSignaling.EVENT.REMOTE_USER_LEAVE | 有远端用户离开群
| TSignaling.EVENT.KICKED_OUT | 被腾讯云即时通信 IM 系统踢下线 |
| TSignaling.EVENT.NET_STATE_CHANGE | 用户网络发生变化 |

### type list

| type | 含义 |
| :-----| :----- |
| TSignaling.TYPES.MSG_PRIORITY_HIGH | 群消息高优先级。建议选择该优先级的消息类型：红包消息和礼物消息 |
| TSignaling.TYPES.MSG_PRIORITY_NORMAL | 群消息普通优先级。建议选择该优先级的消息类型：普通文本消息 |
| TSignaling.TYPES.MSG_PRIORITY_LOW | 群消息低优先级。建议选择该优先级的消息类型：点赞消息 |
| TSignaling.TYPES.MSG_PRIORITY_LOWEST | 群消息最低优先级。建议选择该优先级的消息类型：最不重要的消息 |
| TSignaling.TYPES.KICKED_OUT_MULT_ACCOUNT | Web 端实例同时在线个数超限被踢 |
| TSignaling.TYPES.KICKED_OUT_MULT_DEVICE | 多端登录超限被踢 |
| TSignaling.TYPES.KICKED_OUT_USERSIG_EXPIRED | userSig 过期被踢 |
| TSignaling.TYPES.NET_STATE_CONNECTED | 已接入网络 |
| TSignaling.TYPES.NET_STATE_CONNECTING | 连接中 |
| TSignaling.TYPES.NET_STATE_DISCONNECTED | 未接入网络 |
| TSignaling.TYPES.ENTER_ROOM_SUCCESS | 加入群成功 |
| TSignaling.TYPES.ALREADY_IN_ROOM | 已在群内 |

### 参考文档

- [腾讯云即时通信 IM](https://cloud.tencent.com/document/product/269/1498)
- [WebIM API](https://web.sdk.qcloud.com/im/doc/zh-cn/TIM.html)
- [腾讯实时音视频 TRTC](https://cloud.tencent.com/document/product/647/16788)

---
_Source: https://npm.io/package/tsignaling · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
