- Hoàng Minh Tuấn - B21DCVT444
- Nguyễn Hoàng Long - B21DCCN497
- Nguyễn Doãn Hoàng Giang - B21DCAT003
- (Focus on) video conferencing solution to handle online meetings for 1-to-1 and group interactions.
- Real-time messaging for both individual and group chats.
- Java (Spring Boot)
- WebSocket
- WebRTC with Mesh architecture
First, create SSL certificates using Git Bash. Follow these steps:
- Create an SSL directory in your project root:
mkdir ssl- Generate SSL certificates using OpenSSL (replace
<YOUR_LOCAL_IP>with your computer's local IP, e.g., 10.24.9.200):
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout ssl/private_key.pem \
-out ssl/certificate.pem \
-subj "//C=US//ST=California//L=San Francisco//O=MyOrganization//OU=MyDepartment//CN=<YOUR_LOCAL_IP>"Update the nginx.conf file:
- Locate your
nginx.conffile - Replace all instances of
10.24.9.200with your local IP address
Modify the WebRTC client configuration:
- Navigate to:
src/main/resources/static/webrtc.js - Update the following variables with your local IP address:
const LOCAL_IP_ADDRESS = "10.24.9.200";
const signalingServer = new WebSocket(`wss://${LOCAL_IP_ADDRESS}/ws`);- You must use your computer's actual local IP address throughout the configuration
- All IP addresses (in SSL certificates, NGINX config, and client code) must match
- The SSL certificates will be valid for 365 days
Audio and video communication system designed to work inside web pages.
WebRTC consists of three main parts:
- Signalling
- Connecting
- Communicating
- P2P Protocol: Direct peer-to-peer communication with no need for traffic routing through a central server
- Signaling Server:
- Used only for initial channel setup
- Determines media format and peer communication preferences
- Facilitates exchange of:
- Session keys
- Error messages
- Media metadata
- Codecs
- Bandwidth information
- Public IP addresses and ports
-
NAT (Network Address Translation):
- Maps private addresses inside a local network to public IP addresses
- Enables transmission onto the internet
-
ICE (Interactive Connectivity Establishment):
- Framework that tests all connections in parallel
- Selects the most efficient connection path
- Two primary connection types:
- STUN (Session Traversal Utilities for NAT) Servers:
- Detects NAT type in use
- Provides public IP address for peer communication
- Handles "Symmetric NAT" cases where routers only accept previously connected peers
- TURN (Traversal Using Relays Around NATs):
- Functions as relay servers for failed P2P connections
- Maintains media relay between WebRTC peers
- Compresses and decompresses audio/video
- Key features:
- Packet loss concealment
- Noisy image cleanup
- Cross-platform capture and playback
Three main APIs handle core functionality:
-
MediaStream:
- Captures audio and video from user devices
- Allows setting of constraints (frame rate, resolution)
-
RTCPeerConnection:
- Manages real-time audio/video transmission
- Handles connection lifecycle (connect, maintain, close)
-
RTCDataChannel:
- Transmits arbitrary data
- Integrated with RTCPeerConnection
- Provides security and congestion control
-
Cost Efficiency:
- No media servers required
- Reduced bandwidth usage
- Lower overall costs
-
Privacy:
- Direct media flow between users
- Service provider has no access to data
- Enhanced privacy protection
-
Bandwidth and CPU Limitations:
- Multiple media streams per device
- Can overwhelm system resources
- Performance degradation with increased load
-
Scalability Issues:
- Less effective for 3+ user calls
- Media server-based solutions preferred for larger groups
- Performance and user experience challenges
A video conferencing architecture that optimizes data transmission between server and endpoints through the following process:
- Server receives incoming video streams from all endpoints
- Server distributes uncompressed video streams to each endpoint
- Endpoints merge incoming video streams from other participants
- Stream centralization through server-based distribution
- Each participant:
- Sends single outgoing signal
- Receives multiple streams from other users via server
- Reduces individual endpoint processing load