Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

tttwebsdk

3.4.5 • Public • Published

Note: The master is release branch. Please checkout develop branch for developing.

Websdk 3.1.0

SDK for webclient RTC devloping.

Pleasae reference Docs/forlder about APIs.

Install

npm i tttwebsdk

Sample code

const TTTRtcWeb = require('tttwebsdk');
let RTCObj = new TTTRtcWeb();
const client = RTCObj.createClient({});
//let appid= '***', roomid = '***', userid= '***'
 
client.init(appid, userid, function () {
    client.join(roomid, function () {
        let stream = RTCObj.createStream({
            streamID: userid,
            audio: true,
            video: true,
            screen: false
        });
 
        stream.init(function () {
            stream.play('local_stream');
            client.publish(stream, function success() {
            }, function failure() {
            });
        }
    }, function (err) {
    });
}, function (err) {
});
 
client.on('user-joined', (evt) => {
    console.log('user joined room. uid=', evt.uid);
});
 
client.on('user-leaved', (evt) => {
    console.log('user leaved room. uid=', evt.uid);
});

Forlder structure

+app      ---- demo and test pages
+docs     ---- some specs and docs for APIs and so on
+lib      ---- SDK logical code +screen    ---- screen code
|-            ---- solution code

Building

npm run build:app
npm run build:demo

KeyWords

npm TTTWebSDK

SDK APIs Documents

sdk apis documents

Change Log

change logs

Application

application base upon The SDK

Test Pages

test pages

Demo Pages

demo pages

Keywords

none

Install

npm i tttwebsdk

DownloadsWeekly Downloads

238

Version

3.4.5

License

ISC

Unpacked Size

1.5 MB

Total Files

89

Last publish

Collaborators

  • avatar
  • avatar
  • avatar