Giter Site home page Giter Site logo

commanderroot / connect-rtc-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws/connect-rtc-js

0.0 0.0 0.0 2.67 MB

Provide softphone support to AmazonConnect customers when they choose to directly integrate with our API and not using our web app.

License: Apache License 2.0

JavaScript 100.00%

connect-rtc-js's Introduction

Build Status

Amazon Connect connect-rtc-js

connect-rtc.js provides softphone support to AmazonConnect customers when they choose to directly integrate with AmazonConnect API and not using AmazonConnect web application. It implements Amazon Connect WebRTC signaling protocol and integrates with browser WebRTC APIs to provide a simple contact session interface which can be integrated with Amazon Connect StreamJS seemlessly.

The Amazon Connect Softphone Team (the team responsible for development of connect-rtc.js) is hiring! Do you want to help build the next generation of web-based communication services? Do you have what it takes to be an Amazonian? We are hiring engineers at all levels - find out more here

Usage

Prebuilt releases

In the gh-pages branch prebuilt ready to use files can be downloaded/linked directly.

Build your own

  1. Install latest LTS version of NodeJS
  2. Install Grunt
  3. git clone https://github.com/aws/connect-rtc-js.git
  4. cd connect-rtc-js
  5. npm install
  6. To build:
    1. grunt
    2. Find build artifacts in out directory
  7. To run unit tests:
    1. npm test
  8. To run demo page:
    1. grunt demo
    2. Open the URL printed out by connect task, it looks like "Started connect web server on https://localhost:9943"
    3. Click demo folder

Amazon Connect StreamJS integration

In a typical amazon-connect-streams integration, connect-rtc-js is not required on parent page. Softphone call handling is done by embedded CCP.

However the following steps could further customize softphone experience.

  1. Load connect-rtc-js along with amazon-connect-streams on parent page
  2. Following amazon-connect-streams instructions to initialize CCP
  3. Replace the softphone parameter (within the second parameter of connect.core.initCCP()) with allowFramedSoftphone: false This would stop embedded CCP from handling softphone call
  4. Add this line after initCCP connect.core.initSoftphoneManager({allowFramedSoftphone: true}); This would allow your page to handle softphone call with the connect-rtc-js loaded by your page. allowFramedSoftphone is necessary if your page also lives in a frame, otherwise you can remove that parameter.
  5. Add this HTML element to your web page <audio id="remote-audio" autoplay></audio> amazon-connect-streams library will look for this element and inject it into connect-rtc-js so that connect-rtc-js can play downstream audio through this element.
  6. Customize it (some ideas below)
    • Customize audio device for remote-audio element
    • Look at all the documented APIs in RtcSession class, modify softphone.js as you need
    • Revert step 4, add your own glue layer between amazon-connect-streams and connect-rtc-js (use softphone.js as a template)

connect-rtc-js's People

Contributors

adamerce avatar anilvuta avatar anjpat avatar ferreirf avatar gargvk10 avatar hyandell avatar jackjm-amazon avatar jamesiri avatar kennanw avatar lihanmingwustl avatar meesams avatar pradhikshaa-m avatar ravellakavya avatar shauchih avatar supelee avatar tyagrahu avatar vignendra avatar yuliangz 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.