Skip to content

Latest commit

 

History

History
127 lines (79 loc) · 5.72 KB

README.md

File metadata and controls

127 lines (79 loc) · 5.72 KB

Dolby.io Events React App

Overview

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

Requirements and supported platforms

The app currently supports

  • Chrome 100+
  • Edge 100+
  • Safari 111+
  • Firefox 16.3+

Getting Started

The following steps will quickly get you started testing the Dolby.io Communications APIs capabilities.

Pre-requisites

To get started building this app you will need a Dolby.io account. You will also need the following -

Basic terminology

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.

How to get a Dolby.io account

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:

  1. Go to the Dashboard, and click add new app if you do not have an existing app. dashboard
  2. 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. dashboard

How to run the Events app

Run the following steps after cloning the repository to run the application locally.

Install dependencies

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

Repo structure

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 directory
    • hooks/ 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.

Set up .env file

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,

  1. Go to the Dashboard, and click on the API Keys next to your application. dashboard
  2. On the next screen, copy the App key and App secret and paste them in your .env file against the marked variables. token

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.

Start the app

Execute the following command to run the application locally in a terminal window inside the /events/ directory.

yarn dev

Open the app in a browser

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.

built

Making the App your own

Follow our customization guide to better understand how you can extend the app to make it your own.

More resources

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.