GithubHelp home page GithubHelp logo

enablex / video-conferencing-open-source-web-application-sample Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 7.0 4.09 MB

This is a sample Web application that demonstrates the integration of EnableX platform APIs for the creation of a Multi-Party RTC (Real Time Communication) Application.

Home Page: https://www.enablex.io/cpaas/video-api

JavaScript 100.00%
videoconference enablex enablex-platform webrtc multiparty-calls multi-party-rtc videochat api cpaas webapp

video-conferencing-open-source-web-application-sample's Introduction

1-to-1 Video Calling Application with Face AI: Building with JavaScript and EnableX Toolkit for Web

This is a sample one to one video calling client application written in JavaScript that allows developers to implement video calling capabilities empowered with Face AI in their websites. The application runs on the web browsers (referred as client end point) and utilizes EnableX Web SDK to conduct an RTC session with its peers through EnableX Video Services.The client application performs the following tasks to facilitate an RTC session:

Get token from the application server Connect to the room using the token Publish audio/video streams in the room Subscribe to remote audio/video streams in the room Listen to any session related events This sample client application also demonstrates the following features:

Mute/Unmute video Mute/Unmute audio Session Recording Chat face AI Screen share Disconnect

1. Important!

When developing a Client Application with EnxRtc.js ( present in client/js ), make sure to replace the old EnxRtc.js with updated EnxRtc.js polyfills from https://developer.enablex.io/video-api/client-api/web-toolkit/ for RTCPeerConnection and getUserMedia. Otherwise your application will not work in web browsers.

2. Trial

Sign up for a free trial https://portal.enablex.io/cpaas/trial-sign-up/ or try our multiparty video chat https://try.enablex.io/

3. Installation

3.1 Pre-Requisites

3.1.1 App Id and App Key

  • Create a free account on EnableX [https://portal.enablex.io/cpaas/trial-sign-up/]
  • Create your Project
  • Get the App ID and App Key generated against the Project
  • Clone this Repository git clone https://github.com/EnableX/Video-Conferencing-Open-Source-Web-Application-Sample.git --recursive & follow the steps further

3.1.2 SSL Certificates

The Application needs to run on https. So, you need to use a valid SSL Certificate for your Domain and point your application to use them.

However you may use self-signed Certificate to run this application locally. There are many Web Sites to get a Self-Signed Certificate generated for you, Google it. Few among them are:

The following below can also be used to create a self-signed certificate.

Linux/Mac

  cd Video-Conferencing-Open-Source-Web-Application-Sample
  cd server
  mkdir certs
  sudo openssl req -x509 -newkey rsa:4096 -keyout ./certs/example.key -out ./certs/example.crt -days 10000 -nodes
  sudo chmod 755 ./certs/example.*
  cd ..

Windows(Use Git Bash)

  cd Video-Conferencing-Open-Source-Web-Application-Sample
  cd server
  mkdir certs
  openssl req -x509 -newkey rsa:4096 -keyout ./certs/example.key -out ./certs/example.crt -days 10000 -nodes
  chmod 755 ./certs/example.*
  cd ..

3.1.3 Configure

Before you can run this application, configure the service. Copy the server/example.env as server/.env and update the values. Or you can set following system environment variables instead:

  SERVICE_PORT - Node port on which your application will run. Default port set is 3000
  ENABLEX_APP_ID - Your EnableX `App ID` - It's your username for EnableX API and can be found at Dashboard > Projects https://portal.enablex.io/dashboard/
  ENABLEX_APP_KEY - Your EnableX `App Key` - - It's your password for EnableX API and can be found at Dashboard > Projects https://portal.enablex.io/dashboard/

For Mac and Linux, open a terminal window and type the following commands. Note - Replace all the characters after the = with values from your EnableX account:

  export SERVICE_PORT=XXXX
  export ENABLEX_APP_ID=XXXXXXXXXX
  export ENABLEX_APP_KEY=XXXXXXXXX

On Windows, open a powershell / command window and type the following commands. Note that there is no =, just the key and value separated by a space:

  setx SERVICE_PORT 'XXXX'
  setx ENABLEX_APP_ID 'XXXXXXXXX'
  setx ENABLEX_APP_KEY 'XXXXXXXXX'

3.2 Build

Run npm install --save to build the project and the build artifacts will be stored in the ./node_modules directory.

3.2.1 Run Server

Run node server.js inside server folder for starting your Server.

  cd server
  node server.js

3.2.2 Test

  • Open a browser and go to https://localhost:3000/. The browser should load the App.
  • Allow access to Camera and Mic as and when prompted to start your first RTC Call through EnableX
  • You need to Room ID to join. We have added a "Create Room" link below the login form. Click it to get a Room-Id prefilled in the form.
  • You can share the Room-ID with anyone to join your Conference.

4. Server API

EnableX Server API is a Rest API service meant to be called from Partners' Application Server to provision video enabled meeting rooms. API Access is given to each Application through the assigned App ID and App Key. So, the App ID and App Key are to be used as Username and Password respectively to pass as HTTP Basic Authentication header to access Server API.

For this application, the following Server API calls are used:

To know more about Server API, go to: https://developer.enablex.io/video-api/server-api/

5. Client API

Client End Point Application uses Web Toolkit EnxRtc.js to communicate with EnableX Servers to initiate and manage RTC Communications.

To know more about Client API, go to: https://developer.enablex.io/video-api/client-api/

video-conferencing-open-source-web-application-sample's People

Contributors

dependabot[bot] avatar divyam59 avatar enablexer avatar rajeshg-vcloudx avatar rajeshgoyalg avatar subratthayal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

video-conferencing-open-source-web-application-sample's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.