Understand the Node-Media-Server Architecture
mainNode-Media-Server is a high-performance Node.js real-time media server. Its architecture is organized into five layers:
- Application Layer: Handles RTMP publishing/playback, HTTP-FLV playback, and WebSocket-FLV playback.
- Protocol Layer: Implements RTMP (handshake/chunking), FLV (tag format), and WebSocket (frame format) protocols.
- Session Layer: Manages individual sessions including
RtmpSession,FlvSession(HTTP/WS), andAPI Session(REST API). - Service Layer: Contains the server implementations:
NodeRtmpServer(TCP/SSL),NodeHttpServer(HTTP/WS/Static files/API),NodeRecordServer(Recording), andNodeNotifyServer(HTTP callbacks). - Core Layer: Provides global state via
Context, theLoggersystem, and theEvent System.