Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

Commit 45b44b1

Browse files
committed
Merge branch 'master' into sync_master
2 parents 7ac273c + 88f8a83 commit 45b44b1

File tree

2 files changed

+67
-34
lines changed

2 files changed

+67
-34
lines changed

README.md

Lines changed: 66 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,95 @@
1-
# SendBird Calls—QuickStart Guide for JavaScript
1+
# Sendbird Calls for JavaScript Quickstart
2+
3+
![Platform](https://img.shields.io/badge/platform-JAVASCRIPT-orange.svg)
4+
![Languages](https://img.shields.io/badge/language-JAVASCRIPT-orange.svg)
25

36
## Introduction
4-
SendBird provides `SendBirdCall` framework for your app enabling real-time `voice and video calls` between your users. This sample introduces an applications based on `SendBirdCall`.
57

6-
> If you need any helps or have any issue / question, please visit [our community](https://community.sendbird.com)
8+
Sendbird Calls SDK for JavaScript is used to initialize, configure, and build voice and video calling functionality into your JavaScript client app. In this repository, you will find the steps you need to take before implementing the Calls SDK into a project, and a sample app which contains the code for implementing voice and video call.
9+
10+
### More about Sendbird Calls for Javascript
11+
12+
Find out more about Sendbird Calls for JavaScript on [Calls for JavaScript doc](https://docs.sendbird.com/javascript/calls_quick_start). If you need any help in resolving any issues or have questions, visit [our community](https://community.sendbird.com).
13+
14+
<br />
15+
16+
## Before getting started
17+
18+
This section shows you the prerequisites you need for testing Sendbird Calls for Javascript sample app.
19+
20+
### Requirements
21+
22+
The minimum requirements for Calls SDK for Javascript sample are:
723

8-
## Prerequisites
924
- Node
1025
- npm (or yarn)
1126
- Modern browser, supporting WebRTC APIs.
1227

13-
## Creating a SendBird application
14-
1. Login or Sign-up for an account at [dashboard](https://dashboard.sendbird.com/).
15-
2. Create or select an application on the SendBird Dashboard.
16-
3. Note the `Application ID` for future reference.
17-
4. [Contact sales](https://sendbird.com/contact-sales) to get the `Calls` menu enabled in the dashboard. (Self-serve coming soon.)
28+
<br />
1829

19-
## Creating test users
20-
1. In the SendBird dashboard, navigate to the `Users` menu.
21-
2. Create at least two new users, one that will be the `caller`, and one that will be the `callee`.
22-
3. Note the `User ID` of each user for future reference.
30+
## Getting started
2331

24-
## Installing and running the sample application
25-
1\. Clone this repository
26-
```shell script
32+
If you would like to try the sample app specifically fit to your usage, you can do so by following the steps below.
33+
34+
### Create a Sendbird application
35+
36+
1. Login or Sign-up for an account on [Sendbird Dashboard](https://dashboard.sendbird.com).
37+
2. Create or select an application on the dashboard.
38+
3. Note your Sendbird application ID for future reference.
39+
4. [Contact sales](https://get.sendbird.com/talk-to-sales.html) to get the **Calls** menu enabled on your dashboard. A **self-serve** will be available soon to help you purchase call credits automatically from your dashboard.
40+
41+
### Create test users
42+
43+
1. On the Sendbird dashboard, navigate to the **Users** menu.
44+
2. Create at least two new users: one as a `caller`, and the other as a `callee`.
45+
3. Note the `user_id` of each user for future reference.
46+
47+
### Install and run the sample app
48+
49+
1. Clone this repository
50+
```bash
2751
$ git clone git@github.com:sendbird/quickstart-calls-javascript.git
2852
```
29-
2\. Install dependencies
30-
```shell script
53+
2. Install dependencies
54+
```bash
3155
$ cd quickstart-calls-javascript
3256
$ npm install
3357
```
34-
3\. In `envs.js`, replace the value of `TEST_APP_ID` with your `Application ID`. If you skip this step, an additional field for the `Application ID` will appear in the login view.
58+
3. In `envs.js`, replace the value of `TEST_APP_ID` with `APP_ID` which you can find on your Sendbird application information. If you skip this step, an additional field for the **Application ID** will appear in the login view.
3559
```javascript
36-
export const TEST_APP_ID = 'YOUR_APP_ID';
60+
export const TEST_APP_ID = 'SAMPLE_APP_ID';
3761
```
38-
4\. Build
62+
4. Build
3963
```shell script
4064
$ npm run build
4165
```
42-
5\. Start sample app
66+
5. Start the sample app
4367
```shell script
4468
# Start with webpack-dev-sever
4569
$ npm run start:dev
4670

4771
# Start with express server
4872
$ npm run start
4973
```
50-
6\. If two devices are available, repeat these steps to install the sample application on both the primary device and the secondary device.
51-
52-
## Making calls
53-
1. On each devices, open browser and go to sample page. The default url is `localhost:9000`
54-
2. On each browsers, choose any sample type to use (full-screen sample or widget sample).
55-
3. On primary browser, log in to the sample application with the ID of the user designated as the `caller`.
56-
4. On secondary browser, log in to the sample application with the ID of the user designated as the `callee`.
57-
5. On primary browser, specify the user ID of the `callee` and initiate a call.
58-
6. If all steps have been followed correctly, an incoming call notification will appear on the `callee` user’s browser.
59-
7. Reverse roles, and initiate a call from the other browser.
60-
8. If the `caller` and `callee` devices are near each other, use headphones to prevent audio feedback.
74+
6. If two devices are available, repeat these steps to install the sample app on each device.
75+
76+
<br />
77+
78+
## Making your first call
79+
80+
### How to make a call
81+
82+
1. On each device, open a browser and go to the index page of the sample web app. The default URL is `localhost:9000`.
83+
2. On each browser, choose an app type between **Full-screen** or **Widget**.
84+
3. On the primary device’s browser, log in to the sample app with the user ID set as the `caller`.
85+
4. On the secondary device’s browser, log in to the sample app with the user ID set as the `caller`.
86+
5. On the primary browser, specify the user ID of the `callee` and initiate a call.
87+
6. If all steps are followed correctly, an incoming call notification will appear on the browser of the `callee`.
88+
7. Reverse the roles. Initiate a call from the other browser.
89+
8. If the two testing devices are near each other, use headphones to make a call to prevent audio feedback.
90+
91+
<br />
6192

6293
## Reference
63-
[SendBird Calls JS SDK Readme](https://github.com/sendbird/sendbird-calls-javascript/blob/master/README.md)
94+
95+
For further detail on Sendbird Calls for JavaScript, refer to [Sendbird Calls SDK for JavaScript README](https://github.com/sendbird/sendbird-calls-javascript/blob/master/README.md).

lib/views/CallView.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import BaseElement from "../components/BaseElement";
22
import { createAudio, createDiv, createImg, createLabel, createVideo } from "../utils/domUtil";
33
import { getCallOption } from "../utils/util";
4+
import { hasClassName } from "../utils/domUtil";
45
import CallButtons from "./CallButtons";
56
import { classes } from "../css/styles.js";
67
import PeriodicJob from "../modules/periodicJob";

0 commit comments

Comments
 (0)