Skip to content

Commit

Permalink
Start using connectionIds internally to keep track of different pc co…
Browse files Browse the repository at this point in the history
…nnections

Allow a user to send a connectionId when it starts listening
Added methods to make sure we are correctly removing events listeners
  • Loading branch information
onel committed Jan 27, 2022
1 parent bf11b51 commit 7813343
Show file tree
Hide file tree
Showing 6 changed files with 334 additions and 121 deletions.
2 changes: 2 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<button id="hangupButton">hangup</button>
<script src="https://unpkg.com/@peermetrics/webrtc-stats@latest/dist/browser.js"></script>

<!-- <script type="text/javascript" src="../dist/browser.js"></script> -->

<script>
window.stats = new WebRTCStats({
getStatsInterval: 2000,
Expand Down
69 changes: 60 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@
"engines": {
"node": ">=8"
},
"dependencies": {},
"dependencies": {
"uuid": "8.3.2"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@rollup/plugin-node-resolve": "^13.1.3",
"@rollup/plugin-typescript": "^4.1.2",
"@types/webrtc": "0.0.26",
"babel-preset-minify": "^0.5.1",
"http-server": "^0.12.3",
"rollup": "^1.32.1",
"rollup": "^2.38",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-terser": "^7.0.2",
Expand Down
4 changes: 4 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { nodeResolve } from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'

import builtins from 'rollup-plugin-node-builtins'
Expand All @@ -9,6 +10,9 @@ import babelConfig from './.babelrc.json'

const plugins = [
builtins(),
nodeResolve({
browser: true
}),
typescript(),
babel(babelConfig)
]
Expand Down
Loading

0 comments on commit 7813343

Please sign in to comment.