Skip to content

Commit 7813343

Browse files
committed
Start using connectionIds internally to keep track of different pc connections
Allow a user to send a connectionId when it starts listening Added methods to make sure we are correctly removing events listeners
1 parent bf11b51 commit 7813343

File tree

6 files changed

+334
-121
lines changed

6 files changed

+334
-121
lines changed

example/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<button id="hangupButton">hangup</button>
1010
<script src="https://unpkg.com/@peermetrics/webrtc-stats@latest/dist/browser.js"></script>
1111

12+
<!-- <script type="text/javascript" src="../dist/browser.js"></script> -->
13+
1214
<script>
1315
window.stats = new WebRTCStats({
1416
getStatsInterval: 2000,

package-lock.json

Lines changed: 60 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@
2222
"engines": {
2323
"node": ">=8"
2424
},
25-
"dependencies": {},
25+
"dependencies": {
26+
"uuid": "8.3.2"
27+
},
2628
"devDependencies": {
2729
"@babel/core": "^7.12.10",
2830
"@babel/preset-env": "^7.12.11",
2931
"@babel/preset-typescript": "^7.12.7",
32+
"@rollup/plugin-node-resolve": "^13.1.3",
3033
"@rollup/plugin-typescript": "^4.1.2",
3134
"@types/webrtc": "0.0.26",
3235
"babel-preset-minify": "^0.5.1",
3336
"http-server": "^0.12.3",
34-
"rollup": "^1.32.1",
37+
"rollup": "^2.38",
3538
"rollup-plugin-babel": "^4.3.3",
3639
"rollup-plugin-node-builtins": "^2.1.2",
3740
"rollup-plugin-terser": "^7.0.2",

rollup.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { nodeResolve } from '@rollup/plugin-node-resolve'
12
import typescript from '@rollup/plugin-typescript'
23

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

1011
const plugins = [
1112
builtins(),
13+
nodeResolve({
14+
browser: true
15+
}),
1216
typescript(),
1317
babel(babelConfig)
1418
]

0 commit comments

Comments
 (0)