The Medooze Media Server for Node.js (`medooze-media-server`) is a comprehensive WebRTC media server designed to receive, send, and route media streams between remote WebRTC peers. It functions as a Selective Forwarding Unit (SFU) and provides extensive support for key WebRTC features including MP4 multitrack recording (supporting H264, VP8, VP9, OPUS, PCMU/A codecs), VP9 SVC, Simulcast with temporal layer selection, RTP transport wide congestion control, sender-side bitrate estimation, NACK and RTX, Bundle, ICE lite, and Frame Marking. The current stable version is 1.156.2, indicating a project with continuous development and frequent updates. A core differentiator is its focus on robust, low-latency WebRTC SFU capabilities, detailed integration with Perfetto for tracing, and broad platform support including Linux, macOS, and Raspberry Pi, making it adaptable for various deployment environments from cloud infrastructure to edge devices. It relies on a critical peer dependency, `medooze-media-server-src`, for its underlying native components.
npm install medooze-media-serverVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Medooze Media Server, create an endpoint for a WebRTC peer, configure basic logging, handle local ICE candidate generation, and generate an SDP offer to initiate a WebRTC connection. It outlines the foundational steps required before full media routing.
Ensure that your system has the necessary build tools installed. For Debian/Ubuntu, `sudo apt-get install build-essential python3`. For macOS, install Xcode Command Line Tools (`xcode-select --install`). If pre-compiled binaries are desired, follow the 'Distribution' steps in the README to `npm run-script dist` and install the generated `.tgz`.
Manually ensure `medooze-media-server-src` is installed in your project: `npm install medooze-media-server-src`. Always verify that its version satisfies the `peerDependencies` range specified by `medooze-media-server`.
Deploy the media server on a supported operating system (Linux, macOS, Raspberry Pi). For development on Windows, consider using Windows Subsystem for Linux (WSL) or a virtual machine running a supported OS.
Always use the default import syntax for ESM: `import MediaServer from 'medooze-media-server';`.
Run `npm install medooze-media-server-src` in your project directory to install the peer dependency. Ensure its version is compatible with `medooze-media-server`.
Ensure build tools are installed (e.g., `build-essential` on Linux, Xcode Command Line Tools on macOS). Try cleaning the npm cache and rebuilding the package: `npm cache clean --force` then `npm rebuild medooze-media-server`. Verify Node.js version compatibility listed in the package's documentation.
For ESM, ensure you use the default import syntax: `import MediaServer from 'medooze-media-server';`. For CommonJS, use `const MediaServer = require('medooze-media-server');`.