This project is a demonstration on how to create a simple JavaScript publisher & viewer application using the standardized WHIP (WebRTC-HTTP Ingress Protocol) for WebRTC broadcasting and WHEP (WebRTC-HTTP Egress Protocol) for WebRTC playback.
- Yarn version 1.22.0 or higher
- Node 16 or higher
- Npm version 8.19.0 or higher
- A Dolby.io account
- Clone this project and install the dependencies with:
yarn
- Create a Dolby.io account and create a publish token from the "Live Broadcast" section.
- Edit
.env
and add the following variables:
VITE_WHIP_URL
VITE_PUBLISH_TOKEN
VITE_WHEP_URL
VITE_SUBSCRIBER_TOKEN
These variables can be obtained from the Dolby.io Real-time Streaming dashboard. They can be found in the "API" tab once you have selected your token.
-
start your stream to Dolby.io Real-time streaming
-
start the example
yarn dev
-
Visit the hosted site. By default this is http://localhost:5173/