brtm-js
v2.3.8
Published
Baijiayun BRTM SDK
Downloads
15
Readme
百家云实时消息通信 SDK(BRTM SDK)
一个互动 Web 实时消息通信解决方案。
Documentation
Modules
Classes
Events
Error
Installation
BRTM 通过 script 引用得到 BRTM 全局对象:
<script src="./dist/BRTM.min.js"></script>
也可以通过模块加载:
let BRTM = require('./dist/BRTM.min.js');
import * as BRTM from './dist/BRTM.min.js';
Usage
<div id="self-player"></div>
<div id="remote-player"></div>
const client = BRTM.createClient({
appId: ''
});
client
.on('user-in', (data) => {
})
.on('user-out', (data) => {
})
.on('message-receive', (data) => {
})
.on('broadcast-receive',(data) => {
})
.on('command-receive', (data) => {
});
client.join('roomId', 123, 'sig').then(() => {
});