This is the frontend interface for the WebCamBroadcast_Backend, a real-time WebRTC video broadcasting platform. Built with React and Vite, it provides a simple UI for broadcasters and viewers to connect via unique stream IDs.
- 🎙️ Start a live WebRTC broadcast
- 👀 View broadcasts by entering a stream ID
- 💻 Minimal and responsive UI built with React
- ⚡ Powered by Vite for fast development
- React
- Vite
- WebRTC API
- Axios for API calls
- Tailwind CSS (optional if used)
-
Clone the repository
git clone https://github.com/dharshan-kumarj/WebCamBroadcast_Frontend.git cd WebCamBroadcast_Frontend
-
Install dependencies
npm install
-
Run the development server
npm run dev
-
Open
http://localhost:5173
in your browser.
Make sure the backend server is also running:
The frontend expects the backend API to be available at http://localhost:8000
by default.
- Go to
/broadcast
to start a live broadcast. - The app will fetch a unique stream ID from the backend.
- Share the stream ID with viewers.
- Viewers can go to
/view/<stream_id>
to join the broadcast.
src/
├── pages/
│ ├── Broadcast.jsx
│ └── Viewer.jsx
├── components/
├── App.jsx
├── main.jsx
If needed, you can configure the backend API base URL by setting an environment variable:
Create a .env
file:
VITE_API_BASE_URL=http://localhost:8000
Then in your code:
const BASE_URL = import.meta.env.VITE_API_BASE_URL;
- Add authentication for broadcasters
- Add stream list/history
- Improve error handling and validations
- Mobile responsiveness improvements
Made by Dharshan Kumar J