@10p.io/wrtc

中文文档
0.10.0-m155.8发布于 2026/10/28BSD-2-ClauseTypeScriptCommonJS零依赖近 30 天下载 2802

Standards-compliant WebRTC implementation for Node

原始使用文档
文档目录3 节
  1. Install
  2. Supported Platforms
  3. Examples

    

NPM

This is a fork of WonderInventions/node-webrtc (@roamhq/wrtc) built against WebRTC M155, published as @10p.io/wrtc.

node-webrtc is a Node.js Native Addon that provides bindings to WebRTC M155. This project is aiming for spec-compliance and will eventually be tested using the W3C's web-platform-tests project. A number of nonstandard APIs for testing are also included.

Install

npm install @10p.io/wrtc

Installing from NPM downloads a prebuilt binary for your operating system × architecture, based on optional dependency filters.

To install a debug build or cross-compile, you should build from source.

Supported Platforms

The following platforms are confirmed to work with node-webrtc and have prebuilt binaries available. Since node-webrtc targets 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.

Linux macOS Windows
x64 arm64 x64 arm64 x64
Node 20 ✓ ? ✓ ✓ ✓
22 ✓ ? ✓ ✓ ✓

Examples

See node-webrtc/node-webrtc-examples.

版本与发布记录

@10p.io/wrtc 共发布 10 个版本,首次发布于 2026/10/19;过去 12 个月发布了 10 个版本。

版本发布日期距今
0.10.0-m155.8latest2026/10/2810 天前
0.10.0-m155.72026/10/2711 天前
0.10.0-m155.62026/10/2414 天前
0.10.0-m155.52026/10/2414 天前
0.10.0-m155.42026/10/2414 天前
0.10.0-m155.32026/10/2414 天前

其他发布通道:next → 0.11.0-test.0。

关于 @10p.io/wrtc 的常见问题

@10p.io/wrtc 是什么?

Standards-compliant WebRTC implementation for Node

如何安装 @10p.io/wrtc?

在项目目录运行 npm install @10p.io/wrtc,或使用 pnpm add / yarn add / bun add。

@10p.io/wrtc 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@10p.io/wrtc 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@10p.io/wrtc 可以商用吗?

@10p.io/wrtc 使用 BSD-2-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@10p.io/wrtc 的下载量有多少?

根据 npm 官方下载统计,@10p.io/wrtc 在 2026/10/04 – 2026/11/02 这 30 天内被下载 2,802 次,日均约 93 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@10p.io/wrtc 还在维护吗?

最新版本 0.10.0-m155.8 发布于 2026/10/28(10 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/10/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。