Coder Social home page Coder Social logo

enablex / video-kyc-webrtc-application-sample-for-web Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 2.0 2.38 MB

This real-time video KYCWeb App demonstrates the use of EnableX platform Video APIs and Web Toolkit to build real time video KYC application. It allows developers to ramp up on app development by hosting on their own devices.

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

CSS 34.30% HTML 9.22% JavaScript 56.48%
video-kyc-application enablex-platform enablex ekyc videocalling kyc webrtc video javascript webapp

video-kyc-webrtc-application-sample-for-web's Introduction

Developing a Video KYC Web App with Node.js and EnableX Web Toolkit

Coding a Video KYC Web App: Node.js & EnableX Web Toolkit

See our Sample Web App showcasing EnableX APIs for a basic Video KYC solution. This app helps developers learn API usage and host it on their devices, avoiding server dependencies. It runs smoothly on supported web browsers, no plugins needed. Developed with HTML, CSS, Bootstrap, JavaScript, jQuery, Node.js, and EnxRtc (EnableX Web Toolkit).

The details of the supported set of web browsers can be found here: https://developer.enablex.io/video/browser-compatibility-of-enablex-video/

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-KYC-Webrtc-Application-Sample-for-Web.git --recursive & follow the steps further
  • You can copy the app into any sub-directory of hosted website on Apache

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:

As you have Certificate or created a Self-Signed Certificate, create a directory "certs" under your Sample Web App Directory. Copy your Certificate files (.key and .crt files) to this directory.

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

Linux/Mac

  cd Video-KYC-Webrtc-Application-Sample-for-Web
  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-KYC-Webrtc-Application-Sample-for-Web
  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 by editing server/vcxconfig.js to meet project requirement:

  vcxconfig.SERViCE = {
    name: "Video KYC POC",     // Name of the Application [Change optional]
    version: "1.0.0",                   // Version [Change optional]
    path: "/v1",                        // Route [Default /v1]
    domain: "localhost",           // FQDN of  your hosting enviornment
    port  : "4443",                     // FQDN of  your hosting port. You need sudo permission if you want to use standard 443
    listen_ssl : true                   // SSL on/off key  [ Set always to "true" ]
  };

  vcxconfig.Certificate = {
    ssl_key:      "../certs/example.key",  // Use the certificate ".key" [self signed or registered]
    ssl_cert :    "../certs/example.crt",  // Use the certificate ".crt" [self signed or registered]
    sslCaCerts :  null                        // Use the certificate CA[chain] [self signed or registered]
  };

  vcxconfig.SERVER_API_SERVER = {
    host: 'api.enablex.io',             // Hosted EnableX Server API Domain Name
    port: '443'
  };

  vcxconfig.clientPath  = "../client";    // UI files location
  vcxconfig.APP_ID      = "YOUR_APP_ID";  // Enter Your App ID
  vcxconfig.APP_KEY     = "YOUR_APP_KEY"; // Enter Your App Key

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:4443/. The browser should load the App.
  • Allow access to Camera and Mic as and when prompted to start your first RTC Call through EnableX

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-kyc-webrtc-application-sample-for-web's People

Contributors

divyam59 avatar enablexer avatar kamal-kumar-1991 avatar rajeshgoyalg avatar sourav-dhankhar avatar ssamanvaya98 avatar subratthayal avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.