1.0.1 • Published 11 months ago

lidersdk v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Integration

Run this script to install LiderSdk

npm install lidersdk

Creating the Lider Meet API object

After you have integrated the Meet API library and a container, you need to create a Lider Meet API object to define all the required information of the room which you want to provide in your website.

The Meet API object takes the following form:

lider = new LiderClient("lider-container");

The parameter to initiate LiderClient object is the id of the container which you have declared before. In this example we are using lider-container as a parameter of LiderClient object.

Starting your first meeting

After create an instance of LiderClient class, you can start your first meeting with the method join.

  lider.join({
    token: "your_app_token", // Token of your app
    roomId: "roomId", // Room ID, this field is required and decide the room of your clients
    user: {
      username: "username", // Username of client
    },
  });

The example above is the way how you can join your meeting. Function join have a list of required parameters and optional parameters. See full attribute at the next article.

Parameters

Function join have a list of required parameters and optional prameters. Below is an example and the definition of all fields

Example

This script below is an example with all parameter can pass into join object

  lider.join({
    accessType: "public",
    token: "your_app_token",
    roomId: "roomId",
    inviteUrl: "http://localhost:3002/2451-as4r-4sa"
    user: {
      username: "username",
      avatar: "avatar",
      metadata: {
        'userId': "123123123",
      }
    },
  });

Required

roomId (string)

roomId is the id of the room. This field is really important and base on it, we will group your clients to the meeting room. Please ensure that you need to use an enough complex string to group your clients correctly.

token (string)

token is the token string which we discuss above. This field is required and you need to pass it in initiation object to verify your app.

user (object)

user is the object contain the information of your client who want to join a meeting.

List allowed fields in user object

username string, required The name of client which will show in meeting.

avatar string, optional The avatar of client, this field is optional and if you dont pass it in user object. we will generate automatically client avatar base of the username you provided

metadata object, optional The metadata of client who join your meeting. We allow you to attach user information into each meeting. It help you tracking your meeting data easier.

Optional

accessType ('public' | 'askToJoin')

accessType decide the type of meeting.

public, the meeting is public and allow everyone join the meeting if they have a link.
askToJoin, your client need to approved by the author of meeting to join this room.

inviteUrl (string)

inviteUrl is the link of the meeting. Note that you will manage this link, Lider Iframe will show it in the meeting UI if you pass it. A UI of this URL invite-url-example.png

video (boolean)

video decide the status of client camera when join the meeting is on or off. The default value is off

audio (boolean)

audio decide the status of client microphone when join the meeting is on or off. The default value is off

1.0.1

11 months ago

1.0.0

11 months ago