Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 526e2e1

Browse files
author
wenfeng song
committed
1.9.2 RC
1 parent ceacd1c commit 526e2e1

File tree

148 files changed

+2669
-1119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2669
-1119
lines changed

.env.example

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are your dolby.io credentials
2+
KEY=YOUR_APP_KEY
3+
SECRET=YOUR_APP_SECRET
4+
5+
#Enable or disable specific features
6+
VITE_RTMP_STREAMING=true
7+
VITE_MUSIC_MODE=true
8+
VITE_CONFERENCE_RECORDING=true
9+
VITE_BLUR_OPTION=true
10+
VITE_VIDEO_FORWARDING_OPTION=true
11+
VITE_APP_NAME='Video Call Sample App'
12+
VITE_APP_VERSION='1.9.0'

.eslintrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
rules: {
3+
'react/react-in-jsx-scope': 'off',
4+
},
5+
};

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ node_modules
33
dist
44
dist-ssr
55
*.local
6+
7+
.env

CHANGELOG.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# comms-app-react-videocall
2+
3+
## 1.9.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [9f537472]
8+
- @dolbyio/comms-uikit-react@1.0.1
9+
10+
## 1.9.1
11+
12+
### Patch Changes
13+
14+
- Updated dependencies [d7789fb4]
15+
- Updated dependencies [3fda9630]
16+
- Updated dependencies [e70fe30d]
17+
- @dolbyio/comms-uikit-react@1.0.0
18+
19+
## 1.9.0
20+
21+
### Minor Changes
22+
23+
- d43caf7e: - Add chat message history
24+
- Upgrade Vite from 2.7.2 to 4.3.3
25+
- Upgrade Prettier from 2.5.1 to 2.8.8
26+
27+
### Patch Changes
28+
29+
- 695a9a5c: Updated dependencies
30+
- 1bc380d6: Fix button rendering on enter name page
31+
- Updated dependencies [22645038]
32+
- Updated dependencies [da5f8916]
33+
- Updated dependencies [d43caf7e]
34+
- Updated dependencies [d43caf7e]
35+
- Updated dependencies [e7a044f0]
36+
- Updated dependencies [545f1dcd]
37+
- Updated dependencies [695a9a5c]
38+
- @dolbyio/comms-uikit-react@0.9.1

README.md

+69-61
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
# Video Call App
22

33
<p align="center">
4-
<img src="documentation/assets/banner.png" width="375px" />
4+
<img src="./documentation/banner.jpg" width="375px" />
55
</p>
66

77
## Overview
88

9-
This project demonstrates what a simple video meeting experience is like, built using React.
9+
This project demonstrates what a simple video meeting experience is like, built using React.
1010

11-
| Intended use | Features | Tech stack |
12-
| ------------ | ---------------------------------------------------------------- | --------------------- |
13-
| 1:1 calls | Creating and joining a conference | React |
14-
| Group calls | Camera, microphone, and audio output configuration | Typescript/Javascript |
15-
| Conferencing | Full conference view with grid display of user streams | HTML/CSS |
16-
| | Basic video conferencing interactions (muting, camera switching) | |
17-
| | Screen sharing | |
18-
| | Recording | |
19-
| | Background blur (available only on desktop Chrome and Edge)" | |
11+
| Intended use | Features | Tech stack |
12+
| ------------ | ------------------------------------------------------------------------------------------ | --------------------- |
13+
| 1:1 calls | Creating and joining a conference | React |
14+
| Group calls | Camera, microphone, and audio output configuration | Typescript/Javascript |
15+
| Conferencing | Full conference view with grid display of user streams | HTML/CSS |
16+
| | Basic video conferencing interactions (muting, camera switching) | |
17+
| | Screen sharing | |
18+
| | Recording | |
19+
| | Background blur (available only on desktop Chrome and Edge) | |
20+
| | Multi-screen share (maximum 2 instances) | |
21+
| | Streaming to RTMP endpoints | |
22+
| | [Music Mode](https://docs.dolby.io/communications-apis/docs/guides-music-mode) | |
23+
| | [Video Forwarding](https://docs.dolby.io/communications-apis/docs/guides-video-forwarding) | |
2024

21-
Want to learn more? Check out the [Video Call App Project Gallery page](https://docs.dolby.io/communications-apis/docs/video-call).
22-
23-
## Getting Started
24-
25-
The following steps will quickly get you started testing the Dolby.io Communications APIs capabilities.
26-
27-
### Pre-requisites
28-
29-
To get started building this app you will need a Dolby.io account and access token. You will also need the following -
30-
31-
- NPM v8.11
32-
- Yarn v 1.22.19
33-
- Node v16
25+
Want to learn more? Check out the [Video Call App Project Gallery page](https://dolby.io/project-gallery/video-call-sample-apps/).
3426

3527
### Supported Browsers
3628

@@ -41,20 +33,61 @@ The Video Call App supports the following browsers
4133
- Firefox 100+
4234
- Edge 100+
4335

44-
#### How to get a Dolby.io account
36+
## Run the demo directly
37+
38+
You can deploy the Dolby.io Video Call app without needing to clone and build the app using the `Deploy to Netlify` button. You will need:
39+
40+
- A Netlify account to which you're logged into
41+
- Your Dolby.io App key and secret
42+
43+
Refer to [this guide](#how-to-get-a-dolbyio-account) on how to obtain your Dolby.io tokens.
44+
45+
[![Deploy to Netlify from fork](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/dolbyio-samples/comms-app-react-videocall)
46+
47+
## Getting Started
48+
49+
The following steps will quickly get you started testing the Dolby.io Communications Platform.
50+
51+
### Pre-requisites
52+
53+
To get started building this app you will need a Dolby.io account and access token. You will also need the following -
54+
55+
- [Node v18.0.0 or higher](https://nodejs.org/en/download)
56+
- [NPM v8.11 or higher](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
57+
- [Yarn v1.22.19](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
58+
59+
### How to get a Dolby.io account
4560

4661
To setup your Dolby.io account, go to [Dolby.io dashboard](https://dashboard.dolby.io) and complete the form. After confirming your email address, you will be logged in.
4762

48-
#### How to obtain access token
63+
> If you did not receive a verification email, check your Spam or Junk email folders.
64+
65+
#### Setting up your [Dolby.io](https://dashboard.dolby.io) app
66+
67+
To set up your app, you will need to go to the _Dashboard_. Inside the `Communications and Media` tab, click `add new app` if you do not have an existing app. ![dashboard](documentation/dashboard.png)
68+
69+
### Repo structure
4970

50-
You will need to generate a client access token to run this app. Follow the steps to obtain a token.
71+
- The `videocall/src/` directory contains all the front-end code for the video calling app. Within this directory
5172

52-
1. Go to the Dashboard, and find the _Applications_ menu item..
53-
![dashboard](documentation/assets/Dashboard.png)
73+
- `hooks/` contains wrapper functions around our SDK for re-usable functionality.
74+
- `components/` contains UI components that encapsulate and provide functionality.
75+
- `utils/` provides some generic helper functions.
76+
- `context/` contains the React Context for the side drawer and the main component window.
5477

55-
2. On the next screen, there is a token field where you can copy the client access token to your clipboard. The generated token is active for the indicated amount of time.
78+
- The `backend/` contains the code for the proxy server.
5679

57-
![token](documentation/assets/apps-dashboard.png)
80+
This project is built with the [Comms UI Kit for react](https://github.com/dolbyio/comms-uikit-react) library for simplicity and re-use of standard Communications API based components.
81+
82+
### Setup the `.env` file
83+
84+
Create a new file called `.env` in the `videocall` folder, and copy the contents of `.env.example` into it.
85+
You will need to provide the values for `KEY` and `SECRET` from your dolby.io app. To obtain your key and secret from the Dolby.io dashboard,
86+
87+
1. Go to the _Dashboard_, and click on the `API Keys` next to your application.
88+
![dashboard](documentation/dashboard.png)
89+
2. On the next screen, copy the `App key` and `App secret` and paste them in your `.env` file against the marked variables.
90+
![token](documentation/app_keys.png)
5891

5992
## How to run the Video Conferencing app
6093

@@ -70,22 +103,6 @@ Open a terminal window in the root directory of your project folder. Install the
70103
yarn
71104
```
72105

73-
### Paste the token
74-
75-
Open file [src/App.tsx](./src/App.tsx), find line 23 and replace `{YOUR_TOKEN}` with your access token string, prepared previously in [this step](#how-to-obtain-access-token). It should look like this:
76-
77-
```javascript
78-
return (
79-
<TranslationProvider>
80-
<ConferenceCreateProvider>
81-
<CommsProvider token="bGciOiJIUzUxMiJ9.eyJOTQxMywic3V...23r2fsdvsdfsfdsvfd">
82-
<...>
83-
</CommsProvider>
84-
</ConferenceCreateProvider>
85-
</TranslationProvider>
86-
);
87-
```
88-
89106
### Start the app
90107

91108
Execute the following command to run the application locally.
@@ -96,23 +113,14 @@ yarn dev
96113

97114
### Open the app in a browser
98115

99-
After the appropriate message appears in the terminal window, open <http://localhost:3000> in the browser. The application will launch at this address.
100-
101-
## How to build the Video Conferencing app
116+
After the appropriate message appears in the terminal window, open <http://localhost:3000> in the browser. The application will launch at this address. You should be able to see the welcome screen.
102117

103-
Follow the steps of installing dependencies and token configuration from the "How to run the Video Conferencing app" section.
104-
105-
After installing the dependencies, execute the following command:
106-
107-
`yarn build`
108-
109-
This command generates distribution packages in the `/dist` directory.
118+
![home](documentation/home.png)
110119

111120
### Additional configuration
112121

113-
Please see the [additional configuration options](additional-configurations.md) guide to learn more about additional settings such as music mode.
114-
122+
Please see the [additional configuration options](additional-configurations.md) guide to learn more about additional settings such as music mode.
115123

116-
## More resources
124+
## More resources
117125

118-
Looking for more sample apps and projects? Head to the [Project Gallery]()
126+
Looking for more sample apps and projects? Head to the [Project Gallery](https://dolby.io/project-gallery).

additional-configurations.md

+30-34
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
# Additional Configuration Options for the Video Call App
1+
# Additional Configuration and customization Options for the Video Call App
2+
3+
## Changing the labels in the app
4+
5+
To change the labels in the app, you can modify [en.json](src/translations/en.json) and change the labels as necessary.
6+
To add a new string, add a new key-value pair to the JSON file. You can then reference that new key in the code as follows:
7+
8+
```javascript
9+
10+
// en.json
11+
{
12+
//... other keys
13+
"yourNewKey" : "your new value",
14+
}
15+
16+
// your own code file
17+
import {Text} from '@dolbyio/comms-uikit-react';
18+
19+
<Text labelKey="yourNewKey" type="H2" />
20+
21+
```
222

323
## Base URL configuration
424

@@ -18,56 +38,32 @@ Additional information about Base URL configuration can be found [here](https://
1838
VITE_MUSIC_MODE=true
1939
```
2040

21-
2. To start the application run the following command in the **root** directory
41+
You can learn more about music mode on our [docs pages](https://docs.dolby.io/communications-apis/docs/guides-music-mode) 2. To start the application run the following command in the **root** directory
2242

2343
```bash
2444
yarn dev
2545
```
2646

2747
## Using live streaming features
2848

29-
In order to use live streaming features, you need to run an additional proxy server so that POST methods can be properly handled. An example of such a server is placed in the [/api](api/) folder.
49+
In order to use live streaming features, you need to run an additional proxy server so that POST methods can be properly handled. An example of such a server is placed in the [/backend](backend/) folder.
3050

3151
> If your application has been started in previous steps, please kill the process and proceed with instructions below.
3252
3353
### Setting up live streaming
3454

35-
1. In the project root folder, create an `.env` file and add the following variables
55+
1. In the project root folder's `.env` file set the following variable
3656

3757
```env
38-
VITE_API_PROXY=localhost
39-
VITE_PROXY_PORT=4000
40-
VITE_PROXY_PROTOCOL=http
41-
VITE_STREAMING=true
42-
```
43-
44-
2. In the `/api` directory, create an `.env` file and fill it with the following properties.
45-
46-
```bash
47-
PORT=4000
48-
KEY=APP_KEY
49-
SECRET=APP_SECRET
50-
HOSTNAME=localhost
51-
```
52-
53-
Your `APP_KEY` and `APP_SECRET` can be found in your Dolby.io dashboard, under the app section. **Do not** wrap them in quote marks.
54-
55-
![Keys and secrets](documentation/assets/app_keys.png)
56-
57-
3. Staying inside the `/api` directory, install all dependencies by running the following command
58-
59-
```bash
60-
yarn
58+
VITE_RTMP_STREAMING=true
6159
```
6260

63-
1. To start both the server and application together, run the following command in the **root** directory:
61+
> You can set any value for port and hostname in the .env files, as long as they are the same.
6462
65-
```bash
66-
yarn run dev-proxy
67-
```
63+
## Customizing the App Theme
6864

69-
>You can set any value for port and hostname in the .env files, as long as they are the same.
65+
The app theme is controlled by the [Dolby.io UI Kit](https://www.npmjs.com/package/@dolbyio/comms-uikit-react). Refer to [this guide](https://github.com/DolbyIO/comms-uikit-react/blob/main/documentation/providers/ThemeProvider.md) on how to stylize your app.
7066

71-
## Adding Custom layouts to your live stream
67+
## Customizing the viewer layout
7268

73-
Please visit this [blog post](https://dolby.io/blog/creating-a-custom-mixer-layout-for-streaming-a-conference/) if you want to explore adding a custom layout to your live stream.
69+
You can re-arrange the rendered layout for your live stream viewers by configuring the Communications API Mixer app. A mixer app is a web app based on the Dolby.io communications APIs that composes multiple streams of videos into a single stream and passes that on to any RTMP or webRTC based consumer. Refer to this [blog](https://dolby.io/blog/creating-a-custom-mixer-layout-for-streaming-a-conference/) for more details.

api/README.md

-49
This file was deleted.

api/certs/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)