This project demonstrates what an events experience is like, built using React.
Intended use | Features | Tech stack |
---|---|---|
Events | create, start, stream and stop an event | Typescript/Javascript |
Webinars | A/V controls for hosts and viewers | HTML/CSS |
Virtual events | Mute camera and microphone | React |
Screen share | ||
Invite co-hosts and viewers | ||
Event Recording | ||
Participant List |
The app currently supports
- Chrome 100+
- Edge 100+
- Safari 111+
- Firefox 16.3+
The following steps will quickly get you started testing the Dolby.io Communications APIs capabilities.
To get started building this app you will need a Dolby.io account. You will also need the following -
As you browse through the source code and documents, you might come across some of these terms
- A host is a participant with additional permissions to manage the conference and other participants.
- A viewer is a participant who can only receive video and audio stream from the conference.
- A proxy-app-server is an intermediary API server that communicates with the Dolby.io Communications Platform in order to provide functionality such as RTS/RTMP/HLS streaming or consuming web-hook data. You can see our sample implementation here.
To setup your Dolby.io account, go to the Dolby.io dashboard and register for an account. After confirming your email address, you will be logged in.
If you did not receive a verification email, check your Spam or Junk email folders.
Setting up your Dolby.io app
To set up your app for events, you will need to:
- Go to the Dashboard, and click
add new app
if you do not have an existing app. - To enable events streaming, your app should be opted into the open beta program. You can find this at the bottom of the
Communications APIs
sidebar navigation when you click on your app.
Run the following steps after cloning the repository to run the application locally.
note : This guide is written with Yarn in mind. We have not validated this project with other package managers.
Open a terminal window in the root directory of your project folder. Install the project's dependencies using the following command.
yarn
The code in this repository is organised in the following way
- The
src/
directory contains all the front-end code for the events app. Within this directoryhooks/
contains wrapper functions around our SDK for re-usable functionality.components/
contains UI components that encapsulate and provide functionality.utils/
provides some generic helper functions.context/
contains the React Context for the side drawer and the main component window.
- The
api-proxy/
contains the code for the proxy server.
This project is built with the Comms UI Kit for react library for simplicity and re-use of standard Communications API based components.
Create a new file called .env
in the events
folder, and copy the contents of .env.example
into it.
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,
- Go to the Dashboard, and click on the
API Keys
next to your application. - On the next screen, copy the
App key
andApp secret
and paste them in your.env
file against the marked variables.
If you want chat and the ability to promote a viewer to host, you will need to provide your PUBNUB_PUBLISH_KEY
, PUBNUB_SUBSCRIBE_KEY
, and PUBNUB_SECRET_KEY
as well. To setup PubNub, please go through the PubNub setup guide.
The secrets will not be exposed on the frontend.
Execute the following command to run the application locally in a terminal window inside the /events/
directory.
yarn dev
After the appropriate message appears in the terminal window, open http://localhost:3000 in the browser. The application will launch at this address and will look like the screenshot below.
Follow our customization guide to better understand how you can extend the app to make it your own.
Want to experience the app without building it? Try our Virtual Events Demo app.
Looking for more sample apps and projects? Head to the Dolby.io Project Gallery.