mediasoup

/ home / Documentation / v3 / mediasoup / Installation

mediasoup v3 Installation

Install the mediasoup Node.js module via NPM within your Node.js application:

$ npm install mediasoup@3 --save

Requirements

In order to build the mediasoup C/C++ components the following packages and libraries must be available in the target host:

Linux, OSX and any *NIX system

  • In Debian and Ubuntu install the build-essential DEB package. It includes both make and gcc/g++.
  • In YUM based Linux (Red Hat, CentOS) use yum groupinstall "Development Tools".

If there is not python command pointing to Python 2 or 3 executable, set the PYTHON environment variable during mediasoup installation:

$ PYTHON=python3 npm install mediasoup@3 --save

If the MEDIASOUP_MAX_CORES environment variable is set, the build process will use that number of CPU cores. Otherwise it will auto-detect the number of cores in the machine.

Windows

  • Append the path of MSBuild.exe folder to the Windows PATH environment variable (e.g. “C:\Program Files (x86)\MSBuild\14.0\Bin”).
  • Create a new Windows environment variable GYP_MSVS_VERSION with the version of Visual Studio as value (e.g. “2017” for Visual Studio 2017).

Usage

Within your Node.js application:

const mediasoup = require("mediasoup");