Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cubicleai/wrtc

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubicleai/wrtc

Standards-compliant WebRTC implementation for Node

  • 0.6.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@cubicleai/wrtc

NPM

Node.js bindings for libwebrtc, which implements WebRTC M95. This project aims for spec-compliance and is tested using the W3C's web-platform-tests project. A number of nonstandard APIs for testing are also included.

Install

npm install @cubicleai/wrtc

Installing from NPM downloads a prebuilt binary for your operating system × architecture. Set the TARGET_ARCH environment variable to "arm" or "arm64" to download for armv7l or arm64, respectively. Linux and macOS users can also set the DEBUG environment variable to download debug builds.

You can also build from source.

Supported Platforms

We intend to officially support

  • the latest 3 stable versions of Node.js
  • the latest 3 stable releases of Electron

For the following platforms:

  • Linux
  • macOS
  • Windows

On the following architectures:

  • x64
  • arm64
  • armv7l

Build validation is not yet in place for all of these platforms.

The following platforms are confirmed to work with @cubicleai/wrtc. Some may have prebuilt binaries available. Since we target N-API version 3, there may be additional platforms supported that are not listed here. If your platform is not supported, you may still be able to build from source.

The table below maps our support intentions to which configurations have been validated.

LinuxmacOSWindows
armv7larm64x64x64arm64x64
Node.js14
16
18
Electron18
19
20

Platform-specific details

Linux

Other libwebrtc bindings use Google's in-tree libc++ when targetting Linux. Due to compatibility issues, and to reduce the need for multiple C++ standard libraries to be loaded within a single application when using @cubicleai/wrtc in concert with other native add-ons, we have opted to use the system's libstdc++ instead. This does mean that you will need a compatible version of libstdc++ installed when you use the prebuilt versions of the library. If the prebuilt versions give you runtime link errors related to missing versions of libstdc++, either install the correct version or use SKIP_DOWNLOAD=true when running npm install to build from source instead.

Examples

See cubicleai/webrtc-examples.

Development

Make sure to check the platform-specific sections below for important information.

To set up a working copy for development:

Linux/Mac

Pre-steps

  • Install python3, C/C++ toolchain (ie build-essential), cmake
export SKIP_DOWNLOAD=true   # Important to skip fetching a prebuilt version from CDN
export DEBUG=1
export PARALLELISM=24       # Set to number of logical cores on your machine

# Initial install will build libwebrtc
# Get a coffee.

npm install

Windows

Pre-steps:

  • Install python3
  • Make sure long path support is enabled
    • Set HKLM\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnable to 1
    • git config --global core.longpaths true
    • git config core.longpaths true
  • Install VS 2019 (not just the VS 2019 build tools from a newer VS release like 2022)
    • libwebrtc is the limiting factor here
  • Install Windows 10 SDK v10.0.19041.0
    • Use the Windows SDK installer, make sure to include the required Debugging Tools for Windows
    • (!!) Do not use the Visual Studio installer, if you have previously installed this SDK via Visual Studio Installer, you must first remove it and install using the Windows SDK installer instead. If you use this, the build will fail on requirement of Windows SDK 10.0.19041.0

Initial build

$env:SKIP_DOWNLOAD = 'true'   # Important to skip fetching a prebuilt version from CDN
$env:DEBUG = '1'
$env:PARALLELISM = '24'       # set to number of logical cores

# Initial install will build libwebrtc
# Get a coffee.

npm install

Required Reading

References

Editorial

Keywords

FAQs

Package last updated on 16 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc