Extending upon group video chat, to support group live streaming. This project demonstrates how to implement Agora's Media Push features to send live video streams from an Agora channel to a streaming platform such as Twitch, YouTube Live, Vimeo, Facebook Live, and any other services that provide a stream-key and RTMP endpoint.
This example is written using vanilla javascript to implment the Agora Video SDK for Web v4.20
- Clone the repo
- Rename
.env-example
file to.env
- Add Agora API Key to the .env file
- Follow steps in setup
- Open the terminal and navigate to repo folder
- Use this command to run dev mode with local webserver:
npm run dev
- Follow steps in setup
- Open the terminal and navigate to repo folder
- Use this command to run the build script:
npm run build
- Upload the contents of the new
dist
folder to your webserver - Make sure the server has your Agora API key set in the environment variables using the env variable
VITE_AGORA_APP_ID=
This project is setup with a GitHub actions workflow to deploy the project to GitHub pages, if enabled in the project settings.
To enable GitHub Pages build via GitHub Actions:
- Fork the project on GitHub (https://github.com/digitallysavvy/group-live-stream)
- Clone the project
- Click the project's Settings tab
- Click the Pages tab in the left column menu
- Under Build and deployment, select GitHub Actions as the Source
- Click the Environments tab in the left column menu
- Click github-pages from the Environments list
- Click Add variable under the Environment variable section
- Set the name
VITE_AGORA_APP_ID
and your Agora AppId as the value. - Update the
vit.config.js
file to update the url if you change the project name