|
1 | | -# quickstart-calls-js |
2 | | -This public repository provides a calls sample with Node and let you know how to integrate SendBird's voice & video SDK. |
| 1 | +# SendBird Calls—QuickStart Guide for JavaScript |
| 2 | + |
| 3 | +## Introduction |
| 4 | +SendBird provides `SendBirdCall` framework for your app enabling `VoIP` communication among your users. This sample introduces an applications based on `SendBirdCall`. |
| 5 | + |
| 6 | +## Prerequisites |
| 7 | +- Node |
| 8 | +- npm (or yarn) |
| 9 | +- Modern browser, supporting WebRTC APIs. |
| 10 | + |
| 11 | +## Creating a SendBird application |
| 12 | +1. Login or Sign-up for an account at [dashboard](https://dashboard.sendbird.com/). |
| 13 | +2. Create or select an application on the SendBird Dashboard. |
| 14 | +3. Note the `Application ID` for future reference. |
| 15 | +4. [Contact sales](https://sendbird.com/contact-sales) to get the `Calls` menu enabled in the dashboard. (Self-serve coming soon.) |
| 16 | + |
| 17 | +## Creating test users |
| 18 | +1. In the SendBird dashboard, navigate to the `Users` menu. |
| 19 | +2. Create at least two new users, one that will be the `caller`, and one that will be the `callee`. |
| 20 | +3. Note the `User ID` of each user for future reference. |
| 21 | + |
| 22 | +## Installing and running the sample application |
| 23 | +1\. Clone this repository |
| 24 | +```shell script |
| 25 | +$ git clone git@github.com:sendbird/quickstart-calls-js.git |
| 26 | +``` |
| 27 | +2\. Install dependencies |
| 28 | +```shell script |
| 29 | +$ cd quickstart-calls-js |
| 30 | +$ npm install |
| 31 | +``` |
| 32 | +3\. In `envs.js`, replace the value of `TEST_APP_ID` with your `Application ID`. |
| 33 | +```javascript |
| 34 | +export const TEST_APP_ID = 'YOUR_APP_ID'; |
| 35 | +``` |
| 36 | +4\. Build |
| 37 | +```shell script |
| 38 | +$ npm run build |
| 39 | +``` |
| 40 | +5\. Start sample app |
| 41 | +```shell script |
| 42 | +# Start with webpack-dev-sever |
| 43 | +$ npm run start:dev |
| 44 | + |
| 45 | +# Start with express server |
| 46 | +$ npm run start |
| 47 | +``` |
| 48 | +6\. If two devices are available, repeat these steps to install the sample application on both the primary device and the secondary device. |
| 49 | + |
| 50 | +## Making calls |
| 51 | +1. On each devices, open browser and go to sample page. The default url is `localhost:9000` |
| 52 | +2. On each browsers, choose any sample type to use (full-screen sample or widget sample). |
| 53 | +3. On primary browser, log in to the sample application with the ID of the user designated as the `caller`. |
| 54 | +4. On secondary browser, log in to the sample application with the ID of the user designated as the `callee`. |
| 55 | +5. On primary browser, specify the user ID of the `callee` and initiate a call. |
| 56 | +6. If all steps have been followed correctly, an incoming call notification will appear on the `callee` user’s browser. |
| 57 | +7. Reverse roles, and initiate a call from the other browser. |
| 58 | +8. If the `caller` and `callee` devices are near each other, use headphones to prevent audio feedback. |
| 59 | +9. The SendBird Calls JavaScript Sample has been successfully implemented. |
| 60 | + |
| 61 | +## Reference |
| 62 | +[SendBird Calls JS SDK Readme](https://github.com/sendbird/sendbird-calls-javascript/blob/master/README.md) |
0 commit comments