npm

Need private packages and team management tools?Check out npm Orgs. »

tttwebsdk

3.3.0 • 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

450

version

3.3.0

license

ISC

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability