1.1.1 • Published 17 days ago

webrtc-polyfill v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
17 days ago

webrtc-polyfill is a Node.js Native Addon that provides bindings to libdatachannel. This project aims for spec-compliance and is tested using the W3C's web-platform-tests project, but doesn't pass all of its tests, instead focuses on the important ones, like close, error and data events, states, while offering performance better than any alternative. A number of nonstandard APIs for testing are also included.

Notably most of the core WebRTC functionality is async in contrast to how web handles it. Notable examples are:

datachannel.send(new Blob([new Uint8Array([1,2,3,4])]))
datachannel.send(new Uint8Array([1,2,3,4])) // this will arrive before the blob, as blob internals are asynchronous

and

datachannel.send(new Uint8Array([1,2,3,4]))
datachannel.bufferedAmount // not always 4, as the thread that runs it is async and might flush instantly!

Install

pnpm install webrtc-polyfill

Supported Platforms

For supported platforms see the node-channel bindings compatibility table. Note that node versions under 14 require a global EventTarget and Event polyfill.

Testing

Requirements: Python, Node.js

1.1.1

17 days ago

1.1.0

17 days ago

1.0.15

17 days ago

1.0.14

19 days ago

1.0.13

19 days ago

1.0.9

1 month ago

1.0.8

1 month ago

1.0.11

1 month ago

1.0.12

1 month ago

1.0.7

1 month ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago