Coder Social home page Coder Social logo

webinar's Introduction

Daily webinar app

Daily's webinar app example using Daily Prebuilt.

Webinar app screenshot

Requirements

Sign up for a Daily account. You will need your Daily API key, which can be found on the Developers page.

Create a Daily room

Your Daily room is where the webinar will be hosted. Create a Daily room through the Daily dashboard or Daily's REST API.

Room properties

There are two main room properties to be aware of when creating a Daily room for your webinar:

properties: {
    enable_chat: false,
    owner_only_broadcast: true
}

Since the webinar app has a custom chat, the Daily Prebuilt's default chat functionality should be turned off. Additionally, to ensure only the meeting owners can turn on their cameras/microphones for the webinar experience, set the owner_only_broadcast property to true.

There are several other optional properties depending on the webinar experience you're building. Additional information on room properties are included in Daily's docs.


Running this demo locally

To run this demo locally, add an .env file with the following variables:

REACT_APP_BASE_URL=<-your Daily URL, e.g. https://demo-example.daily.co->
REACT_APP_DAILY_API_KEY=<-your Daily API key->

In a terminal window, run the following commands:

yarn
yarn start

Open http://localhost:3000 to view it in the browser. In-call webinar app screenshot

To join a webinar room, go to http://localhost:3000/[room-name] where [room-name] is changed to the name of the room you just created.

To join as a webinar admin, go to http://localhost:3000/[room-name]?t=[daily-token], using a Daily meeting token that has the property is_owner set to true.


Deploying this demo to Netlify

We've included a button below to deploy to Netlify with one click:

Deploy with Netlify

For this demo to work remotely, you will need to follow the following additional steps.

1. Updating your API URL

The deployed version of this app will need to using a different API URL than what is used locally, which is set in WebinarCall.jsx. To make this change, comment out the first local API_URL variable. You will instead use the second option already included below it.

/**
 * Use for local testing
 */
// const API_URL = "https://api.daily.co/v1/"; // This should be commented out or removed

/**
 * Uncomment and use if deployed to Netlify (see README for instructions)
 */
const API_URL = `${process.env.REACT_APP_API_URL}/api`; // <- use this API_URL instead

You can also remove the headers included in the two fetch requests in WebinarCall.jsx, as the requests do not need to be authenticated by the client-side code once deployed to Netlify.

2. Updating Netlify settings

There are a couple Daily API endpoints used in this repo to validate Daily meeting tokens and rooms. We have set up a netlify.toml file to handle Netlify redirects to simplify interacting with these endpoints. This allows the Daily endpoints to be used without using them (and your API key) directly in this client-side code.

Netlify console screenshot

Once deployed, You will need to set three environment variables in Netlify's console under Site Settings > Build & deploy:

REACT_APP_BASE_URL=<-your Daily URL->
REACT_APP_DAILY_API_KEY=<-your Daily API key->
REACT_APP_NETLIFY_URL=<Netlify-URL-available-after-deploying>

Your REACT_APP_NETLIFY_URL variable is the URL where Netlify deployed your copy of the app. It should look something like https://example-domain.netlify.app/.

The other two variables are the same as what's used when running the app locally:

Note: You will need to redeploy the app in Netlify after changing any environment variables in the settings.

Once the app is redeployed, you can visit your Netlify domain to see the deployed version https://example-domain.netlify.app/[room-name]


Demo Features:

  • one:many presentation mode for the room admin
  • participants (non-admin) can message the admin directly
  • admin can respond to individual participants or message the entire group
  • lots of Daily links to help participants find what they need in our documentation

webinar's People

Contributors

jessmitch42 avatar

Watchers

James Cloos avatar Joe Mordica avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.