Skip to content

WebRTC Demo using PeerJs, Share screen without video call, make a video call, Simplest WebRtc connection Demo

Notifications You must be signed in to change notification settings

Abhi5h3k/WebRTC-PeerJs-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Simple WebRTC Demo using PeerJS

Abhishek LinkedIn Abhishek StackOverflow

A simple WebRTC demo using PeerJS that showcases real-time video calls, screen sharing (with/without camera), and local video streaming between peers.

image


✨ Features

  • 📹 One-to-one video calls
  • 🖥️ Screen sharing (with or without camera access)
  • 🎞️ Stream local video to remote peer
  • 👥 Room-based peer connection system

📽️ Demo Videos

Feature Watch Demo
🔴 One-to-one Video Call YouTube
🖥️ Join Room & Share Screen YouTube
🚫 Screen Share w/o Camera YouTube
🎞️ Stream Local Video File YouTube

🖼️ Screenshots

📡 Room Created — Waiting for Peer to Join

Room Created

🖥️ Your Screen Shared Locally

Local View

📲 Remote Peer’s Shared Screen

Remote View


🛠️ Setup Instructions

  1. Clone the repository:

    git clone https://github.com/Abhi5h3k/WebRTC-PeerJs-Demo.git
    cd WebRTC-PeerJs-Demo
    
  2. Open index.html directly in your browser, or host the project using any static server.

  3. Open the app in two different tabs or devices to test peer-to-peer connection.


🧰 Tech Stack

  • 📡 WebRTC (real-time communication)
  • 🔌 PeerJS (simplified WebRTC peer connections)
  • 🧠 HTML / CSS / JavaScript

📖 About WebRTC

WebRTC enables real-time audio, video, and data communication between browsers and devices. It works natively on all major browsers without the need for plugins. Supported by Google, Mozilla, Microsoft, and Apple, it's ideal for creating live chat, conferencing, or streaming apps.

image


📦 PeerJS Overview

PeerJS is a simple wrapper over WebRTC offering:

  • Unique peer IDs
  • Easy media stream and data channel creation
  • Simplified connection logic between clients

PeerJS makes WebRTC development much easier and beginner-friendly.

image


📬 Feedback

Feel free to open an issue or contact me via LinkedIn if you have suggestions, bug reports, or questions.


📝 License

This project is open source. Please maintain proper credits to the author and contributors when reusing or modifying