Coder Social home page Coder Social logo

enablex / one-to-one-chat-webrtc-application-sample-for-php Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 2.73 MB

The EnableX PHP Chat App demonstrates the use of Video APIs and the JavaScript Toolkit to create a stellar 1-to-1 real-time chat experience. Designed for developers, this app eliminates the complexities of app development, enabling a smooth transition to host on personal devices.

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

PHP 13.72% CSS 38.14% HTML 7.96% JavaScript 40.18%
enablex enablex-platform php videochat api videocalling webrtc rtc onetoonechat chat

one-to-one-chat-webrtc-application-sample-for-php's Introduction

1-to-1 RTC Chat Application: PHP & EnableX Web Toolkit Example

1-to-1 RTC Web Chat App: PHP & EnableX Web Toolkit

Explore a Sample PHP Chat App showcasing the usage of EnableX platform APIs for seamless 1-to-1 RTC (Real-Time Communication) Applications. Develop your skills by hosting this app on your own devices, reducing the need for external servers.

RTC Applications on the EnableX platform operate seamlessly on supported web browsers, eliminating the need for additional plugin downloads.

This basic 1-to-1 Chat Application is crafted using HTML, CSS, Bootstrap, JavaScript, jQuery, PHP, 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 make sure to include the 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

  • Register with EnableX [https://portal.enablex.io/cpaas/trial-sign-up/]
  • Create your Application
  • Get your App ID and App Key
  • Clone this repository git clone https://github.com/EnableX/One-to-One-Chat-Webrtc-Application-Sample-for-PHP.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:

Alternatively you can create your self-signed certificate as below

  sudo openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.crt -days 10000 -nodes
  sudo mv server.crt /etc/ssl/certs/ssl.crt
  sudo mv server.key /etc/ssl/private/ssl.key

Enable mod ssl and turn on ssl server

  sudo a2enmod ssl
  sudo a2ensite default-ssl
  sudo service apache2 restart

3.1.3 Configure

  • Before you can run this application, configure the service by editing api/config.php file to use your app ID and app key
  define("API_URL",	"https://api.enablex.io/v1");
  define("APP_ID",	"YOUR_APP_ID");
  define("APP_KEY",	"YOUR_APP_KEY");

3.2 Test

  • Open a browser and go to https://yourdomain.com:4443/path-to-sample-app/client/. The browser should load the App.
  • 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/

one-to-one-chat-webrtc-application-sample-for-php's People

Contributors

divyam59 avatar enablexer avatar rajeshgoyalg avatar subratthayal avatar

Watchers

 avatar  avatar  avatar

Forkers

rajeshgoyalg

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.