@hongtangyun/rooms-sdk
v0.10.20
Published
JavaScript SDK Client for hongtangyun rooms-sdk.
Downloads
53
Maintainers
Readme
@hongtangyun/rooms-sdk
Getting started
$ npm install @hongtangyun/rooms-sdk --save
Usage
import sdk from '@hongtangyun/rooms-sdk';
const token = 'xxxx';
async function init() {
await sdk.config({
token: token,
});
const roomData = await sdk.getRoomInfo()
}
方法
| 方法 | 描述 | | ------------- | ------------- | | config | 初始化sdk配置 | | getRoomInfo | 获取房间信息 | | getSocket | 获取并初始化socket实例 | | getTempInfo | 获取房间模板信息 | | getRoomUrl | 生成房间url地址 | | checkToken | 检测token是否有效 |