You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Simple WebRTC video, voice, and data channels
13
13
14
-
This package is a more up-to-date version of feross's simple-peer, rewritten 100% in Typescript. It uses `EventEmitter` and `Uint8Array` instead of node streams and buffers, making the module lighter and fully compatible with browser bundlers like Vite. It provides `@thaunknown/simple-peer/lite.js` which is the same peer implementation, but without MediaTrack and MediaStream handling, just pure Uint8/String data.
15
-
14
+
This package is a more up-to-date version of feross's simple-peer, rewritten 100% in Typescript. It uses `EventEmitter` and `Uint8Array` instead of node streams and buffers, making the module lighter and fully compatible with browser bundlers like Vite. It provides `@workadventure/simple-peer/lite.ts` which is the same peer implementation, but without MediaTrack and MediaStream handling, just pure Uint8/String data.
16
15
17
16
> **Breaking change:** This version no longer extends `Duplex` stream. The `pipe()` method is not available. Use `peer.on('data', ...)` and `peer.send()` / `peer.write()` instead.
18
17
@@ -53,7 +52,20 @@ This package is used by [WebTorrent](https://webtorrent.io) and [many others](#w
53
52
npm install @workadventure/simple-peer
54
53
```
55
54
56
-
This package works in the browser with a bundler like Vite.
55
+
This package works with modern bundlers (Vite, Rollup, Webpack) and also directly in the browser via native ESM.
56
+
If you do not use a bundler, include it using a `<script type="module">` and import from a CDN:
0 commit comments