Try   HackMD

Difference between WebRTC and WebSocket

Communication is an essential part of our daily lives. Chat applications make it easy to interact with people around the world. These chat applications are send chats in real time. This is where WebRTC and WebSockets come into play. They grant us real time communication, making the sending and receiving of chats done immediately.

In this article, we will learn the difference between WebRTC and WebSockets by building a video chat application.

Table of Content

  • Introduction
  • Prerequisites
  • What is WebRTC
  • What is WebSocket
  • Difference
  • Overview of the video chat app
  • Setting up the frontend
  • Setting up the server
    • Setting up the express server
    • Setting up the WebSocket server
  • Requesting video and audio permission
  • Creating the peer Connection
  • Bonus section
    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →
    (Optional)
    • Deploying the application
  • Conclusion
  • Resources