├── .airtap.yml ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── .npmignore ├── .tool-versions ├── LICENSE ├── README.md ├── img ├── dfinity-sponsor.png ├── full-mesh-formula.png └── full-mesh.png ├── index.js ├── package.json ├── perf ├── receive.js ├── send.js └── server.js ├── test ├── basic.js ├── binary.js ├── common.js ├── multistream.js ├── negotiation.js ├── object-mode.js ├── trickle.js └── z-cleanup.js └── tinysimplepeer.min.js /.airtap.yml: -------------------------------------------------------------------------------- 1 | sauce_connect: true 2 | browsers: 3 | - name: firefox 4 | version: latest 5 | - name: chrome 6 | version: latest 7 | - name: safari 8 | version: latest 9 | - name: edge 10 | version: latest 11 | - name: and_chr 12 | version: latest 13 | - name: ios_saf 14 | version: latest 15 | providers: 16 | - airtap-sauce 17 | presets: 18 | local: 19 | providers: airtap-manual 20 | browsers: 21 | - name: manual 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "🐞 Bug report" 3 | about: Report an issue with this software 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | **What version of this package are you using?** 13 | 14 | **What operating system, Node.js, and npm version?** 15 | 16 | **What happened?** 17 | 18 | 19 | 20 | **What did you expect to happen?** 21 | 22 | **Are you willing to submit a pull request to fix this bug?** 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: ❓ Ask a question 4 | url: https://discord.gg/CNxFAzdEmr 5 | about: Ask questions about this software 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: "⭐️ Feature request" 3 | about: Request a new feature to be added 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | **What version of this package are you using?** 13 | 14 | **What problem do you want to solve?** 15 | 16 | **What do you think is the correct solution to this problem?** 17 | 18 | **Are you willing to submit a pull request to implement this change?** 19 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **What is the purpose of this pull request? (put an "X" next to item)** 2 | 3 | [ ] Documentation update 4 | [ ] Bug fix 5 | [ ] New feature 6 | [ ] Other, please explain: 7 | 8 | **What changes did you make? (Give an overview)** 9 | 10 | **Which issue (if any) does this pull request address?** 11 | 12 | **Is there anything you'd like reviewers to focus on?** 13 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: / 5 | schedule: 6 | interval: daily 7 | labels: 8 | - dependency 9 | versioning-strategy: increase 10 | - package-ecosystem: github-actions 11 | directory: / 12 | schedule: 13 | interval: daily 14 | labels: 15 | - dependency 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 'on': 3 | - push 4 | - pull_request 5 | jobs: 6 | test: 7 | name: Node ${{ matrix.node }} / ${{ matrix.os }} 8 | runs-on: ${{ matrix.os }} 9 | environment: ci 10 | strategy: 11 | fail-fast: false 12 | matrix: 13 | os: 14 | - ubuntu-latest 15 | node: 16 | - '14' 17 | steps: 18 | - uses: actions/checkout@v2 19 | - uses: actions/setup-node@v2 20 | with: 21 | node-version: ${{ matrix.node }} 22 | - run: npm install 23 | - run: npm run build --if-present 24 | - run: echo "127.0.0.1 airtap.local" | sudo tee -a /etc/hosts 25 | - run: npm test 26 | env: 27 | SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} 28 | SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .nyc_output 2 | node_modules 3 | package-lock.json 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .airtap.yml 2 | .nyc_output 3 | .github/ 4 | img/ 5 | perf/ 6 | test/ 7 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | nodejs 18.7.0 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tiny-simple-peer [![ci][ci-image]][ci-url] [![coveralls][coveralls-image]][coveralls-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] [![javascript style guide][sauce-image]][sauce-url] 2 | 3 | [ci-image]: https://img.shields.io/github/workflow/status/feross/simple-peer/ci/master 4 | [ci-url]: https://github.com/feross/simple-peer/actions 5 | [coveralls-image]: https://coveralls.io/repos/github/feross/simple-peer/badge.svg?branch=master 6 | [coveralls-url]: https://coveralls.io/github/feross/simple-peer?branch=master 7 | [npm-image]: https://img.shields.io/npm/v/simple-peer.svg 8 | [npm-url]: https://npmjs.org/package/simple-peer 9 | [downloads-image]: https://img.shields.io/npm/dm/simple-peer.svg 10 | [downloads-url]: https://npmjs.org/package/simple-peer 11 | [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg 12 | [standard-url]: https://standardjs.com 13 | [sauce-image]: https://saucelabs.com/buildstatus/simple-peer 14 | [sauce-url]: https://saucelabs.com/u/simple-peer 15 | 16 | #### Simple WebRTC video, voice, and data channels 17 | 18 | This is a fork of [simple-peer](https://github.com/feross/simple-peer) which drops `stream.Duplex` support but retains all other functionality. This reduces the overhead of sending/receiving data channel messages and also radically reduces the bundle size of this library. The remainder of this README is the original documentation of `simple-peer` with slight modifications to reflect the changes in `tiny-simple-peer`. 19 | 20 |