clitehd-external-api

1.2.0 • Public • Published

CliteHD External API

You can use CliteHD External API to create and join CliteHD video conference from your website(create room requires to have a CliteHD account).

Available API methods

  1. createRoom(username, password) - Allows user to create meeting. You must have a valid CliteHD account.

  2. joinRoom(roomname) - Allows user to join meeting

Basic Usage

To use CliteHD External API, in your application you need to add CliteHD External API library. The easiest way to integrate it, is to use the static library into your html file. The library can be found at unpkg.com. Simply add the libray into your html file and you will be able to access all methods mentioned below,

Examples

A sample example is given below,

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Testing Clitehd API</title>
</head>
<body>
    <button id="createConfButton">Click to Create Room</button>
    <button id="joinConfButton">Click to Join Room</button>
    <script src="https://unpkg.com/babel-standalone@6.26.0/babel.min.js"></script>
    <script src="https://unpkg.com/clitehd-external-api"></script>
    <script type="text/babel">
    // define valid CliteHD account
    var username = 'myuser';
    // define valid user CliteHD password for user account
    var password = 'userSecret';
    var roomname = 'example';
    document.getElementById('createConfButton').addEventListener('click', function(){
        createRoom(username, password);
    });
    document.getElementById('joinConfButton').addEventListener('click', function(){
        joinRoom(roomname);
    });
    </script>
</body>
</html>

⚠️ NOTE: The above example must be serve from a webserver like Nginx or Apache. We recommand using XAMPP server for testing the above code.

Advanced usage

CliteHD External API can be used with frontend framework like react, angular and so on. Not to be confused, this API will not work as backend in node.js environment directly. It needs to be run on the browser

⚠️ NOTE: If you do not know how to use npm with frontend then do not attempt to use it. The following section assumes reader has at least INTERMEDIATE level understanding with Javascript and Node.js!!

Using NPM

npm install clitehd-external-api --save

Some real life examples

An example using node.js framework

An example of application Build with node, babel, webpack, jest, sass and es2015 can be found here

Building Instructions

  1. Clone repository using git clone https://github.com/tanvir23/apinode

  2. Install dependencies using Node Package Manager cd apinode && npm install

  3. Run development server by executing command npm start

  4. Open browser and go to localhost:3000 and test the feature.

An example using React.js Framework

Another example, Build with react, es2015, flow and webpack using create-react-app can be found here

Setup Guide

  1. Clone repository using git clone https://github.com/tanvir23/apireact

  2. Install dependencies using Node Package Manager cd apireact && npm install

  3. Run development server by executing command npm start

  4. Open browser and go to localhost:3000 and test the feature.

Support

If you are facing any problem, write us at support@nltvc.com

Package Sidebar

Install

npm i clitehd-external-api

Weekly Downloads

7

Version

1.2.0

License

Apache-2.0

Unpacked Size

25.3 kB

Total Files

8

Last publish

Collaborators

  • tanvir8269