npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cubicleai/wrtc

v0.7.0

Published

Standards-compliant WebRTC implementation for Node

Downloads

14

Readme

@cubicleai/wrtc

NPM

Node.js bindings for libwebrtc, which implements WebRTC M96. 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.

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