clitehd-external-api
v1.2.0
Published
A tiny library for external login to clitehd
Downloads
9
Maintainers
Readme
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
createRoom(username, password) - Allows user to create meeting. You must have a valid CliteHD account.
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/[email protected]/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>
:warning: 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
:warning: 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
Clone repository using
git clone https://github.com/tanvir23/apinode
Install dependencies using Node Package Manager
cd apinode && npm install
Run development server by executing command
npm start
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
Clone repository using
git clone https://github.com/tanvir23/apireact
Install dependencies using Node Package Manager
cd apireact && npm install
Run development server by executing command
npm start
Open browser and go to
localhost:3000
and test the feature.
Support
If you are facing any problem, write us at [email protected]