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, 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.
14
+
This package is a more up to date version of feross's simple-peer, 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.
15
15
16
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.
17
17
@@ -49,14 +49,23 @@ This package is used by [WebTorrent](https://webtorrent.io) and [many others](#w
49
49
## install
50
50
51
51
```
52
-
npm install simple-peer
52
+
npm install @workadventure/simple-peer
53
53
```
54
54
55
-
This package works in the browser with [browserify](https://browserify.org). If
56
-
you do not use a bundler, you can use the `simplepeer.min.js` standalone script
57
-
directly in a `<script>` tag. This exports a `SimplePeer` constructor on
58
-
`window`. Wherever you see `Peer` in the examples below, substitute that with
59
-
`SimplePeer`.
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