Jelajahi Sumber

删除node_modules文件夹

wkw 2 minggu lalu
induk
melakukan
e5c3b04729
90 mengubah file dengan 9 tambahan dan 18784 penghapusan
  1. 9 0
      .gitignore
  2. 0 33
      node_modules/.package-lock.json
  3. 0 61
      node_modules/sdp/.eslintrc
  4. 0 16
      node_modules/sdp/.github/workflows/npm-test.yml
  5. 0 0
      node_modules/sdp/.nyc_output/a9b935d8-5f14-4c64-b895-6b0ece2e9d7c.json
  6. 0 1
      node_modules/sdp/.nyc_output/processinfo/a9b935d8-5f14-4c64-b895-6b0ece2e9d7c.json
  7. 0 1
      node_modules/sdp/.nyc_output/processinfo/index.json
  8. 0 19
      node_modules/sdp/LICENSE
  9. 0 4
      node_modules/sdp/README.md
  10. 0 1083
      node_modules/sdp/coverage.lcov
  11. 0 773
      node_modules/sdp/dist/sdp.js
  12. 0 67
      node_modules/sdp/package.json
  13. 0 220
      node_modules/sdp/sdp.d.ts
  14. 0 802
      node_modules/sdp/sdp.js
  15. 0 92
      node_modules/trtc-sdk-v5/README-zh_CN.md
  16. 0 84
      node_modules/trtc-sdk-v5/README.md
  17. 0 2113
      node_modules/trtc-sdk-v5/index.d.ts
  18. 0 63
      node_modules/trtc-sdk-v5/package.json
  19. 0 8
      node_modules/trtc-sdk-v5/plugins/ai-denoiser/denoiser-wasm.js
  20. 0 76
      node_modules/trtc-sdk-v5/plugins/cdn-streaming/cdn-streaming.esm.d.ts
  21. 0 0
      node_modules/trtc-sdk-v5/plugins/cdn-streaming/cdn-streaming.esm.js
  22. 0 0
      node_modules/trtc-sdk-v5/plugins/cdn-streaming/cdn-streaming.iife.js
  23. 0 31
      node_modules/trtc-sdk-v5/plugins/cdn-streaming/package.json
  24. 0 27
      node_modules/trtc-sdk-v5/plugins/cross-room/cross-room.esm.d.ts
  25. 0 0
      node_modules/trtc-sdk-v5/plugins/cross-room/cross-room.esm.js
  26. 0 0
      node_modules/trtc-sdk-v5/plugins/cross-room/cross-room.iife.js
  27. 0 30
      node_modules/trtc-sdk-v5/plugins/cross-room/package.json
  28. 0 10
      node_modules/trtc-sdk-v5/plugins/debug/debug.esm.d.ts
  29. 0 0
      node_modules/trtc-sdk-v5/plugins/debug/debug.esm.js
  30. 0 0
      node_modules/trtc-sdk-v5/plugins/debug/debug.iife.js
  31. 0 30
      node_modules/trtc-sdk-v5/plugins/debug/package.json
  32. 0 26
      node_modules/trtc-sdk-v5/plugins/device-detector/device-detector.esm.d.ts
  33. 0 0
      node_modules/trtc-sdk-v5/plugins/device-detector/device-detector.esm.js
  34. 0 0
      node_modules/trtc-sdk-v5/plugins/device-detector/device-detector.iife.js
  35. 0 29
      node_modules/trtc-sdk-v5/plugins/device-detector/package.json
  36. 0 13
      node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/basic-beauty.esm.d.ts
  37. 0 0
      node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/basic-beauty.esm.js
  38. 0 0
      node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/basic-beauty.iife.js
  39. 0 30
      node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/package.json
  40. 0 44
      node_modules/trtc-sdk-v5/plugins/video-effect/beauty/beauty.esm.d.ts
  41. 0 208
      node_modules/trtc-sdk-v5/plugins/video-effect/beauty/beauty.esm.js
  42. 0 208
      node_modules/trtc-sdk-v5/plugins/video-effect/beauty/beauty.iife.js
  43. 0 30
      node_modules/trtc-sdk-v5/plugins/video-effect/beauty/package.json
  44. 0 30
      node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/package.json
  45. 0 31
      node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/virtual-background.esm.d.ts
  46. 0 0
      node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/virtual-background.esm.js
  47. 0 0
      node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/virtual-background.iife.js
  48. 0 30
      node_modules/trtc-sdk-v5/plugins/video-effect/watermark/package.json
  49. 0 10
      node_modules/trtc-sdk-v5/plugins/video-effect/watermark/watermark.esm.d.ts
  50. 0 0
      node_modules/trtc-sdk-v5/plugins/video-effect/watermark/watermark.esm.js
  51. 0 0
      node_modules/trtc-sdk-v5/plugins/video-effect/watermark/watermark.iife.js
  52. 0 0
      node_modules/trtc-sdk-v5/trtc.esm.js
  53. 0 0
      node_modules/trtc-sdk-v5/trtc.js
  54. 0 70
      node_modules/webrtc-adapter/.eslintrc
  55. 0 65
      node_modules/webrtc-adapter/.travis.yml
  56. 0 15
      node_modules/webrtc-adapter/CONTRIBUTING.md
  57. 0 71
      node_modules/webrtc-adapter/Gruntfile.js
  58. 0 30
      node_modules/webrtc-adapter/LICENSE.md
  59. 0 79
      node_modules/webrtc-adapter/README.md
  60. 0 25
      node_modules/webrtc-adapter/bower.json
  61. 0 21
      node_modules/webrtc-adapter/dist/adapter_core.js
  62. 0 16
      node_modules/webrtc-adapter/dist/adapter_core5.js
  63. 0 141
      node_modules/webrtc-adapter/dist/adapter_factory.js
  64. 0 698
      node_modules/webrtc-adapter/dist/chrome/chrome_shim.js
  65. 0 49
      node_modules/webrtc-adapter/dist/chrome/getdisplaymedia.js
  66. 0 199
      node_modules/webrtc-adapter/dist/chrome/getusermedia.js
  67. 0 40
      node_modules/webrtc-adapter/dist/chrome/selectaudiooutput.js
  68. 0 436
      node_modules/webrtc-adapter/dist/common_shim.js
  69. 0 318
      node_modules/webrtc-adapter/dist/firefox/firefox_shim.js
  70. 0 39
      node_modules/webrtc-adapter/dist/firefox/getdisplaymedia.js
  71. 0 64
      node_modules/webrtc-adapter/dist/firefox/getusermedia.js
  72. 0 346
      node_modules/webrtc-adapter/dist/safari/safari_shim.js
  73. 0 260
      node_modules/webrtc-adapter/dist/utils.js
  74. 0 59
      node_modules/webrtc-adapter/index.d.ts
  75. 0 3364
      node_modules/webrtc-adapter/out/adapter.js
  76. 0 3363
      node_modules/webrtc-adapter/out/adapter_no_global.js
  77. 0 0
      node_modules/webrtc-adapter/out/esbuild.js
  78. 0 91
      node_modules/webrtc-adapter/package.json
  79. 0 16
      node_modules/webrtc-adapter/src/js/adapter_core.js
  80. 0 16
      node_modules/webrtc-adapter/src/js/adapter_core5.js
  81. 0 139
      node_modules/webrtc-adapter/src/js/adapter_factory.js
  82. 0 702
      node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js
  83. 0 50
      node_modules/webrtc-adapter/src/js/chrome/getdisplaymedia.js
  84. 0 189
      node_modules/webrtc-adapter/src/js/chrome/getusermedia.js
  85. 0 462
      node_modules/webrtc-adapter/src/js/common_shim.js
  86. 0 300
      node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js
  87. 0 36
      node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js
  88. 0 67
      node_modules/webrtc-adapter/src/js/firefox/getusermedia.js
  89. 0 352
      node_modules/webrtc-adapter/src/js/safari/safari_shim.js
  90. 0 263
      node_modules/webrtc-adapter/src/js/utils.js

+ 9 - 0
.gitignore

@@ -1 +1,10 @@
 /unpackage
+
+
+# Node modules
+node_modules/
+
+
+
+# 压缩包
+*.zip

+ 0 - 33
node_modules/.package-lock.json

@@ -1,33 +0,0 @@
-{
-    "name": "switch开关,按钮可嵌套内容,支持异步关闭、滑动动画效果、禁用以及颜色配置",
-    "version": "1.5",
-    "lockfileVersion": 3,
-    "requires": true,
-    "packages": {
-        "node_modules/sdp": {
-            "version": "3.2.0",
-            "resolved": "https://registry.npmmirror.com/sdp/-/sdp-3.2.0.tgz",
-            "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw=="
-        },
-        "node_modules/trtc-sdk-v5": {
-            "version": "5.8.3",
-            "resolved": "https://registry.npmmirror.com/trtc-sdk-v5/-/trtc-sdk-v5-5.8.3.tgz",
-            "integrity": "sha512-MbcFNLp0NIkWxZaNAnIt6VKmb53a0kBsNB3zn1pocXhPGlXrx/zhyzaonM+VydDU24o0fjQlrvOajUWxuIuF0Q==",
-            "dependencies": {
-                "webrtc-adapter": "^8.2.3"
-            }
-        },
-        "node_modules/webrtc-adapter": {
-            "version": "8.2.3",
-            "resolved": "https://registry.npmmirror.com/webrtc-adapter/-/webrtc-adapter-8.2.3.tgz",
-            "integrity": "sha512-gnmRz++suzmvxtp3ehQts6s2JtAGPuDPjA1F3a9ckNpG1kYdYuHWYpazoAnL9FS5/B21tKlhkorbdCXat0+4xQ==",
-            "dependencies": {
-                "sdp": "^3.2.0"
-            },
-            "engines": {
-                "node": ">=6.0.0",
-                "npm": ">=3.10.0"
-            }
-        }
-    }
-}

+ 0 - 61
node_modules/sdp/.eslintrc

@@ -1,61 +0,0 @@
-{
-  "rules": {
-    "array-bracket-spacing": 2,
-    "block-spacing": [2, "never"],
-    "brace-style": [2, "1tbs", {"allowSingleLine": false}],
-    "camelcase": [2, {"properties": "always"}],
-    "curly": 2,
-    "default-case": 2,
-    "dot-notation": 2,
-    "eqeqeq": 2,
-    "indent": [
-        2,
-        2,
-        {"SwitchCase": 1}
-    ],
-    "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
-    "max-len": [2, 80, 2, {"ignoreUrls": true}],
-    "new-cap": [2, {"newIsCapExceptions": [
-        "webkitRTCPeerConnection",
-        "mozRTCPeerConnection"
-    ]}],
-    "no-console": 0,
-    "no-else-return": 2,
-    "no-eval": 2,
-    "no-multi-spaces": 2,
-    "no-multiple-empty-lines": [2, {"max": 2}],
-    "no-shadow": 2,
-    "no-trailing-spaces": 2,
-    "no-unused-expressions": 2,
-    "no-unused-vars": [2, {"args": "none"}],
-    "object-curly-spacing": [2, "never"],
-    "padded-blocks": [2, "never"],
-    "quotes": [
-        2,
-        "single"
-    ],
-    "semi": [
-        2,
-        "always"
-    ],
-    "keyword-spacing": 2,
-    "space-before-blocks": 2,
-    "space-before-function-paren": [2, "never"],
-    "space-unary-ops": 2,
-    "space-infix-ops": 2,
-    "spaced-comment": 2,
-    "valid-typeof": 2
-  },
-  "env": {
-      "es6": true,
-      "browser": true,
-      "node": true
-  },
-  "extends": ["eslint:recommended"],
-  "globals": {
-    "module": true,
-    "require": true,
-    "process": true,
-    "Promise": true,
-  }
-}

+ 0 - 16
node_modules/sdp/.github/workflows/npm-test.yml

@@ -1,16 +0,0 @@
-name: npm-test
-
-on: [pull_request]
-
-jobs:
-  test:
-    runs-on: ubuntu-latest
-    steps:
-    - uses: actions/checkout@v3
-    - uses: actions/setup-node@v3
-    - run: npm install
-    - run: npm test
-    - run: npm run coverage
-    - uses: codecov/codecov-action@v1
-      with:
-        file: ./coverage.lcov

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/sdp/.nyc_output/a9b935d8-5f14-4c64-b895-6b0ece2e9d7c.json


+ 0 - 1
node_modules/sdp/.nyc_output/processinfo/a9b935d8-5f14-4c64-b895-6b0ece2e9d7c.json

@@ -1 +0,0 @@
-{"uuid":"a9b935d8-5f14-4c64-b895-6b0ece2e9d7c","parent":null,"pid":5750,"argv":["/usr/bin/node","/media/fippo/houseparty/webrtc/sdp/node_modules/.bin/mocha","test/sdp.js"],"execArgv":[],"cwd":"/media/fippo/houseparty/webrtc/sdp","time":1673267457493,"ppid":5743,"root":"9110d26c-7a83-40c7-a41d-9670d698bc02","coverageFilename":"/media/fippo/houseparty/webrtc/sdp/.nyc_output/a9b935d8-5f14-4c64-b895-6b0ece2e9d7c.json","files":["/media/fippo/houseparty/webrtc/sdp/sdp.js"]}

+ 0 - 1
node_modules/sdp/.nyc_output/processinfo/index.json

@@ -1 +0,0 @@
-{"processes":{"a9b935d8-5f14-4c64-b895-6b0ece2e9d7c":{"parent":null,"children":[]}},"files":{"/media/fippo/houseparty/webrtc/sdp/sdp.js":["a9b935d8-5f14-4c64-b895-6b0ece2e9d7c"]},"externalIds":{}}

+ 0 - 19
node_modules/sdp/LICENSE

@@ -1,19 +0,0 @@
-Copyright (c) 2017 Philipp Hancke
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 0 - 4
node_modules/sdp/README.md

@@ -1,4 +0,0 @@
-# SDP parsing and utlities
-originally for generating SDP from ORTC and vice versa -- see https://github.com/fippo/adapter/tree/shim-ortc
-
-But it turned out to be useful for manipulating SDP outside the context of Microsofts Edge browser.

+ 0 - 1083
node_modules/sdp/coverage.lcov

@@ -1,1083 +0,0 @@
-TN:
-SF:sdp.js
-FN:9,SDPUtils.generateIdentifier
-FN:17,SDPUtils.splitLines
-FN:21,SDPUtils.splitSections
-FN:28,SDPUtils.getDescription
-FN:34,SDPUtils.getMediaSections
-FN:41,SDPUtils.matchPrefix
-FN:49,SDPUtils.parseCandidate
-FN:97,SDPUtils.writeCandidate
-FN:138,SDPUtils.parseIceOptions
-FN:144,SDPUtils.parseRtpMap
-FN:162,SDPUtils.writeRtpMap
-FN:175,SDPUtils.parseExtmap
-FN:187,SDPUtils.writeExtmap
-FN:200,SDPUtils.parseFmtp
-FN:212,SDPUtils.writeFmtp
-FN:234,SDPUtils.parseRtcpFb
-FN:243,SDPUtils.writeRtcpFb
-FN:262,SDPUtils.parseSsrcMedia
-FN:279,SDPUtils.parseSsrcGroup
-FN:289,SDPUtils.getMid
-FN:297,SDPUtils.parseFingerprint
-FN:308,SDPUtils.getDtlsParameters
-FN:319,SDPUtils.writeDtlsParameters
-FN:329,SDPUtils.parseCryptoLine
-FN:339,SDPUtils.writeCryptoLine
-FN:351,SDPUtils.parseCryptoKeyParams
-FN:365,SDPUtils.writeCryptoKeyParams
-FN:375,SDPUtils.getCryptoParameters
-FN:384,SDPUtils.getIceParameters
-FN:399,SDPUtils.writeIceParameters
-FN:409,SDPUtils.parseRtpParameters
-FN:452,SDPUtils.writeRtpDescription
-FN:496,SDPUtils.parseRtpEncodingParameters
-FN:564,SDPUtils.parseRtcpParameters
-FN:591,SDPUtils.writeRtcpParameters
-FN:609,SDPUtils.parseMsid
-FN:628,SDPUtils.parseSctpDescription
-FN:664,SDPUtils.writeSctpDescription
-FN:689,SDPUtils.generateSessionId
-FN:698,SDPUtils.writeSessionBoilerplate
-FN:716,SDPUtils.getDirection
-FN:736,SDPUtils.getKind
-FN:742,SDPUtils.isRejected
-FN:746,SDPUtils.parseMLine
-FN:757,SDPUtils.parseOLine
-FN:771,SDPUtils.isValidSDP
-FNF:46
-FNH:46
-FNDA:1,SDPUtils.generateIdentifier
-FNDA:211,SDPUtils.splitLines
-FNDA:14,SDPUtils.splitSections
-FNDA:2,SDPUtils.getDescription
-FNDA:2,SDPUtils.getMediaSections
-FNDA:191,SDPUtils.matchPrefix
-FNDA:4,SDPUtils.parseCandidate
-FNDA:7,SDPUtils.writeCandidate
-FNDA:1,SDPUtils.parseIceOptions
-FNDA:50,SDPUtils.parseRtpMap
-FNDA:13,SDPUtils.writeRtpMap
-FNDA:18,SDPUtils.parseExtmap
-FNDA:13,SDPUtils.writeExtmap
-FNDA:24,SDPUtils.parseFmtp
-FNDA:14,SDPUtils.writeFmtp
-FNDA:84,SDPUtils.parseRtcpFb
-FNDA:12,SDPUtils.writeRtcpFb
-FNDA:42,SDPUtils.parseSsrcMedia
-FNDA:1,SDPUtils.parseSsrcGroup
-FNDA:2,SDPUtils.getMid
-FNDA:3,SDPUtils.parseFingerprint
-FNDA:1,SDPUtils.getDtlsParameters
-FNDA:1,SDPUtils.writeDtlsParameters
-FNDA:4,SDPUtils.parseCryptoLine
-FNDA:3,SDPUtils.writeCryptoLine
-FNDA:2,SDPUtils.parseCryptoKeyParams
-FNDA:5,SDPUtils.writeCryptoKeyParams
-FNDA:1,SDPUtils.getCryptoParameters
-FNDA:4,SDPUtils.getIceParameters
-FNDA:2,SDPUtils.writeIceParameters
-FNDA:6,SDPUtils.parseRtpParameters
-FNDA:10,SDPUtils.writeRtpDescription
-FNDA:5,SDPUtils.parseRtpEncodingParameters
-FNDA:1,SDPUtils.parseRtcpParameters
-FNDA:3,SDPUtils.writeRtcpParameters
-FNDA:3,SDPUtils.parseMsid
-FNDA:2,SDPUtils.parseSctpDescription
-FNDA:6,SDPUtils.writeSctpDescription
-FNDA:7,SDPUtils.generateSessionId
-FNDA:9,SDPUtils.writeSessionBoilerplate
-FNDA:7,SDPUtils.getDirection
-FNDA:1,SDPUtils.getKind
-FNDA:2,SDPUtils.isRejected
-FNDA:3,SDPUtils.parseMLine
-FNDA:1,SDPUtils.parseOLine
-FNDA:5,SDPUtils.isValidSDP
-DA:1,1
-DA:2,1
-DA:3,1
-DA:4,1
-DA:5,1
-DA:6,1
-DA:7,1
-DA:8,1
-DA:9,1
-DA:10,1
-DA:11,1
-DA:12,1
-DA:13,1
-DA:14,1
-DA:15,1
-DA:16,1
-DA:17,1
-DA:18,211
-DA:19,1
-DA:20,1
-DA:21,1
-DA:22,14
-DA:23,14
-DA:24,14
-DA:25,1
-DA:26,1
-DA:27,1
-DA:28,1
-DA:29,2
-DA:30,2
-DA:31,1
-DA:32,1
-DA:33,1
-DA:34,1
-DA:35,2
-DA:36,2
-DA:37,2
-DA:38,1
-DA:39,1
-DA:40,1
-DA:41,1
-DA:42,191
-DA:43,1
-DA:44,1
-DA:45,1
-DA:46,1
-DA:47,1
-DA:48,1
-DA:49,1
-DA:50,4
-DA:51,4
-DA:52,4
-DA:53,1
-DA:54,4
-DA:55,3
-DA:56,3
-DA:57,4
-DA:58,4
-DA:59,4
-DA:60,4
-DA:61,4
-DA:62,4
-DA:63,4
-DA:64,4
-DA:65,4
-DA:66,4
-DA:67,4
-DA:68,4
-DA:69,4
-DA:70,4
-DA:71,21
-DA:72,21
-DA:73,4
-DA:74,4
-DA:75,21
-DA:76,4
-DA:77,4
-DA:78,21
-DA:79,4
-DA:80,4
-DA:81,21
-DA:82,4
-DA:83,4
-DA:84,4
-DA:85,21
-DA:86,5
-DA:87,4
-DA:88,4
-DA:89,5
-DA:90,21
-DA:91,21
-DA:92,4
-DA:93,1
-DA:94,1
-DA:95,1
-DA:96,1
-DA:97,1
-DA:98,7
-DA:99,7
-DA:100,7
-DA:101,7
-DA:102,7
-DA:103,1
-DA:104,7
-DA:105,1
-DA:106,6
-DA:107,5
-DA:108,5
-DA:109,7
-DA:110,7
-DA:111,7
-DA:112,7
-DA:113,7
-DA:114,7
-DA:115,7
-DA:116,7
-DA:117,7
-DA:118,7
-DA:119,1
-DA:120,1
-DA:121,1
-DA:122,1
-DA:123,1
-DA:124,7
-DA:125,1
-DA:126,1
-DA:127,1
-DA:128,7
-DA:129,2
-DA:130,2
-DA:131,2
-DA:132,7
-DA:133,1
-DA:134,1
-DA:135,1
-DA:136,1
-DA:137,1
-DA:138,1
-DA:139,1
-DA:140,1
-DA:141,1
-DA:142,1
-DA:143,1
-DA:144,1
-DA:145,50
-DA:146,50
-DA:147,50
-DA:148,50
-DA:149,50
-DA:150,50
-DA:151,50
-DA:152,50
-DA:153,50
-DA:154,50
-DA:155,50
-DA:156,50
-DA:157,50
-DA:158,1
-DA:159,1
-DA:160,1
-DA:161,1
-DA:162,1
-DA:163,13
-DA:164,13
-DA:165,2
-DA:166,2
-DA:167,13
-DA:168,13
-DA:169,13
-DA:170,1
-DA:171,1
-DA:172,1
-DA:173,1
-DA:174,1
-DA:175,1
-DA:176,18
-DA:177,18
-DA:178,18
-DA:179,18
-DA:180,18
-DA:181,18
-DA:182,18
-DA:183,1
-DA:184,1
-DA:185,1
-DA:186,1
-DA:187,1
-DA:188,13
-DA:189,13
-DA:190,13
-DA:191,13
-DA:192,13
-DA:193,13
-DA:194,13
-DA:195,1
-DA:196,1
-DA:197,1
-DA:198,1
-DA:199,1
-DA:200,1
-DA:201,24
-DA:202,24
-DA:203,24
-DA:204,24
-DA:205,29
-DA:206,29
-DA:207,29
-DA:208,24
-DA:209,1
-DA:210,1
-DA:211,1
-DA:212,1
-DA:213,14
-DA:214,14
-DA:215,14
-DA:216,3
-DA:217,3
-DA:218,14
-DA:219,12
-DA:220,12
-DA:221,13
-DA:222,12
-DA:223,13
-DA:224,1
-DA:225,1
-DA:226,12
-DA:227,12
-DA:228,12
-DA:229,14
-DA:230,1
-DA:231,1
-DA:232,1
-DA:233,1
-DA:234,1
-DA:235,84
-DA:236,84
-DA:237,84
-DA:238,84
-DA:239,84
-DA:240,1
-DA:241,1
-DA:242,1
-DA:243,1
-DA:244,12
-DA:245,12
-DA:246,12
-DA:247,2
-DA:248,2
-DA:249,12
-DA:250,3
-DA:251,3
-DA:252,4
-DA:253,4
-DA:254,4
-DA:255,3
-DA:256,3
-DA:257,12
-DA:258,1
-DA:259,1
-DA:260,1
-DA:261,1
-DA:262,1
-DA:263,42
-DA:264,42
-DA:265,42
-DA:266,42
-DA:267,42
-DA:268,42
-DA:269,42
-DA:270,42
-DA:271,42
-DA:272,0
-DA:273,0
-DA:274,42
-DA:275,1
-DA:276,1
-DA:277,1
-DA:278,1
-DA:279,1
-DA:280,1
-DA:281,1
-DA:282,1
-DA:283,1
-DA:284,1
-DA:285,1
-DA:286,1
-DA:287,1
-DA:288,1
-DA:289,1
-DA:290,2
-DA:291,2
-DA:292,1
-DA:293,1
-DA:294,1
-DA:295,1
-DA:296,1
-DA:297,1
-DA:298,3
-DA:299,3
-DA:300,3
-DA:301,3
-DA:302,3
-DA:303,1
-DA:304,1
-DA:305,1
-DA:306,1
-DA:307,1
-DA:308,1
-DA:309,1
-DA:310,1
-DA:311,1
-DA:312,1
-DA:313,1
-DA:314,1
-DA:315,1
-DA:316,1
-DA:317,1
-DA:318,1
-DA:319,1
-DA:320,1
-DA:321,1
-DA:322,2
-DA:323,1
-DA:324,1
-DA:325,1
-DA:326,1
-DA:327,1
-DA:328,1
-DA:329,1
-DA:330,4
-DA:331,4
-DA:332,4
-DA:333,4
-DA:334,4
-DA:335,4
-DA:336,4
-DA:337,1
-DA:338,1
-DA:339,1
-DA:340,3
-DA:341,3
-DA:342,3
-DA:343,3
-DA:344,3
-DA:345,3
-DA:346,3
-DA:347,1
-DA:348,1
-DA:349,1
-DA:350,1
-DA:351,1
-DA:352,2
-DA:353,1
-DA:354,1
-DA:355,1
-DA:356,1
-DA:357,1
-DA:358,1
-DA:359,1
-DA:360,2
-DA:361,2
-DA:362,2
-DA:363,1
-DA:364,1
-DA:365,1
-DA:366,5
-DA:367,5
-DA:368,5
-DA:369,5
-DA:370,5
-DA:371,5
-DA:372,1
-DA:373,1
-DA:374,1
-DA:375,1
-DA:376,1
-DA:377,1
-DA:378,1
-DA:379,1
-DA:380,1
-DA:381,1
-DA:382,1
-DA:383,1
-DA:384,1
-DA:385,4
-DA:386,4
-DA:387,4
-DA:388,4
-DA:389,4
-DA:390,3
-DA:391,3
-DA:392,1
-DA:393,1
-DA:394,1
-DA:395,1
-DA:396,1
-DA:397,1
-DA:398,1
-DA:399,1
-DA:400,2
-DA:401,2
-DA:402,2
-DA:403,1
-DA:404,1
-DA:405,2
-DA:406,1
-DA:407,1
-DA:408,1
-DA:409,1
-DA:410,6
-DA:411,6
-DA:412,6
-DA:413,6
-DA:414,6
-DA:415,6
-DA:416,6
-DA:417,6
-DA:418,6
-DA:419,48
-DA:420,48
-DA:421,48
-DA:422,48
-DA:423,48
-DA:424,48
-DA:425,48
-DA:426,48
-DA:427,48
-DA:428,48
-DA:429,48
-DA:430,48
-DA:431,48
-DA:432,48
-DA:433,48
-DA:434,48
-DA:435,48
-DA:436,10
-DA:437,10
-DA:438,48
-DA:439,38
-DA:440,48
-DA:441,48
-DA:442,48
-DA:443,6
-DA:444,15
-DA:445,6
-DA:446,6
-DA:447,6
-DA:448,1
-DA:449,1
-DA:450,1
-DA:451,1
-DA:452,1
-DA:453,10
-DA:454,10
-DA:455,10
-DA:456,10
-DA:457,10
-DA:458,10
-DA:459,10
-DA:460,9
-DA:461,1
-DA:462,1
-DA:463,8
-DA:464,10
-DA:465,10
-DA:466,10
-DA:467,10
-DA:468,10
-DA:469,10
-DA:470,10
-DA:471,9
-DA:472,9
-DA:473,9
-DA:474,10
-DA:475,10
-DA:476,10
-DA:477,9
-DA:478,0
-DA:479,0
-DA:480,10
-DA:481,10
-DA:482,0
-DA:483,0
-DA:484,10
-DA:485,10
-DA:486,9
-DA:487,8
-DA:488,9
-DA:489,9
-DA:490,10
-DA:491,10
-DA:492,1
-DA:493,1
-DA:494,1
-DA:495,1
-DA:496,1
-DA:497,5
-DA:498,5
-DA:499,5
-DA:500,5
-DA:501,5
-DA:502,5
-DA:503,5
-DA:504,5
-DA:505,5
-DA:506,5
-DA:507,5
-DA:508,5
-DA:509,5
-DA:510,5
-DA:511,4
-DA:512,4
-DA:513,5
-DA:514,5
-DA:515,4
-DA:516,4
-DA:517,5
-DA:518,5
-DA:519,39
-DA:520,16
-DA:521,16
-DA:522,16
-DA:523,16
-DA:524,16
-DA:525,16
-DA:526,16
-DA:527,16
-DA:528,16
-DA:529,16
-DA:530,16
-DA:531,16
-DA:532,16
-DA:533,16
-DA:534,16
-DA:535,16
-DA:536,16
-DA:537,5
-DA:538,5
-DA:539,1
-DA:540,1
-DA:541,1
-DA:542,1
-DA:543,5
-DA:544,5
-DA:545,5
-DA:546,5
-DA:547,3
-DA:548,1
-DA:549,3
-DA:550,1
-DA:551,1
-DA:552,1
-DA:553,1
-DA:554,1
-DA:555,1
-DA:556,3
-DA:557,24
-DA:558,3
-DA:559,3
-DA:560,5
-DA:561,1
-DA:562,1
-DA:563,1
-DA:564,1
-DA:565,1
-DA:566,1
-DA:567,1
-DA:568,1
-DA:569,1
-DA:570,1
-DA:571,1
-DA:572,1
-DA:573,1
-DA:574,1
-DA:575,1
-DA:576,1
-DA:577,1
-DA:578,1
-DA:579,1
-DA:580,1
-DA:581,1
-DA:582,1
-DA:583,1
-DA:584,1
-DA:585,1
-DA:586,1
-DA:587,1
-DA:588,1
-DA:589,1
-DA:590,1
-DA:591,1
-DA:592,3
-DA:593,3
-DA:594,1
-DA:595,1
-DA:596,3
-DA:597,1
-DA:598,1
-DA:599,3
-DA:600,1
-DA:601,1
-DA:602,1
-DA:603,3
-DA:604,1
-DA:605,1
-DA:606,1
-DA:607,1
-DA:608,1
-DA:609,1
-DA:610,3
-DA:611,3
-DA:612,3
-DA:613,1
-DA:614,1
-DA:615,1
-DA:616,2
-DA:617,2
-DA:618,2
-DA:619,3
-DA:620,1
-DA:621,1
-DA:622,1
-DA:623,1
-DA:624,1
-DA:625,1
-DA:626,1
-DA:627,1
-DA:628,1
-DA:629,2
-DA:630,2
-DA:631,2
-DA:632,2
-DA:633,1
-DA:634,1
-DA:635,2
-DA:636,1
-DA:637,1
-DA:638,2
-DA:639,2
-DA:640,1
-DA:641,1
-DA:642,1
-DA:643,1
-DA:644,1
-DA:645,1
-DA:646,1
-DA:647,1
-DA:648,1
-DA:649,1
-DA:650,1
-DA:651,1
-DA:652,1
-DA:653,1
-DA:654,1
-DA:655,1
-DA:656,1
-DA:657,1
-DA:658,1
-DA:659,1
-DA:660,1
-DA:661,1
-DA:662,1
-DA:663,1
-DA:664,1
-DA:665,6
-DA:666,6
-DA:667,3
-DA:668,3
-DA:669,3
-DA:670,3
-DA:671,3
-DA:672,3
-DA:673,3
-DA:674,3
-DA:675,3
-DA:676,3
-DA:677,3
-DA:678,3
-DA:679,6
-DA:680,6
-DA:681,6
-DA:682,6
-DA:683,1
-DA:684,1
-DA:685,1
-DA:686,1
-DA:687,1
-DA:688,1
-DA:689,1
-DA:690,7
-DA:691,1
-DA:692,1
-DA:693,1
-DA:694,1
-DA:695,1
-DA:696,1
-DA:697,1
-DA:698,1
-DA:699,9
-DA:700,9
-DA:701,9
-DA:702,2
-DA:703,9
-DA:704,7
-DA:705,7
-DA:706,9
-DA:707,9
-DA:708,9
-DA:709,9
-DA:710,9
-DA:711,9
-DA:712,9
-DA:713,1
-DA:714,1
-DA:715,1
-DA:716,1
-DA:717,7
-DA:718,7
-DA:719,7
-DA:720,15
-DA:721,15
-DA:722,15
-DA:723,15
-DA:724,15
-DA:725,5
-DA:726,15
-DA:727,15
-DA:728,15
-DA:729,15
-DA:730,7
-DA:731,1
-DA:732,1
-DA:733,1
-DA:734,1
-DA:735,1
-DA:736,1
-DA:737,1
-DA:738,1
-DA:739,1
-DA:740,1
-DA:741,1
-DA:742,1
-DA:743,2
-DA:744,1
-DA:745,1
-DA:746,1
-DA:747,3
-DA:748,3
-DA:749,3
-DA:750,3
-DA:751,3
-DA:752,3
-DA:753,3
-DA:754,3
-DA:755,1
-DA:756,1
-DA:757,1
-DA:758,1
-DA:759,1
-DA:760,1
-DA:761,1
-DA:762,1
-DA:763,1
-DA:764,1
-DA:765,1
-DA:766,1
-DA:767,1
-DA:768,1
-DA:769,1
-DA:770,1
-DA:771,1
-DA:772,5
-DA:773,2
-DA:774,2
-DA:775,3
-DA:776,5
-DA:777,60
-DA:778,2
-DA:779,2
-DA:780,60
-DA:781,60
-DA:782,1
-DA:783,1
-DA:784,1
-DA:785,1
-DA:786,1
-DA:787,1
-DA:788,1
-LF:788
-LH:782
-BRDA:1,0,0,1
-BRDA:9,1,0,1
-BRDA:17,2,0,211
-BRDA:18,3,0,8859
-BRDA:21,4,0,14
-BRDA:23,5,0,28
-BRDA:23,6,0,14
-BRDA:24,7,0,14
-BRDA:28,8,0,2
-BRDA:34,9,0,2
-BRDA:41,10,0,191
-BRDA:42,11,0,8491
-BRDA:49,12,0,4
-BRDA:52,13,0,1
-BRDA:54,14,0,3
-BRDA:60,15,0,1
-BRDA:70,16,0,21
-BRDA:72,17,0,4
-BRDA:75,18,0,4
-BRDA:78,19,0,4
-BRDA:81,20,0,4
-BRDA:85,21,0,5
-BRDA:86,22,0,4
-BRDA:97,23,0,7
-BRDA:102,24,0,1
-BRDA:104,25,0,6
-BRDA:104,26,0,1
-BRDA:106,27,0,5
-BRDA:117,28,0,1
-BRDA:117,29,0,1
-BRDA:118,30,0,1
-BRDA:124,31,0,2
-BRDA:124,32,0,1
-BRDA:128,33,0,6
-BRDA:128,34,0,2
-BRDA:130,35,0,1
-BRDA:138,36,0,1
-BRDA:144,37,0,50
-BRDA:154,38,0,1
-BRDA:154,39,0,49
-BRDA:162,40,0,13
-BRDA:164,41,0,2
-BRDA:167,42,0,12
-BRDA:167,43,0,1
-BRDA:169,44,0,11
-BRDA:169,45,0,2
-BRDA:175,46,0,18
-BRDA:179,47,0,1
-BRDA:179,48,0,17
-BRDA:187,49,0,13
-BRDA:188,50,0,1
-BRDA:189,51,0,2
-BRDA:190,52,0,1
-BRDA:191,53,0,12
-BRDA:193,54,0,1
-BRDA:193,55,0,12
-BRDA:200,56,0,24
-BRDA:204,57,0,29
-BRDA:212,58,0,14
-BRDA:215,59,0,3
-BRDA:218,60,0,13
-BRDA:218,61,0,12
-BRDA:220,62,0,13
-BRDA:221,63,0,12
-BRDA:223,64,0,1
-BRDA:234,65,0,84
-BRDA:243,66,0,12
-BRDA:246,67,0,2
-BRDA:249,68,0,4
-BRDA:249,69,0,3
-BRDA:251,70,0,4
-BRDA:253,71,0,1
-BRDA:253,72,0,1
-BRDA:253,73,0,3
-BRDA:262,74,0,42
-BRDA:271,75,0,0
-BRDA:279,76,0,1
-BRDA:283,77,0,2
-BRDA:289,78,0,2
-BRDA:291,79,0,1
-BRDA:297,80,0,3
-BRDA:308,81,0,1
-BRDA:319,82,0,1
-BRDA:321,83,0,2
-BRDA:329,84,0,4
-BRDA:339,85,0,3
-BRDA:343,86,0,1
-BRDA:344,87,0,2
-BRDA:345,88,0,1
-BRDA:345,89,0,2
-BRDA:351,90,0,2
-BRDA:352,91,0,1
-BRDA:360,92,0,0
-BRDA:361,93,0,1
-BRDA:361,94,0,0
-BRDA:365,95,0,5
-BRDA:368,96,0,2
-BRDA:368,97,0,3
-BRDA:369,98,0,2
-BRDA:370,99,0,2
-BRDA:371,100,0,3
-BRDA:375,101,0,1
-BRDA:384,102,0,4
-BRDA:389,103,0,2
-BRDA:389,104,0,3
-BRDA:392,105,0,1
-BRDA:399,106,0,2
-BRDA:402,107,0,1
-BRDA:409,108,0,6
-BRDA:418,109,0,48
-BRDA:427,110,0,23
-BRDA:427,111,0,25
-BRDA:434,112,0,5
-BRDA:435,113,0,10
-BRDA:438,114,0,38
-BRDA:443,115,0,15
-BRDA:452,116,0,10
-BRDA:457,117,0,9
-BRDA:457,118,0,1
-BRDA:481,119,0,0
-BRDA:485,120,0,9
-BRDA:459,121,0,9
-BRDA:460,122,0,1
-BRDA:463,123,0,8
-BRDA:470,124,0,9
-BRDA:476,125,0,9
-BRDA:477,126,0,0
-BRDA:486,127,0,8
-BRDA:496,128,0,5
-BRDA:514,129,0,4
-BRDA:514,130,0,4
-BRDA:514,131,0,4
-BRDA:538,132,0,1
-BRDA:538,133,0,1
-BRDA:546,134,0,3
-BRDA:547,135,0,1
-BRDA:549,136,0,2
-BRDA:549,137,0,1
-BRDA:504,138,0,33
-BRDA:505,139,0,33
-BRDA:510,140,0,4
-BRDA:512,141,0,8
-BRDA:518,142,0,39
-BRDA:519,143,0,16
-BRDA:519,144,0,16
-BRDA:532,145,0,0
-BRDA:556,146,0,24
-BRDA:564,147,0,1
-BRDA:570,148,0,8
-BRDA:571,149,0,8
-BRDA:591,150,0,3
-BRDA:593,151,0,1
-BRDA:596,152,0,1
-BRDA:599,153,0,1
-BRDA:599,154,0,1
-BRDA:609,155,0,3
-BRDA:612,156,0,1
-BRDA:616,157,0,2
-BRDA:619,158,0,1
-BRDA:617,159,0,1
-BRDA:618,160,0,1
-BRDA:628,161,0,2
-BRDA:632,162,0,1
-BRDA:635,163,0,1
-BRDA:639,164,0,1
-BRDA:664,165,0,6
-BRDA:666,166,0,3
-BRDA:689,167,0,7
-BRDA:698,168,0,9
-BRDA:700,169,0,2
-BRDA:700,170,0,7
-BRDA:701,171,0,2
-BRDA:703,172,0,7
-BRDA:716,173,0,7
-BRDA:719,174,0,15
-BRDA:721,175,0,1
-BRDA:722,176,0,3
-BRDA:723,177,0,4
-BRDA:724,178,0,5
-BRDA:726,179,0,10
-BRDA:730,180,0,2
-BRDA:730,181,0,1
-BRDA:736,182,0,1
-BRDA:742,183,0,2
-BRDA:746,184,0,3
-BRDA:757,185,0,1
-BRDA:771,186,0,5
-BRDA:772,187,0,4
-BRDA:772,188,0,2
-BRDA:775,189,0,3
-BRDA:776,190,0,60
-BRDA:777,191,0,59
-BRDA:777,192,0,2
-BRDA:782,193,0,1
-BRF:194
-BRH:188
-end_of_record

+ 0 - 773
node_modules/sdp/dist/sdp.js

@@ -1,773 +0,0 @@
-/* eslint-env node */
-'use strict';
-
-// SDP helpers.
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var SDPUtils = {};
-
-// Generate an alphanumeric identifier for cname or mids.
-// TODO: use UUIDs instead? https://gist.github.com/jed/982883
-SDPUtils.generateIdentifier = function () {
-  return Math.random().toString(36).substring(2, 12);
-};
-
-// The RTCP CNAME used by all peerconnections from the same JS.
-SDPUtils.localCName = SDPUtils.generateIdentifier();
-
-// Splits SDP into lines, dealing with both CRLF and LF.
-SDPUtils.splitLines = function (blob) {
-  return blob.trim().split('\n').map(function (line) {
-    return line.trim();
-  });
-};
-// Splits SDP into sessionpart and mediasections. Ensures CRLF.
-SDPUtils.splitSections = function (blob) {
-  var parts = blob.split('\nm=');
-  return parts.map(function (part, index) {
-    return (index > 0 ? 'm=' + part : part).trim() + '\r\n';
-  });
-};
-
-// Returns the session description.
-SDPUtils.getDescription = function (blob) {
-  var sections = SDPUtils.splitSections(blob);
-  return sections && sections[0];
-};
-
-// Returns the individual media sections.
-SDPUtils.getMediaSections = function (blob) {
-  var sections = SDPUtils.splitSections(blob);
-  sections.shift();
-  return sections;
-};
-
-// Returns lines that start with a certain prefix.
-SDPUtils.matchPrefix = function (blob, prefix) {
-  return SDPUtils.splitLines(blob).filter(function (line) {
-    return line.indexOf(prefix) === 0;
-  });
-};
-
-// Parses an ICE candidate line. Sample input:
-// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8
-// rport 55996"
-// Input can be prefixed with a=.
-SDPUtils.parseCandidate = function (line) {
-  var parts = void 0;
-  // Parse both variants.
-  if (line.indexOf('a=candidate:') === 0) {
-    parts = line.substring(12).split(' ');
-  } else {
-    parts = line.substring(10).split(' ');
-  }
-
-  var candidate = {
-    foundation: parts[0],
-    component: { 1: 'rtp', 2: 'rtcp' }[parts[1]] || parts[1],
-    protocol: parts[2].toLowerCase(),
-    priority: parseInt(parts[3], 10),
-    ip: parts[4],
-    address: parts[4], // address is an alias for ip.
-    port: parseInt(parts[5], 10),
-    // skip parts[6] == 'typ'
-    type: parts[7]
-  };
-
-  for (var i = 8; i < parts.length; i += 2) {
-    switch (parts[i]) {
-      case 'raddr':
-        candidate.relatedAddress = parts[i + 1];
-        break;
-      case 'rport':
-        candidate.relatedPort = parseInt(parts[i + 1], 10);
-        break;
-      case 'tcptype':
-        candidate.tcpType = parts[i + 1];
-        break;
-      case 'ufrag':
-        candidate.ufrag = parts[i + 1]; // for backward compatibility.
-        candidate.usernameFragment = parts[i + 1];
-        break;
-      default:
-        // extension handling, in particular ufrag. Don't overwrite.
-        if (candidate[parts[i]] === undefined) {
-          candidate[parts[i]] = parts[i + 1];
-        }
-        break;
-    }
-  }
-  return candidate;
-};
-
-// Translates a candidate object into SDP candidate attribute.
-// This does not include the a= prefix!
-SDPUtils.writeCandidate = function (candidate) {
-  var sdp = [];
-  sdp.push(candidate.foundation);
-
-  var component = candidate.component;
-  if (component === 'rtp') {
-    sdp.push(1);
-  } else if (component === 'rtcp') {
-    sdp.push(2);
-  } else {
-    sdp.push(component);
-  }
-  sdp.push(candidate.protocol.toUpperCase());
-  sdp.push(candidate.priority);
-  sdp.push(candidate.address || candidate.ip);
-  sdp.push(candidate.port);
-
-  var type = candidate.type;
-  sdp.push('typ');
-  sdp.push(type);
-  if (type !== 'host' && candidate.relatedAddress && candidate.relatedPort) {
-    sdp.push('raddr');
-    sdp.push(candidate.relatedAddress);
-    sdp.push('rport');
-    sdp.push(candidate.relatedPort);
-  }
-  if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {
-    sdp.push('tcptype');
-    sdp.push(candidate.tcpType);
-  }
-  if (candidate.usernameFragment || candidate.ufrag) {
-    sdp.push('ufrag');
-    sdp.push(candidate.usernameFragment || candidate.ufrag);
-  }
-  return 'candidate:' + sdp.join(' ');
-};
-
-// Parses an ice-options line, returns an array of option tags.
-// Sample input:
-// a=ice-options:foo bar
-SDPUtils.parseIceOptions = function (line) {
-  return line.substring(14).split(' ');
-};
-
-// Parses a rtpmap line, returns RTCRtpCoddecParameters. Sample input:
-// a=rtpmap:111 opus/48000/2
-SDPUtils.parseRtpMap = function (line) {
-  var parts = line.substring(9).split(' ');
-  var parsed = {
-    payloadType: parseInt(parts.shift(), 10) // was: id
-  };
-
-  parts = parts[0].split('/');
-
-  parsed.name = parts[0];
-  parsed.clockRate = parseInt(parts[1], 10); // was: clockrate
-  parsed.channels = parts.length === 3 ? parseInt(parts[2], 10) : 1;
-  // legacy alias, got renamed back to channels in ORTC.
-  parsed.numChannels = parsed.channels;
-  return parsed;
-};
-
-// Generates a rtpmap line from RTCRtpCodecCapability or
-// RTCRtpCodecParameters.
-SDPUtils.writeRtpMap = function (codec) {
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  var channels = codec.channels || codec.numChannels || 1;
-  return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate + (channels !== 1 ? '/' + channels : '') + '\r\n';
-};
-
-// Parses a extmap line (headerextension from RFC 5285). Sample input:
-// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
-// a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset
-SDPUtils.parseExtmap = function (line) {
-  var parts = line.substring(9).split(' ');
-  return {
-    id: parseInt(parts[0], 10),
-    direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv',
-    uri: parts[1],
-    attributes: parts.slice(2).join(' ')
-  };
-};
-
-// Generates an extmap line from RTCRtpHeaderExtensionParameters or
-// RTCRtpHeaderExtension.
-SDPUtils.writeExtmap = function (headerExtension) {
-  return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) + (headerExtension.direction && headerExtension.direction !== 'sendrecv' ? '/' + headerExtension.direction : '') + ' ' + headerExtension.uri + (headerExtension.attributes ? ' ' + headerExtension.attributes : '') + '\r\n';
-};
-
-// Parses a fmtp line, returns dictionary. Sample input:
-// a=fmtp:96 vbr=on;cng=on
-// Also deals with vbr=on; cng=on
-SDPUtils.parseFmtp = function (line) {
-  var parsed = {};
-  var kv = void 0;
-  var parts = line.substring(line.indexOf(' ') + 1).split(';');
-  for (var j = 0; j < parts.length; j++) {
-    kv = parts[j].trim().split('=');
-    parsed[kv[0].trim()] = kv[1];
-  }
-  return parsed;
-};
-
-// Generates a fmtp line from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeFmtp = function (codec) {
-  var line = '';
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.parameters && Object.keys(codec.parameters).length) {
-    var params = [];
-    Object.keys(codec.parameters).forEach(function (param) {
-      if (codec.parameters[param] !== undefined) {
-        params.push(param + '=' + codec.parameters[param]);
-      } else {
-        params.push(param);
-      }
-    });
-    line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n';
-  }
-  return line;
-};
-
-// Parses a rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:
-// a=rtcp-fb:98 nack rpsi
-SDPUtils.parseRtcpFb = function (line) {
-  var parts = line.substring(line.indexOf(' ') + 1).split(' ');
-  return {
-    type: parts.shift(),
-    parameter: parts.join(' ')
-  };
-};
-
-// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeRtcpFb = function (codec) {
-  var lines = '';
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.rtcpFeedback && codec.rtcpFeedback.length) {
-    // FIXME: special handling for trr-int?
-    codec.rtcpFeedback.forEach(function (fb) {
-      lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') + '\r\n';
-    });
-  }
-  return lines;
-};
-
-// Parses a RFC 5576 ssrc media attribute. Sample input:
-// a=ssrc:3735928559 cname:something
-SDPUtils.parseSsrcMedia = function (line) {
-  var sp = line.indexOf(' ');
-  var parts = {
-    ssrc: parseInt(line.substring(7, sp), 10)
-  };
-  var colon = line.indexOf(':', sp);
-  if (colon > -1) {
-    parts.attribute = line.substring(sp + 1, colon);
-    parts.value = line.substring(colon + 1);
-  } else {
-    parts.attribute = line.substring(sp + 1);
-  }
-  return parts;
-};
-
-// Parse a ssrc-group line (see RFC 5576). Sample input:
-// a=ssrc-group:semantics 12 34
-SDPUtils.parseSsrcGroup = function (line) {
-  var parts = line.substring(13).split(' ');
-  return {
-    semantics: parts.shift(),
-    ssrcs: parts.map(function (ssrc) {
-      return parseInt(ssrc, 10);
-    })
-  };
-};
-
-// Extracts the MID (RFC 5888) from a media section.
-// Returns the MID or undefined if no mid line was found.
-SDPUtils.getMid = function (mediaSection) {
-  var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];
-  if (mid) {
-    return mid.substring(6);
-  }
-};
-
-// Parses a fingerprint line for DTLS-SRTP.
-SDPUtils.parseFingerprint = function (line) {
-  var parts = line.substring(14).split(' ');
-  return {
-    algorithm: parts[0].toLowerCase(), // algorithm is case-sensitive in Edge.
-    value: parts[1].toUpperCase() // the definition is upper-case in RFC 4572.
-  };
-};
-
-// Extracts DTLS parameters from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the fingerprint line as input. See also getIceParameters.
-SDPUtils.getDtlsParameters = function (mediaSection, sessionpart) {
-  var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=fingerprint:');
-  // Note: a=setup line is ignored since we use the 'auto' role in Edge.
-  return {
-    role: 'auto',
-    fingerprints: lines.map(SDPUtils.parseFingerprint)
-  };
-};
-
-// Serializes DTLS parameters to SDP.
-SDPUtils.writeDtlsParameters = function (params, setupType) {
-  var sdp = 'a=setup:' + setupType + '\r\n';
-  params.fingerprints.forEach(function (fp) {
-    sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n';
-  });
-  return sdp;
-};
-
-// Parses a=crypto lines into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#dictionary-rtcsrtpsdesparameters-members
-SDPUtils.parseCryptoLine = function (line) {
-  var parts = line.substring(9).split(' ');
-  return {
-    tag: parseInt(parts[0], 10),
-    cryptoSuite: parts[1],
-    keyParams: parts[2],
-    sessionParams: parts.slice(3)
-  };
-};
-
-SDPUtils.writeCryptoLine = function (parameters) {
-  return 'a=crypto:' + parameters.tag + ' ' + parameters.cryptoSuite + ' ' + (_typeof(parameters.keyParams) === 'object' ? SDPUtils.writeCryptoKeyParams(parameters.keyParams) : parameters.keyParams) + (parameters.sessionParams ? ' ' + parameters.sessionParams.join(' ') : '') + '\r\n';
-};
-
-// Parses the crypto key parameters into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#rtcsrtpkeyparam*
-SDPUtils.parseCryptoKeyParams = function (keyParams) {
-  if (keyParams.indexOf('inline:') !== 0) {
-    return null;
-  }
-  var parts = keyParams.substring(7).split('|');
-  return {
-    keyMethod: 'inline',
-    keySalt: parts[0],
-    lifeTime: parts[1],
-    mkiValue: parts[2] ? parts[2].split(':')[0] : undefined,
-    mkiLength: parts[2] ? parts[2].split(':')[1] : undefined
-  };
-};
-
-SDPUtils.writeCryptoKeyParams = function (keyParams) {
-  return keyParams.keyMethod + ':' + keyParams.keySalt + (keyParams.lifeTime ? '|' + keyParams.lifeTime : '') + (keyParams.mkiValue && keyParams.mkiLength ? '|' + keyParams.mkiValue + ':' + keyParams.mkiLength : '');
-};
-
-// Extracts all SDES parameters.
-SDPUtils.getCryptoParameters = function (mediaSection, sessionpart) {
-  var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=crypto:');
-  return lines.map(SDPUtils.parseCryptoLine);
-};
-
-// Parses ICE information from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the ice-ufrag and ice-pwd lines as input.
-SDPUtils.getIceParameters = function (mediaSection, sessionpart) {
-  var ufrag = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-ufrag:')[0];
-  var pwd = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-pwd:')[0];
-  if (!(ufrag && pwd)) {
-    return null;
-  }
-  return {
-    usernameFragment: ufrag.substring(12),
-    password: pwd.substring(10)
-  };
-};
-
-// Serializes ICE parameters to SDP.
-SDPUtils.writeIceParameters = function (params) {
-  var sdp = 'a=ice-ufrag:' + params.usernameFragment + '\r\n' + 'a=ice-pwd:' + params.password + '\r\n';
-  if (params.iceLite) {
-    sdp += 'a=ice-lite\r\n';
-  }
-  return sdp;
-};
-
-// Parses the SDP media section and returns RTCRtpParameters.
-SDPUtils.parseRtpParameters = function (mediaSection) {
-  var description = {
-    codecs: [],
-    headerExtensions: [],
-    fecMechanisms: [],
-    rtcp: []
-  };
-  var lines = SDPUtils.splitLines(mediaSection);
-  var mline = lines[0].split(' ');
-  description.profile = mline[2];
-  for (var i = 3; i < mline.length; i++) {
-    // find all codecs from mline[3..]
-    var pt = mline[i];
-    var rtpmapline = SDPUtils.matchPrefix(mediaSection, 'a=rtpmap:' + pt + ' ')[0];
-    if (rtpmapline) {
-      var codec = SDPUtils.parseRtpMap(rtpmapline);
-      var fmtps = SDPUtils.matchPrefix(mediaSection, 'a=fmtp:' + pt + ' ');
-      // Only the first a=fmtp:<pt> is considered.
-      codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};
-      codec.rtcpFeedback = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:' + pt + ' ').map(SDPUtils.parseRtcpFb);
-      description.codecs.push(codec);
-      // parse FEC mechanisms from rtpmap lines.
-      switch (codec.name.toUpperCase()) {
-        case 'RED':
-        case 'ULPFEC':
-          description.fecMechanisms.push(codec.name.toUpperCase());
-          break;
-        default:
-          // only RED and ULPFEC are recognized as FEC mechanisms.
-          break;
-      }
-    }
-  }
-  SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function (line) {
-    description.headerExtensions.push(SDPUtils.parseExtmap(line));
-  });
-  var wildcardRtcpFb = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:* ').map(SDPUtils.parseRtcpFb);
-  description.codecs.forEach(function (codec) {
-    wildcardRtcpFb.forEach(function (fb) {
-      var duplicate = codec.rtcpFeedback.find(function (existingFeedback) {
-        return existingFeedback.type === fb.type && existingFeedback.parameter === fb.parameter;
-      });
-      if (!duplicate) {
-        codec.rtcpFeedback.push(fb);
-      }
-    });
-  });
-  // FIXME: parse rtcp.
-  return description;
-};
-
-// Generates parts of the SDP media section describing the capabilities /
-// parameters.
-SDPUtils.writeRtpDescription = function (kind, caps) {
-  var sdp = '';
-
-  // Build the mline.
-  sdp += 'm=' + kind + ' ';
-  sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.
-  sdp += ' ' + (caps.profile || 'UDP/TLS/RTP/SAVPF') + ' ';
-  sdp += caps.codecs.map(function (codec) {
-    if (codec.preferredPayloadType !== undefined) {
-      return codec.preferredPayloadType;
-    }
-    return codec.payloadType;
-  }).join(' ') + '\r\n';
-
-  sdp += 'c=IN IP4 0.0.0.0\r\n';
-  sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n';
-
-  // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.
-  caps.codecs.forEach(function (codec) {
-    sdp += SDPUtils.writeRtpMap(codec);
-    sdp += SDPUtils.writeFmtp(codec);
-    sdp += SDPUtils.writeRtcpFb(codec);
-  });
-  var maxptime = 0;
-  caps.codecs.forEach(function (codec) {
-    if (codec.maxptime > maxptime) {
-      maxptime = codec.maxptime;
-    }
-  });
-  if (maxptime > 0) {
-    sdp += 'a=maxptime:' + maxptime + '\r\n';
-  }
-
-  if (caps.headerExtensions) {
-    caps.headerExtensions.forEach(function (extension) {
-      sdp += SDPUtils.writeExtmap(extension);
-    });
-  }
-  // FIXME: write fecMechanisms.
-  return sdp;
-};
-
-// Parses the SDP media section and returns an array of
-// RTCRtpEncodingParameters.
-SDPUtils.parseRtpEncodingParameters = function (mediaSection) {
-  var encodingParameters = [];
-  var description = SDPUtils.parseRtpParameters(mediaSection);
-  var hasRed = description.fecMechanisms.indexOf('RED') !== -1;
-  var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1;
-
-  // filter a=ssrc:... cname:, ignore PlanB-msid
-  var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (parts) {
-    return parts.attribute === 'cname';
-  });
-  var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc;
-  var secondarySsrc = void 0;
-
-  var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID').map(function (line) {
-    var parts = line.substring(17).split(' ');
-    return parts.map(function (part) {
-      return parseInt(part, 10);
-    });
-  });
-  if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) {
-    secondarySsrc = flows[0][1];
-  }
-
-  description.codecs.forEach(function (codec) {
-    if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) {
-      var encParam = {
-        ssrc: primarySsrc,
-        codecPayloadType: parseInt(codec.parameters.apt, 10)
-      };
-      if (primarySsrc && secondarySsrc) {
-        encParam.rtx = { ssrc: secondarySsrc };
-      }
-      encodingParameters.push(encParam);
-      if (hasRed) {
-        encParam = JSON.parse(JSON.stringify(encParam));
-        encParam.fec = {
-          ssrc: primarySsrc,
-          mechanism: hasUlpfec ? 'red+ulpfec' : 'red'
-        };
-        encodingParameters.push(encParam);
-      }
-    }
-  });
-  if (encodingParameters.length === 0 && primarySsrc) {
-    encodingParameters.push({
-      ssrc: primarySsrc
-    });
-  }
-
-  // we support both b=AS and b=TIAS but interpret AS as TIAS.
-  var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b=');
-  if (bandwidth.length) {
-    if (bandwidth[0].indexOf('b=TIAS:') === 0) {
-      bandwidth = parseInt(bandwidth[0].substring(7), 10);
-    } else if (bandwidth[0].indexOf('b=AS:') === 0) {
-      // use formula from JSEP to convert b=AS to TIAS value.
-      bandwidth = parseInt(bandwidth[0].substring(5), 10) * 1000 * 0.95 - 50 * 40 * 8;
-    } else {
-      bandwidth = undefined;
-    }
-    encodingParameters.forEach(function (params) {
-      params.maxBitrate = bandwidth;
-    });
-  }
-  return encodingParameters;
-};
-
-// parses http://draft.ortc.org/#rtcrtcpparameters*
-SDPUtils.parseRtcpParameters = function (mediaSection) {
-  var rtcpParameters = {};
-
-  // Gets the first SSRC. Note that with RTX there might be multiple
-  // SSRCs.
-  var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (obj) {
-    return obj.attribute === 'cname';
-  })[0];
-  if (remoteSsrc) {
-    rtcpParameters.cname = remoteSsrc.value;
-    rtcpParameters.ssrc = remoteSsrc.ssrc;
-  }
-
-  // Edge uses the compound attribute instead of reducedSize
-  // compound is !reducedSize
-  var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize');
-  rtcpParameters.reducedSize = rsize.length > 0;
-  rtcpParameters.compound = rsize.length === 0;
-
-  // parses the rtcp-mux attrіbute.
-  // Note that Edge does not support unmuxed RTCP.
-  var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux');
-  rtcpParameters.mux = mux.length > 0;
-
-  return rtcpParameters;
-};
-
-SDPUtils.writeRtcpParameters = function (rtcpParameters) {
-  var sdp = '';
-  if (rtcpParameters.reducedSize) {
-    sdp += 'a=rtcp-rsize\r\n';
-  }
-  if (rtcpParameters.mux) {
-    sdp += 'a=rtcp-mux\r\n';
-  }
-  if (rtcpParameters.ssrc !== undefined && rtcpParameters.cname) {
-    sdp += 'a=ssrc:' + rtcpParameters.ssrc + ' cname:' + rtcpParameters.cname + '\r\n';
-  }
-  return sdp;
-};
-
-// parses either a=msid: or a=ssrc:... msid lines and returns
-// the id of the MediaStream and MediaStreamTrack.
-SDPUtils.parseMsid = function (mediaSection) {
-  var parts = void 0;
-  var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:');
-  if (spec.length === 1) {
-    parts = spec[0].substring(7).split(' ');
-    return { stream: parts[0], track: parts[1] };
-  }
-  var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (msidParts) {
-    return msidParts.attribute === 'msid';
-  });
-  if (planB.length > 0) {
-    parts = planB[0].value.split(' ');
-    return { stream: parts[0], track: parts[1] };
-  }
-};
-
-// SCTP
-// parses draft-ietf-mmusic-sctp-sdp-26 first and falls back
-// to draft-ietf-mmusic-sctp-sdp-05
-SDPUtils.parseSctpDescription = function (mediaSection) {
-  var mline = SDPUtils.parseMLine(mediaSection);
-  var maxSizeLine = SDPUtils.matchPrefix(mediaSection, 'a=max-message-size:');
-  var maxMessageSize = void 0;
-  if (maxSizeLine.length > 0) {
-    maxMessageSize = parseInt(maxSizeLine[0].substring(19), 10);
-  }
-  if (isNaN(maxMessageSize)) {
-    maxMessageSize = 65536;
-  }
-  var sctpPort = SDPUtils.matchPrefix(mediaSection, 'a=sctp-port:');
-  if (sctpPort.length > 0) {
-    return {
-      port: parseInt(sctpPort[0].substring(12), 10),
-      protocol: mline.fmt,
-      maxMessageSize: maxMessageSize
-    };
-  }
-  var sctpMapLines = SDPUtils.matchPrefix(mediaSection, 'a=sctpmap:');
-  if (sctpMapLines.length > 0) {
-    var parts = sctpMapLines[0].substring(10).split(' ');
-    return {
-      port: parseInt(parts[0], 10),
-      protocol: parts[1],
-      maxMessageSize: maxMessageSize
-    };
-  }
-};
-
-// SCTP
-// outputs the draft-ietf-mmusic-sctp-sdp-26 version that all browsers
-// support by now receiving in this format, unless we originally parsed
-// as the draft-ietf-mmusic-sctp-sdp-05 format (indicated by the m-line
-// protocol of DTLS/SCTP -- without UDP/ or TCP/)
-SDPUtils.writeSctpDescription = function (media, sctp) {
-  var output = [];
-  if (media.protocol !== 'DTLS/SCTP') {
-    output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.protocol + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctp-port:' + sctp.port + '\r\n'];
-  } else {
-    output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.port + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctpmap:' + sctp.port + ' ' + sctp.protocol + ' 65535\r\n'];
-  }
-  if (sctp.maxMessageSize !== undefined) {
-    output.push('a=max-message-size:' + sctp.maxMessageSize + '\r\n');
-  }
-  return output.join('');
-};
-
-// Generate a session ID for SDP.
-// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1
-// recommends using a cryptographically random +ve 64-bit value
-// but right now this should be acceptable and within the right range
-SDPUtils.generateSessionId = function () {
-  return Math.random().toString().substr(2, 22);
-};
-
-// Write boiler plate for start of SDP
-// sessId argument is optional - if not supplied it will
-// be generated randomly
-// sessVersion is optional and defaults to 2
-// sessUser is optional and defaults to 'thisisadapterortc'
-SDPUtils.writeSessionBoilerplate = function (sessId, sessVer, sessUser) {
-  var sessionId = void 0;
-  var version = sessVer !== undefined ? sessVer : 2;
-  if (sessId) {
-    sessionId = sessId;
-  } else {
-    sessionId = SDPUtils.generateSessionId();
-  }
-  var user = sessUser || 'thisisadapterortc';
-  // FIXME: sess-id should be an NTP timestamp.
-  return 'v=0\r\n' + 'o=' + user + ' ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\r\n' + 's=-\r\n' + 't=0 0\r\n';
-};
-
-// Gets the direction from the mediaSection or the sessionpart.
-SDPUtils.getDirection = function (mediaSection, sessionpart) {
-  // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.
-  var lines = SDPUtils.splitLines(mediaSection);
-  for (var i = 0; i < lines.length; i++) {
-    switch (lines[i]) {
-      case 'a=sendrecv':
-      case 'a=sendonly':
-      case 'a=recvonly':
-      case 'a=inactive':
-        return lines[i].substring(2);
-      default:
-      // FIXME: What should happen here?
-    }
-  }
-  if (sessionpart) {
-    return SDPUtils.getDirection(sessionpart);
-  }
-  return 'sendrecv';
-};
-
-SDPUtils.getKind = function (mediaSection) {
-  var lines = SDPUtils.splitLines(mediaSection);
-  var mline = lines[0].split(' ');
-  return mline[0].substring(2);
-};
-
-SDPUtils.isRejected = function (mediaSection) {
-  return mediaSection.split(' ', 2)[1] === '0';
-};
-
-SDPUtils.parseMLine = function (mediaSection) {
-  var lines = SDPUtils.splitLines(mediaSection);
-  var parts = lines[0].substring(2).split(' ');
-  return {
-    kind: parts[0],
-    port: parseInt(parts[1], 10),
-    protocol: parts[2],
-    fmt: parts.slice(3).join(' ')
-  };
-};
-
-SDPUtils.parseOLine = function (mediaSection) {
-  var line = SDPUtils.matchPrefix(mediaSection, 'o=')[0];
-  var parts = line.substring(2).split(' ');
-  return {
-    username: parts[0],
-    sessionId: parts[1],
-    sessionVersion: parseInt(parts[2], 10),
-    netType: parts[3],
-    addressType: parts[4],
-    address: parts[5]
-  };
-};
-
-// a very naive interpretation of a valid SDP.
-SDPUtils.isValidSDP = function (blob) {
-  if (typeof blob !== 'string' || blob.length === 0) {
-    return false;
-  }
-  var lines = SDPUtils.splitLines(blob);
-  for (var i = 0; i < lines.length; i++) {
-    if (lines[i].length < 2 || lines[i].charAt(1) !== '=') {
-      return false;
-    }
-    // TODO: check the modifier a bit more.
-  }
-  return true;
-};
-
-// Expose public methods.
-if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object') {
-  module.exports = SDPUtils;
-}

+ 0 - 67
node_modules/sdp/package.json

@@ -1,67 +0,0 @@
-{
-  "_from": "sdp@^3.2.0",
-  "_id": "sdp@3.2.0",
-  "_inBundle": false,
-  "_integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==",
-  "_location": "/sdp",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "range",
-    "registry": true,
-    "raw": "sdp@^3.2.0",
-    "name": "sdp",
-    "escapedName": "sdp",
-    "rawSpec": "^3.2.0",
-    "saveSpec": null,
-    "fetchSpec": "^3.2.0"
-  },
-  "_requiredBy": [
-    "/webrtc-adapter"
-  ],
-  "_resolved": "https://registry.npmmirror.com/sdp/-/sdp-3.2.0.tgz",
-  "_shasum": "8961420552b36663b4d13ddba6f478d1461896a5",
-  "_spec": "sdp@^3.2.0",
-  "_where": "/Users/lianghulin/Documents/HBuilderProjects/recruit-video/node_modules/webrtc-adapter",
-  "author": {
-    "name": "Philipp Hancke"
-  },
-  "bugs": {
-    "url": "https://github.com/fippo/sdp/issues"
-  },
-  "bundleDependencies": false,
-  "deprecated": false,
-  "description": "SDP parsing and serialization utilities",
-  "devDependencies": {
-    "babel-cli": "^6.26.0",
-    "babel-core": "^6.26.3",
-    "babel-preset-env": "^1.7.0",
-    "c8": "^7.12.0",
-    "chai": "^4.3.7",
-    "codecov": "^3.6.5",
-    "eslint": "^8.31.0",
-    "mocha": "^10.2.0",
-    "sinon": "^15.0.1",
-    "sinon-chai": "^3.7.0"
-  },
-  "homepage": "https://github.com/fippo/sdp#readme",
-  "keywords": [
-    "sdp",
-    "webrtc"
-  ],
-  "license": "MIT",
-  "main": "dist/sdp.js",
-  "module": "sdp.js",
-  "name": "sdp",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/fippo/sdp.git"
-  },
-  "scripts": {
-    "build": "babel sdp.js --presets babel-preset-env --out-dir dist",
-    "coverage": "c8 report --reporter=text-lcov > coverage.lcov",
-    "prepare": "npm run build",
-    "test": "eslint sdp.js test/sdp.js && c8 --reporter html mocha test/sdp.js"
-  },
-  "typings": "sdp.d.ts",
-  "version": "3.2.0"
-}

+ 0 - 220
node_modules/sdp/sdp.d.ts

@@ -1,220 +0,0 @@
-export type SDPBlob = string;
-export type SDPLine = string;
-export type SDPSection = string;
-
-export type SDPDirection = 'sendonly' | 'recvonly' | 'sendrecv' | 'inactive';
-
-export interface SDPIceCandidate {
-    foundation: string;
-    component: 'rtp' | 'rtcp' | number;
-    protocol: 'tcp' | 'udp';
-    priority: number;
-    ip: string;
-    address: string;
-    port: number;
-    type: 'host' | 'prflx' | 'srflx' | 'relay';
-    relatedAddress?: string;
-    relatedPort?: number;
-    tcpType?: string;
-    ufrag?: string;
-    usernameFragment?: string;
-}
-
-export interface SDPIceParameters {
-    iceLite?: boolean;
-    usernameFragment: string;
-    password: string;
-}
-
-export interface SDPCodecParameters {
-    payloadType: number;
-    preferredPayloadType?: number;
-    name: string;
-    clockRate: number;
-    channels: number;
-    numChannels?: number;
-    maxptime?: number;
-}
-
-export interface SDPCodecAdditionalParameters {
-    [key: string]: string;
-}
-
-export interface SDPHeaderExtension {
-    id: number;
-    direction?: SDPDirection;
-    uri: string;
-    atrributes: string | undefined;
-}
-
-export interface SDPFeedbackParameter {
-    type: string;
-    parameter: string;
-}
-
-export interface SDPFingerprint {
-    algorithm: string;
-    value: string;
-}
-
-export interface SDPDtlsParameters {
-    role: string;
-    fingerprints: SDPFingerprint[];
-}
-
-export interface SDPMediaSource {
-    ssrc: number;
-    attribute?: string;
-    value?: string;
-}
-
-export interface SDPMediaSourceGroup {
-    semantics: string;
-    ssrcs: number[];
-}
-
-export interface SDPMediaStreamId {
-    stream: string;
-    track: string;
-}
-
-export interface SDPCodec extends SDPCodecParameters {
-    payloadType: number;
-    preferredPayloadType?: number;
-    parameters?: SDPCodecAdditionalParameters;
-    rtcpFeedback?: SDPFeedbackParameter[];
-}
-
-export interface SDPGroup {
-    semantics: string;
-    mids: string[];
-}
-
-export interface SDPMLine {
-    kind: string;
-    port?: number;
-    protocol: string;
-    fmt?: string;
-}
-
-export interface SDPOLine {
-    username: string;
-    sessionId: string;
-    sessionVersion: number;
-    netType: string;
-    addressType: string;
-    address: string;
-}
-
-export interface SDPRtcpParameters {
-    cname?: string;
-    ssrc?: number;
-    reducedSize?: boolean;
-    compound?: boolean;
-    mux?: boolean;
-}
-
-export interface SDPEncodingParameters {
-    ssrc: number;
-    codecPayloadType?: number;
-    rtx?: {
-        ssrc: number;
-    };
-    fec?: {
-        ssrc: number;
-        mechanism: string;
-    };
-}
-
-export interface SDPRtpCapabilities {
-    codecs: SDPCodec[];
-    headerExtensions: SDPHeaderExtension[];
-    fecMechanisms: string[];
-    rtcp?: SDPRtcpParameters[];
-}
-
-export interface SDPSctpDescription {
-    port: number;
-    protocol: string;
-    maxMessageSize?: number;
-}
-
-export const localCname: string;
-
-export function generateIdentifier(): string;
-
-export function splitLines(blob: SDPBlob): SDPLine[];
-export function splitSections(blob: SDPBlob): SDPSection[];
-
-export function getDescription(blob: SDPBlob): SDPSection;
-export function getMediaSections(blob: SDPBlob): SDPSection[];
-
-export function matchPrefix(blob: SDPBlob, prefix: string): SDPLine[];
-
-export function parseCandidate(line: SDPLine): SDPIceCandidate;
-export function writeCandidate(candidate: SDPIceCandidate): SDPLine;
-
-export function parseIceOptions(line: SDPLine): string[];
-
-export function parseRtpMap(line: SDPLine): SDPCodecParameters;
-export function writeRtpMap(codec: SDPCodecParameters): SDPLine;
-
-export function parseExtmap(line: SDPLine): SDPHeaderExtension;
-export function writeExtmap(headerExtension: SDPHeaderExtension): SDPLine;
-
-export function parseFmtp(line: SDPLine): SDPCodecAdditionalParameters;
-export function writeFmtp(codec: SDPCodec): SDPLine;
-
-export function parseRtcpFb(line: SDPLine): SDPFeedbackParameter;
-export function writeRtcpFb(codec: SDPCodec): SDPLine[];
-
-export function parseSsrcMedia(line: SDPLine): SDPMediaSource;
-export function parseSsrcGroup(line: SDPLine): SDPMediaSourceGroup;
-
-export function getMid(mediaSection: SDPSection): string;
-
-export function parseFingerprint(line: SDPLine): SDPFingerprint;
-
-export function getDtlsParameters(
-    mediaSection: SDPSection,
-    session: SDPSection
-): SDPDtlsParameters;
-export function writeDtlsParameters(params: SDPDtlsParameters, setupType: string): SDPLine;
-
-export function getIceParameters(
-    mediaSection: SDPSection,
-    session: SDPSection
-): SDPIceParameters;
-export function writeIceParameters(params: SDPIceParameters): SDPLine;
-
-export function parseRtpParameters(mediaSection: SDPSection): SDPRtpCapabilities;
-export function writeRtpDescription(kind: string, caps: SDPRtpCapabilities): SDPSection;
-
-export function parseRtpEncodingParameters(mediaSection: SDPSection): SDPEncodingParameters[];
-
-export function parseRtcpParameters(mediaSection: SDPSection): SDPRtcpParameters;
-export function writeRtcpParameters(params: SDPRtcpParameters): SDPLine;
-
-export function parseMsid(mediaSection: SDPSection): SDPMediaStreamId;
-
-export function parseSctpDescription(mediaSection: SDPSection): SDPSctpDescription;
-export function writeSctpDescription(
-    mediaSection: SDPMLine,
-    desc: SDPSctpDescription
-): SDPSection;
-
-export function generateSessionId(): string;
-export function writeSessionBoilerplate(
-    sessId?: string,
-    sessVer?: number,
-    sessUser?: string
-): SDPBlob;
-
-export function getDirection(mediaSection: SDPSection, sessionpart: SDPSection): SDPDirection;
-export function getKind(mediaSection: SDPSection): string;
-export function isRejected(mediaSection: SDPSection): boolean;
-
-export function parseMLine(mediaSection: SDPSection): SDPMLine;
-export function parseOLine(mediaSection: SDPSection): SDPOLine;
-
-export function isValidSDP(blob: SDPBlob): boolean;

+ 0 - 802
node_modules/sdp/sdp.js

@@ -1,802 +0,0 @@
-/* eslint-env node */
-'use strict';
-
-// SDP helpers.
-const SDPUtils = {};
-
-// Generate an alphanumeric identifier for cname or mids.
-// TODO: use UUIDs instead? https://gist.github.com/jed/982883
-SDPUtils.generateIdentifier = function() {
-  return Math.random().toString(36).substring(2, 12);
-};
-
-// The RTCP CNAME used by all peerconnections from the same JS.
-SDPUtils.localCName = SDPUtils.generateIdentifier();
-
-// Splits SDP into lines, dealing with both CRLF and LF.
-SDPUtils.splitLines = function(blob) {
-  return blob.trim().split('\n').map(line => line.trim());
-};
-// Splits SDP into sessionpart and mediasections. Ensures CRLF.
-SDPUtils.splitSections = function(blob) {
-  const parts = blob.split('\nm=');
-  return parts.map((part, index) => (index > 0 ?
-    'm=' + part : part).trim() + '\r\n');
-};
-
-// Returns the session description.
-SDPUtils.getDescription = function(blob) {
-  const sections = SDPUtils.splitSections(blob);
-  return sections && sections[0];
-};
-
-// Returns the individual media sections.
-SDPUtils.getMediaSections = function(blob) {
-  const sections = SDPUtils.splitSections(blob);
-  sections.shift();
-  return sections;
-};
-
-// Returns lines that start with a certain prefix.
-SDPUtils.matchPrefix = function(blob, prefix) {
-  return SDPUtils.splitLines(blob).filter(line => line.indexOf(prefix) === 0);
-};
-
-// Parses an ICE candidate line. Sample input:
-// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8
-// rport 55996"
-// Input can be prefixed with a=.
-SDPUtils.parseCandidate = function(line) {
-  let parts;
-  // Parse both variants.
-  if (line.indexOf('a=candidate:') === 0) {
-    parts = line.substring(12).split(' ');
-  } else {
-    parts = line.substring(10).split(' ');
-  }
-
-  const candidate = {
-    foundation: parts[0],
-    component: {1: 'rtp', 2: 'rtcp'}[parts[1]] || parts[1],
-    protocol: parts[2].toLowerCase(),
-    priority: parseInt(parts[3], 10),
-    ip: parts[4],
-    address: parts[4], // address is an alias for ip.
-    port: parseInt(parts[5], 10),
-    // skip parts[6] == 'typ'
-    type: parts[7],
-  };
-
-  for (let i = 8; i < parts.length; i += 2) {
-    switch (parts[i]) {
-      case 'raddr':
-        candidate.relatedAddress = parts[i + 1];
-        break;
-      case 'rport':
-        candidate.relatedPort = parseInt(parts[i + 1], 10);
-        break;
-      case 'tcptype':
-        candidate.tcpType = parts[i + 1];
-        break;
-      case 'ufrag':
-        candidate.ufrag = parts[i + 1]; // for backward compatibility.
-        candidate.usernameFragment = parts[i + 1];
-        break;
-      default: // extension handling, in particular ufrag. Don't overwrite.
-        if (candidate[parts[i]] === undefined) {
-          candidate[parts[i]] = parts[i + 1];
-        }
-        break;
-    }
-  }
-  return candidate;
-};
-
-// Translates a candidate object into SDP candidate attribute.
-// This does not include the a= prefix!
-SDPUtils.writeCandidate = function(candidate) {
-  const sdp = [];
-  sdp.push(candidate.foundation);
-
-  const component = candidate.component;
-  if (component === 'rtp') {
-    sdp.push(1);
-  } else if (component === 'rtcp') {
-    sdp.push(2);
-  } else {
-    sdp.push(component);
-  }
-  sdp.push(candidate.protocol.toUpperCase());
-  sdp.push(candidate.priority);
-  sdp.push(candidate.address || candidate.ip);
-  sdp.push(candidate.port);
-
-  const type = candidate.type;
-  sdp.push('typ');
-  sdp.push(type);
-  if (type !== 'host' && candidate.relatedAddress &&
-      candidate.relatedPort) {
-    sdp.push('raddr');
-    sdp.push(candidate.relatedAddress);
-    sdp.push('rport');
-    sdp.push(candidate.relatedPort);
-  }
-  if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {
-    sdp.push('tcptype');
-    sdp.push(candidate.tcpType);
-  }
-  if (candidate.usernameFragment || candidate.ufrag) {
-    sdp.push('ufrag');
-    sdp.push(candidate.usernameFragment || candidate.ufrag);
-  }
-  return 'candidate:' + sdp.join(' ');
-};
-
-// Parses an ice-options line, returns an array of option tags.
-// Sample input:
-// a=ice-options:foo bar
-SDPUtils.parseIceOptions = function(line) {
-  return line.substring(14).split(' ');
-};
-
-// Parses a rtpmap line, returns RTCRtpCoddecParameters. Sample input:
-// a=rtpmap:111 opus/48000/2
-SDPUtils.parseRtpMap = function(line) {
-  let parts = line.substring(9).split(' ');
-  const parsed = {
-    payloadType: parseInt(parts.shift(), 10), // was: id
-  };
-
-  parts = parts[0].split('/');
-
-  parsed.name = parts[0];
-  parsed.clockRate = parseInt(parts[1], 10); // was: clockrate
-  parsed.channels = parts.length === 3 ? parseInt(parts[2], 10) : 1;
-  // legacy alias, got renamed back to channels in ORTC.
-  parsed.numChannels = parsed.channels;
-  return parsed;
-};
-
-// Generates a rtpmap line from RTCRtpCodecCapability or
-// RTCRtpCodecParameters.
-SDPUtils.writeRtpMap = function(codec) {
-  let pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  const channels = codec.channels || codec.numChannels || 1;
-  return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate +
-      (channels !== 1 ? '/' + channels : '') + '\r\n';
-};
-
-// Parses a extmap line (headerextension from RFC 5285). Sample input:
-// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
-// a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset
-SDPUtils.parseExtmap = function(line) {
-  const parts = line.substring(9).split(' ');
-  return {
-    id: parseInt(parts[0], 10),
-    direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv',
-    uri: parts[1],
-    attributes: parts.slice(2).join(' '),
-  };
-};
-
-// Generates an extmap line from RTCRtpHeaderExtensionParameters or
-// RTCRtpHeaderExtension.
-SDPUtils.writeExtmap = function(headerExtension) {
-  return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) +
-      (headerExtension.direction && headerExtension.direction !== 'sendrecv'
-        ? '/' + headerExtension.direction
-        : '') +
-      ' ' + headerExtension.uri +
-      (headerExtension.attributes ? ' ' + headerExtension.attributes : '') +
-      '\r\n';
-};
-
-// Parses a fmtp line, returns dictionary. Sample input:
-// a=fmtp:96 vbr=on;cng=on
-// Also deals with vbr=on; cng=on
-SDPUtils.parseFmtp = function(line) {
-  const parsed = {};
-  let kv;
-  const parts = line.substring(line.indexOf(' ') + 1).split(';');
-  for (let j = 0; j < parts.length; j++) {
-    kv = parts[j].trim().split('=');
-    parsed[kv[0].trim()] = kv[1];
-  }
-  return parsed;
-};
-
-// Generates a fmtp line from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeFmtp = function(codec) {
-  let line = '';
-  let pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.parameters && Object.keys(codec.parameters).length) {
-    const params = [];
-    Object.keys(codec.parameters).forEach(param => {
-      if (codec.parameters[param] !== undefined) {
-        params.push(param + '=' + codec.parameters[param]);
-      } else {
-        params.push(param);
-      }
-    });
-    line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n';
-  }
-  return line;
-};
-
-// Parses a rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:
-// a=rtcp-fb:98 nack rpsi
-SDPUtils.parseRtcpFb = function(line) {
-  const parts = line.substring(line.indexOf(' ') + 1).split(' ');
-  return {
-    type: parts.shift(),
-    parameter: parts.join(' '),
-  };
-};
-
-// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeRtcpFb = function(codec) {
-  let lines = '';
-  let pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.rtcpFeedback && codec.rtcpFeedback.length) {
-    // FIXME: special handling for trr-int?
-    codec.rtcpFeedback.forEach(fb => {
-      lines += 'a=rtcp-fb:' + pt + ' ' + fb.type +
-      (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') +
-          '\r\n';
-    });
-  }
-  return lines;
-};
-
-// Parses a RFC 5576 ssrc media attribute. Sample input:
-// a=ssrc:3735928559 cname:something
-SDPUtils.parseSsrcMedia = function(line) {
-  const sp = line.indexOf(' ');
-  const parts = {
-    ssrc: parseInt(line.substring(7, sp), 10),
-  };
-  const colon = line.indexOf(':', sp);
-  if (colon > -1) {
-    parts.attribute = line.substring(sp + 1, colon);
-    parts.value = line.substring(colon + 1);
-  } else {
-    parts.attribute = line.substring(sp + 1);
-  }
-  return parts;
-};
-
-// Parse a ssrc-group line (see RFC 5576). Sample input:
-// a=ssrc-group:semantics 12 34
-SDPUtils.parseSsrcGroup = function(line) {
-  const parts = line.substring(13).split(' ');
-  return {
-    semantics: parts.shift(),
-    ssrcs: parts.map(ssrc => parseInt(ssrc, 10)),
-  };
-};
-
-// Extracts the MID (RFC 5888) from a media section.
-// Returns the MID or undefined if no mid line was found.
-SDPUtils.getMid = function(mediaSection) {
-  const mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];
-  if (mid) {
-    return mid.substring(6);
-  }
-};
-
-// Parses a fingerprint line for DTLS-SRTP.
-SDPUtils.parseFingerprint = function(line) {
-  const parts = line.substring(14).split(' ');
-  return {
-    algorithm: parts[0].toLowerCase(), // algorithm is case-sensitive in Edge.
-    value: parts[1].toUpperCase(), // the definition is upper-case in RFC 4572.
-  };
-};
-
-// Extracts DTLS parameters from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the fingerprint line as input. See also getIceParameters.
-SDPUtils.getDtlsParameters = function(mediaSection, sessionpart) {
-  const lines = SDPUtils.matchPrefix(mediaSection + sessionpart,
-    'a=fingerprint:');
-  // Note: a=setup line is ignored since we use the 'auto' role in Edge.
-  return {
-    role: 'auto',
-    fingerprints: lines.map(SDPUtils.parseFingerprint),
-  };
-};
-
-// Serializes DTLS parameters to SDP.
-SDPUtils.writeDtlsParameters = function(params, setupType) {
-  let sdp = 'a=setup:' + setupType + '\r\n';
-  params.fingerprints.forEach(fp => {
-    sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n';
-  });
-  return sdp;
-};
-
-// Parses a=crypto lines into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#dictionary-rtcsrtpsdesparameters-members
-SDPUtils.parseCryptoLine = function(line) {
-  const parts = line.substring(9).split(' ');
-  return {
-    tag: parseInt(parts[0], 10),
-    cryptoSuite: parts[1],
-    keyParams: parts[2],
-    sessionParams: parts.slice(3),
-  };
-};
-
-SDPUtils.writeCryptoLine = function(parameters) {
-  return 'a=crypto:' + parameters.tag + ' ' +
-    parameters.cryptoSuite + ' ' +
-    (typeof parameters.keyParams === 'object'
-      ? SDPUtils.writeCryptoKeyParams(parameters.keyParams)
-      : parameters.keyParams) +
-    (parameters.sessionParams ? ' ' + parameters.sessionParams.join(' ') : '') +
-    '\r\n';
-};
-
-// Parses the crypto key parameters into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#rtcsrtpkeyparam*
-SDPUtils.parseCryptoKeyParams = function(keyParams) {
-  if (keyParams.indexOf('inline:') !== 0) {
-    return null;
-  }
-  const parts = keyParams.substring(7).split('|');
-  return {
-    keyMethod: 'inline',
-    keySalt: parts[0],
-    lifeTime: parts[1],
-    mkiValue: parts[2] ? parts[2].split(':')[0] : undefined,
-    mkiLength: parts[2] ? parts[2].split(':')[1] : undefined,
-  };
-};
-
-SDPUtils.writeCryptoKeyParams = function(keyParams) {
-  return keyParams.keyMethod + ':'
-    + keyParams.keySalt +
-    (keyParams.lifeTime ? '|' + keyParams.lifeTime : '') +
-    (keyParams.mkiValue && keyParams.mkiLength
-      ? '|' + keyParams.mkiValue + ':' + keyParams.mkiLength
-      : '');
-};
-
-// Extracts all SDES parameters.
-SDPUtils.getCryptoParameters = function(mediaSection, sessionpart) {
-  const lines = SDPUtils.matchPrefix(mediaSection + sessionpart,
-    'a=crypto:');
-  return lines.map(SDPUtils.parseCryptoLine);
-};
-
-// Parses ICE information from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the ice-ufrag and ice-pwd lines as input.
-SDPUtils.getIceParameters = function(mediaSection, sessionpart) {
-  const ufrag = SDPUtils.matchPrefix(mediaSection + sessionpart,
-    'a=ice-ufrag:')[0];
-  const pwd = SDPUtils.matchPrefix(mediaSection + sessionpart,
-    'a=ice-pwd:')[0];
-  if (!(ufrag && pwd)) {
-    return null;
-  }
-  return {
-    usernameFragment: ufrag.substring(12),
-    password: pwd.substring(10),
-  };
-};
-
-// Serializes ICE parameters to SDP.
-SDPUtils.writeIceParameters = function(params) {
-  let sdp = 'a=ice-ufrag:' + params.usernameFragment + '\r\n' +
-      'a=ice-pwd:' + params.password + '\r\n';
-  if (params.iceLite) {
-    sdp += 'a=ice-lite\r\n';
-  }
-  return sdp;
-};
-
-// Parses the SDP media section and returns RTCRtpParameters.
-SDPUtils.parseRtpParameters = function(mediaSection) {
-  const description = {
-    codecs: [],
-    headerExtensions: [],
-    fecMechanisms: [],
-    rtcp: [],
-  };
-  const lines = SDPUtils.splitLines(mediaSection);
-  const mline = lines[0].split(' ');
-  description.profile = mline[2];
-  for (let i = 3; i < mline.length; i++) { // find all codecs from mline[3..]
-    const pt = mline[i];
-    const rtpmapline = SDPUtils.matchPrefix(
-      mediaSection, 'a=rtpmap:' + pt + ' ')[0];
-    if (rtpmapline) {
-      const codec = SDPUtils.parseRtpMap(rtpmapline);
-      const fmtps = SDPUtils.matchPrefix(
-        mediaSection, 'a=fmtp:' + pt + ' ');
-      // Only the first a=fmtp:<pt> is considered.
-      codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};
-      codec.rtcpFeedback = SDPUtils.matchPrefix(
-        mediaSection, 'a=rtcp-fb:' + pt + ' ')
-        .map(SDPUtils.parseRtcpFb);
-      description.codecs.push(codec);
-      // parse FEC mechanisms from rtpmap lines.
-      switch (codec.name.toUpperCase()) {
-        case 'RED':
-        case 'ULPFEC':
-          description.fecMechanisms.push(codec.name.toUpperCase());
-          break;
-        default: // only RED and ULPFEC are recognized as FEC mechanisms.
-          break;
-      }
-    }
-  }
-  SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(line => {
-    description.headerExtensions.push(SDPUtils.parseExtmap(line));
-  });
-  const wildcardRtcpFb = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:* ')
-    .map(SDPUtils.parseRtcpFb);
-  description.codecs.forEach(codec => {
-    wildcardRtcpFb.forEach(fb=> {
-      const duplicate = codec.rtcpFeedback.find(existingFeedback => {
-        return existingFeedback.type === fb.type &&
-          existingFeedback.parameter === fb.parameter;
-      });
-      if (!duplicate) {
-        codec.rtcpFeedback.push(fb);
-      }
-    });
-  });
-  // FIXME: parse rtcp.
-  return description;
-};
-
-// Generates parts of the SDP media section describing the capabilities /
-// parameters.
-SDPUtils.writeRtpDescription = function(kind, caps) {
-  let sdp = '';
-
-  // Build the mline.
-  sdp += 'm=' + kind + ' ';
-  sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.
-  sdp += ' ' + (caps.profile || 'UDP/TLS/RTP/SAVPF') + ' ';
-  sdp += caps.codecs.map(codec => {
-    if (codec.preferredPayloadType !== undefined) {
-      return codec.preferredPayloadType;
-    }
-    return codec.payloadType;
-  }).join(' ') + '\r\n';
-
-  sdp += 'c=IN IP4 0.0.0.0\r\n';
-  sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n';
-
-  // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.
-  caps.codecs.forEach(codec => {
-    sdp += SDPUtils.writeRtpMap(codec);
-    sdp += SDPUtils.writeFmtp(codec);
-    sdp += SDPUtils.writeRtcpFb(codec);
-  });
-  let maxptime = 0;
-  caps.codecs.forEach(codec => {
-    if (codec.maxptime > maxptime) {
-      maxptime = codec.maxptime;
-    }
-  });
-  if (maxptime > 0) {
-    sdp += 'a=maxptime:' + maxptime + '\r\n';
-  }
-
-  if (caps.headerExtensions) {
-    caps.headerExtensions.forEach(extension => {
-      sdp += SDPUtils.writeExtmap(extension);
-    });
-  }
-  // FIXME: write fecMechanisms.
-  return sdp;
-};
-
-// Parses the SDP media section and returns an array of
-// RTCRtpEncodingParameters.
-SDPUtils.parseRtpEncodingParameters = function(mediaSection) {
-  const encodingParameters = [];
-  const description = SDPUtils.parseRtpParameters(mediaSection);
-  const hasRed = description.fecMechanisms.indexOf('RED') !== -1;
-  const hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1;
-
-  // filter a=ssrc:... cname:, ignore PlanB-msid
-  const ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')
-    .map(line => SDPUtils.parseSsrcMedia(line))
-    .filter(parts => parts.attribute === 'cname');
-  const primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc;
-  let secondarySsrc;
-
-  const flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID')
-    .map(line => {
-      const parts = line.substring(17).split(' ');
-      return parts.map(part => parseInt(part, 10));
-    });
-  if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) {
-    secondarySsrc = flows[0][1];
-  }
-
-  description.codecs.forEach(codec => {
-    if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) {
-      let encParam = {
-        ssrc: primarySsrc,
-        codecPayloadType: parseInt(codec.parameters.apt, 10),
-      };
-      if (primarySsrc && secondarySsrc) {
-        encParam.rtx = {ssrc: secondarySsrc};
-      }
-      encodingParameters.push(encParam);
-      if (hasRed) {
-        encParam = JSON.parse(JSON.stringify(encParam));
-        encParam.fec = {
-          ssrc: primarySsrc,
-          mechanism: hasUlpfec ? 'red+ulpfec' : 'red',
-        };
-        encodingParameters.push(encParam);
-      }
-    }
-  });
-  if (encodingParameters.length === 0 && primarySsrc) {
-    encodingParameters.push({
-      ssrc: primarySsrc,
-    });
-  }
-
-  // we support both b=AS and b=TIAS but interpret AS as TIAS.
-  let bandwidth = SDPUtils.matchPrefix(mediaSection, 'b=');
-  if (bandwidth.length) {
-    if (bandwidth[0].indexOf('b=TIAS:') === 0) {
-      bandwidth = parseInt(bandwidth[0].substring(7), 10);
-    } else if (bandwidth[0].indexOf('b=AS:') === 0) {
-      // use formula from JSEP to convert b=AS to TIAS value.
-      bandwidth = parseInt(bandwidth[0].substring(5), 10) * 1000 * 0.95
-          - (50 * 40 * 8);
-    } else {
-      bandwidth = undefined;
-    }
-    encodingParameters.forEach(params => {
-      params.maxBitrate = bandwidth;
-    });
-  }
-  return encodingParameters;
-};
-
-// parses http://draft.ortc.org/#rtcrtcpparameters*
-SDPUtils.parseRtcpParameters = function(mediaSection) {
-  const rtcpParameters = {};
-
-  // Gets the first SSRC. Note that with RTX there might be multiple
-  // SSRCs.
-  const remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')
-    .map(line => SDPUtils.parseSsrcMedia(line))
-    .filter(obj => obj.attribute === 'cname')[0];
-  if (remoteSsrc) {
-    rtcpParameters.cname = remoteSsrc.value;
-    rtcpParameters.ssrc = remoteSsrc.ssrc;
-  }
-
-  // Edge uses the compound attribute instead of reducedSize
-  // compound is !reducedSize
-  const rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize');
-  rtcpParameters.reducedSize = rsize.length > 0;
-  rtcpParameters.compound = rsize.length === 0;
-
-  // parses the rtcp-mux attrіbute.
-  // Note that Edge does not support unmuxed RTCP.
-  const mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux');
-  rtcpParameters.mux = mux.length > 0;
-
-  return rtcpParameters;
-};
-
-SDPUtils.writeRtcpParameters = function(rtcpParameters) {
-  let sdp = '';
-  if (rtcpParameters.reducedSize) {
-    sdp += 'a=rtcp-rsize\r\n';
-  }
-  if (rtcpParameters.mux) {
-    sdp += 'a=rtcp-mux\r\n';
-  }
-  if (rtcpParameters.ssrc !== undefined && rtcpParameters.cname) {
-    sdp += 'a=ssrc:' + rtcpParameters.ssrc +
-      ' cname:' + rtcpParameters.cname + '\r\n';
-  }
-  return sdp;
-};
-
-
-// parses either a=msid: or a=ssrc:... msid lines and returns
-// the id of the MediaStream and MediaStreamTrack.
-SDPUtils.parseMsid = function(mediaSection) {
-  let parts;
-  const spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:');
-  if (spec.length === 1) {
-    parts = spec[0].substring(7).split(' ');
-    return {stream: parts[0], track: parts[1]};
-  }
-  const planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:')
-    .map(line => SDPUtils.parseSsrcMedia(line))
-    .filter(msidParts => msidParts.attribute === 'msid');
-  if (planB.length > 0) {
-    parts = planB[0].value.split(' ');
-    return {stream: parts[0], track: parts[1]};
-  }
-};
-
-// SCTP
-// parses draft-ietf-mmusic-sctp-sdp-26 first and falls back
-// to draft-ietf-mmusic-sctp-sdp-05
-SDPUtils.parseSctpDescription = function(mediaSection) {
-  const mline = SDPUtils.parseMLine(mediaSection);
-  const maxSizeLine = SDPUtils.matchPrefix(mediaSection, 'a=max-message-size:');
-  let maxMessageSize;
-  if (maxSizeLine.length > 0) {
-    maxMessageSize = parseInt(maxSizeLine[0].substring(19), 10);
-  }
-  if (isNaN(maxMessageSize)) {
-    maxMessageSize = 65536;
-  }
-  const sctpPort = SDPUtils.matchPrefix(mediaSection, 'a=sctp-port:');
-  if (sctpPort.length > 0) {
-    return {
-      port: parseInt(sctpPort[0].substring(12), 10),
-      protocol: mline.fmt,
-      maxMessageSize,
-    };
-  }
-  const sctpMapLines = SDPUtils.matchPrefix(mediaSection, 'a=sctpmap:');
-  if (sctpMapLines.length > 0) {
-    const parts = sctpMapLines[0]
-      .substring(10)
-      .split(' ');
-    return {
-      port: parseInt(parts[0], 10),
-      protocol: parts[1],
-      maxMessageSize,
-    };
-  }
-};
-
-// SCTP
-// outputs the draft-ietf-mmusic-sctp-sdp-26 version that all browsers
-// support by now receiving in this format, unless we originally parsed
-// as the draft-ietf-mmusic-sctp-sdp-05 format (indicated by the m-line
-// protocol of DTLS/SCTP -- without UDP/ or TCP/)
-SDPUtils.writeSctpDescription = function(media, sctp) {
-  let output = [];
-  if (media.protocol !== 'DTLS/SCTP') {
-    output = [
-      'm=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.protocol + '\r\n',
-      'c=IN IP4 0.0.0.0\r\n',
-      'a=sctp-port:' + sctp.port + '\r\n',
-    ];
-  } else {
-    output = [
-      'm=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.port + '\r\n',
-      'c=IN IP4 0.0.0.0\r\n',
-      'a=sctpmap:' + sctp.port + ' ' + sctp.protocol + ' 65535\r\n',
-    ];
-  }
-  if (sctp.maxMessageSize !== undefined) {
-    output.push('a=max-message-size:' + sctp.maxMessageSize + '\r\n');
-  }
-  return output.join('');
-};
-
-// Generate a session ID for SDP.
-// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1
-// recommends using a cryptographically random +ve 64-bit value
-// but right now this should be acceptable and within the right range
-SDPUtils.generateSessionId = function() {
-  return Math.random().toString().substr(2, 22);
-};
-
-// Write boiler plate for start of SDP
-// sessId argument is optional - if not supplied it will
-// be generated randomly
-// sessVersion is optional and defaults to 2
-// sessUser is optional and defaults to 'thisisadapterortc'
-SDPUtils.writeSessionBoilerplate = function(sessId, sessVer, sessUser) {
-  let sessionId;
-  const version = sessVer !== undefined ? sessVer : 2;
-  if (sessId) {
-    sessionId = sessId;
-  } else {
-    sessionId = SDPUtils.generateSessionId();
-  }
-  const user = sessUser || 'thisisadapterortc';
-  // FIXME: sess-id should be an NTP timestamp.
-  return 'v=0\r\n' +
-      'o=' + user + ' ' + sessionId + ' ' + version +
-        ' IN IP4 127.0.0.1\r\n' +
-      's=-\r\n' +
-      't=0 0\r\n';
-};
-
-// Gets the direction from the mediaSection or the sessionpart.
-SDPUtils.getDirection = function(mediaSection, sessionpart) {
-  // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.
-  const lines = SDPUtils.splitLines(mediaSection);
-  for (let i = 0; i < lines.length; i++) {
-    switch (lines[i]) {
-      case 'a=sendrecv':
-      case 'a=sendonly':
-      case 'a=recvonly':
-      case 'a=inactive':
-        return lines[i].substring(2);
-      default:
-        // FIXME: What should happen here?
-    }
-  }
-  if (sessionpart) {
-    return SDPUtils.getDirection(sessionpart);
-  }
-  return 'sendrecv';
-};
-
-SDPUtils.getKind = function(mediaSection) {
-  const lines = SDPUtils.splitLines(mediaSection);
-  const mline = lines[0].split(' ');
-  return mline[0].substring(2);
-};
-
-SDPUtils.isRejected = function(mediaSection) {
-  return mediaSection.split(' ', 2)[1] === '0';
-};
-
-SDPUtils.parseMLine = function(mediaSection) {
-  const lines = SDPUtils.splitLines(mediaSection);
-  const parts = lines[0].substring(2).split(' ');
-  return {
-    kind: parts[0],
-    port: parseInt(parts[1], 10),
-    protocol: parts[2],
-    fmt: parts.slice(3).join(' '),
-  };
-};
-
-SDPUtils.parseOLine = function(mediaSection) {
-  const line = SDPUtils.matchPrefix(mediaSection, 'o=')[0];
-  const parts = line.substring(2).split(' ');
-  return {
-    username: parts[0],
-    sessionId: parts[1],
-    sessionVersion: parseInt(parts[2], 10),
-    netType: parts[3],
-    addressType: parts[4],
-    address: parts[5],
-  };
-};
-
-// a very naive interpretation of a valid SDP.
-SDPUtils.isValidSDP = function(blob) {
-  if (typeof blob !== 'string' || blob.length === 0) {
-    return false;
-  }
-  const lines = SDPUtils.splitLines(blob);
-  for (let i = 0; i < lines.length; i++) {
-    if (lines[i].length < 2 || lines[i].charAt(1) !== '=') {
-      return false;
-    }
-    // TODO: check the modifier a bit more.
-  }
-  return true;
-};
-
-// Expose public methods.
-if (typeof module === 'object') {
-  module.exports = SDPUtils;
-}

+ 0 - 92
node_modules/trtc-sdk-v5/README-zh_CN.md

@@ -1,92 +0,0 @@
-<p align="center">
-  <a href="https://cloud.tencent.com/document/product/647">
-    <img width="200" src="https://web.sdk.qcloud.com/trtc/webrtc/assets/trtc.io-logo.png">
-  </a>
-</p>
-
-<h1 align="center" style="margin-top: -40px">TRTC Web SDK</h1>
-
-<div align="center">
-
-一款面向对象的 WebRTC SDK。
-
-[![NPM version](https://img.shields.io/npm/v/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![NPM downloads](https://img.shields.io/npm/dw/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![trtc.js](https://img.shields.io/bundlephobia/min/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![Typescript Supported](https://img.shields.io/badge/Typescript-Supported-blue)](https://www.npmjs.com/package/trtc-sdk-v5) [![Documents](https://img.shields.io/badge/-Documents-blue)](https://web.sdk.qcloud.com/trtc/webrtc/doc/en/index.html) [![Stars](https://img.shields.io/github/stars/tencentyun/TRTCSDK?style=social)](https://github.com/LiteAVSDK/TRTC_Web) 
-
-</div>
-
-<div align="center"> 简体中文 | <a href="https://github.com/LiteAVSDK/TRTC_Web/blob/main/v5/SDK/README.md" target="_blank"> English </a> </div>
-
-## 简介
-
-[TRTC Web SDK](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/index.html) 是腾讯云实时音视频通讯解决方案的 Web 端 SDK,它是通过 HTML 网页加载的 JavaScript 库。Web 开发者可以使用 TRTC Web SDK 提供的 API,在您的业务网站上实现实时音视频通话、直播等功能。
-
-- [在线 Demo](https://trtc.tencentcloud.com/demo/homepage/#/home)
-
-## 环境支持
-
-TRTC Web SDK 支持市面上主流浏览器,详情参考:[浏览器支持情况](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-05-info-browser.html)。
-
-| [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> Edge | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>iOS Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera |
-| --------- | --------- | --------- | --------- | --------- | --------- |
-| 56+ | 80+ | 56+ | 11+ | 11+ | 46+ |
-
-## 安装
-
-使用 npm:
-```
-$ npm install trtc-sdk-v5 --save
-```
-
-使用 yarn:
-```
-$ yarn add trtc-sdk-v5
-```
-
-手动下载 sdk 包:
-
-1. 下载 [trtc.js](https://www.unpkg.com/trtc-sdk-v5@latest/trtc.js)
-2. 将 `trtc.js` 复制到您的项目中。
-
-## 使用
-
-通过 import 引入或者 script 引入
-
-```js
-import TRTC from 'trtc-sdk-v5';
-// or
-<script src="trtc.js"></script>
-```
-
-参考下述两个教程,可快速跑通 Demo 及了解如何使用 SDK 实现基础音视频通话功能。
-
-- [快速跑通 Demo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-10-basic-get-started-with-demo.html)
-- [基础音视频通话](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-11-basic-video-call.html)
-
-## API 概要
-
-- [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html) 是整个 SDK 的主入口,提供创建 TRTC 对象 [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html)、获取摄像头列表、麦克风列表、检查浏览器兼容性、控制日志等级及日志上传等功能。
-- [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html) TRTC对象,提供实时音视频通话的核心能力:
-  - 进房 [enterRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#enterRoom)
-  - 退房 [exitRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#exitRoom)
-  - 发布/预览本地视频 [startLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startLocalVideo)
-  - 发布/预览本地音频 [startLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startLocalAudio)
-  - 取消发布/预览本地视频 [stopLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#stopLocalVideo)
-  - 取消发布/预览本地音频 [stopLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#stopLocalAudio)
-  - 观看远端视频 [startRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startRemoteVideo)
-  - 取消观看视频 [stopRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#stopRemoteVideo)
-  - 静音/取消静音远端音频 [muteRemoteAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#muteRemoteAudio)
-
-## 目录结构
-
-```
-├── README.md
-├── package.json
-├── trtc.js // npm 包入口文件(umd 格式)
-├── trtc.esm.js // 基于 es 模块的 sdk 包(esm 格式)
-├── index.d.ts // 类型声明文件
-└── plugins // 插件目录
-```
-
-## Changelog
-
-- [变更日志](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/tutorial-01-info-changelog.html)

+ 0 - 84
node_modules/trtc-sdk-v5/README.md

@@ -1,84 +0,0 @@
-<p align="center">
-  <a href="https://trtc.io/">
-    <img width="200" src="https://web.sdk.qcloud.com/trtc/webrtc/assets/trtc.io-logo.png">
-  </a>
-</p>
-
-<h1 align="center" style="margin-top: -40px">TRTC Web SDK</h1>
-
-<div align="center">
-
-An object-oriented WebRTC SDK library  
-
-[![NPM version](https://img.shields.io/npm/v/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![NPM downloads](https://img.shields.io/npm/dw/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![trtc.js](https://img.shields.io/bundlephobia/min/trtc-sdk-v5)](https://www.npmjs.com/package/trtc-sdk-v5) [![Typescript Supported](https://img.shields.io/badge/Typescript-Supported-blue)](https://www.npmjs.com/package/trtc-sdk-v5) [![Documents](https://img.shields.io/badge/-Documents-blue)](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/index.html) [![Stars](https://img.shields.io/github/stars/tencentyun/TRTCSDK?style=social)](https://github.com/LiteAVSDK/TRTC_Web) 
-
-</div>
-
-<div align="center"> English | <a href="https://github.com/LiteAVSDK/TRTC_Web/blob/main/README-zh_CN.md" target="_blank"> 简体中文</a> </div>
-
-## Introduction
-
-TRTC Web SDK is an object-oriented WebRTC SDK of Tencent Cloud's real-time communication solution. Web developers can use TRTC Web SDK to establish an audio/video calls or live streaming services on your website.
-
-- [Online Demo](https://trtc.io/demo/homepage/#/home).
-- [Changelog](https://trtc.io/document/53626).
-- We offer SDKs for Web, Android, iOS, Windows, Flutter, explore more in [trtc.io](https://trtc.io/).
-
-## Environment Supports
-
-TRTC Web SDK supports major modern browsers. For details, please refer to [Browsers Supported](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-05-info-browser.html).
-
-| [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Chrome | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/> Edge | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Firefox | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/safari-ios_48x48.png" alt="iOS Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>iOS Safari | [<img src="https://web.sdk.qcloud.com/trtc/webrtc/assets/logo/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br/>Opera |
-| --------- | --------- | --------- | --------- | --------- | --------- |
-| 56+ | 80+ | 56+ | 11+ | 11+ | 46+ |
-
-## Install
-
-npm:
-```
-$ npm install trtc-sdk-v5 --save
-```
-
-yarn:
-```
-$ yarn add trtc-sdk-v5
-```
-
-Download manually:
-
-1. download [trtc.js](https://www.unpkg.com/trtc-sdk-v5@latest/trtc.js).
-2. copy `trtc.js` to your project.
-
-## Usage
-
-Refer to the following two tutorials for a quick run-through of the demo and how to use the SDK to implement basic audio and video calling functionality.
-
-- [Demo Quick Run](https://trtc.io/document/35607).
-- [Integration Quick Start](https://trtc.io/document/35096).
-
-Explore SDK API documents:[TRTC Web SDK](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/index.html).
-
-## API Overview
-
-- [TRTC](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html) is the main entry for TRTC SDK, providing APIs such as create trtc instance([TRTC.create](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.create)), [TRTC.getCameraList](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.getCameraList), [TRTC.getMicrophoneList](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.getMicrophoneList),  [TRTC.isSupported](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#.isSupported).
-- [trtc](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html) instance, provides the core capability for real-time audio and video calls.
-  - Enter room [trtc.enterRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#enterRoom)
-  - Exit room [trtc.exitRoom](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#exitRoom)
-  - Turn on camera [trtc.startLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#startLocalVideo)
-  - Turn on microphone [trtc.startLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#startLocalAudio)
-  - Turn off camera [trtc.stopLocalVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopLocalVideo)
-  - Turn off microphone [trtc.stopLocalAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopLocalAudio)
-  - Play remote video [trtc.startRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#startRemoteVideo)
-  - Stop playing remote video [trtc.stopRemoteVideo](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#stopRemoteVideo)
-  - Mute/unmute remote audio [trtc.muteRemoteAudio](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html#muteRemoteAudio)
-
-## Directory
-
-```
-├── README.md
-├── package.json
-├── trtc.js // sdk file(umd format)
-├── trtc.esm.js // sdk file base on ES modules(esm format)
-├── index.d.ts // ts declaration file
-└── plugins // trtc plugins
-```

+ 0 - 2113
node_modules/trtc-sdk-v5/index.d.ts

@@ -1,2113 +0,0 @@
-import { CDNStreaming, CDNStreamingOptions } from './plugins/cdn-streaming';
-import { DeviceDetector, DeviceDetectorOptions } from './plugins/device-detector';
-import { VirtualBackground, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions } from './plugins/video-effect/virtual-background';
-import { Watermark, WatermarkOptions } from './plugins/video-effect/watermark';
-import { Beauty, BeautyOptions, UpdateBeautyOptions } from './plugins/video-effect/beauty';
-import { BasicBeauty, BasicBeautyOptions } from './plugins/video-effect/basic-beauty';
-import { CrossRoom, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption } from './plugins/cross-room';
-import { Debug, DebugOptions } from './plugins/debug';
-
-export { CDNStreamingOptions, DeviceDetectorOptions, VirtualBackgroundOptions, UpdateVirtualBackgroundOptions, WatermarkOptions, BeautyOptions, UpdateBeautyOptions, BasicBeautyOptions, StartCrossRoomOption, UpdateCrossRoomOption, StopCrossRoomOption, DebugOptions };
-type TRTCPlugin = typeof CrossRoom | typeof CDNStreaming | typeof DeviceDetector | typeof VirtualBackground | typeof Watermark | typeof Beauty | typeof BasicBeauty | typeof Debug;
-
-export declare type PluginStartOptionsMap = {
-	'AudioMixer': AudioMixerOptions;
-	'AIDenoiser': AIDenoiserOptions;
-	'CDNStreaming': CDNStreamingOptions;
-	'VirtualBackground': VirtualBackgroundOptions;
-	'Watermark': WatermarkOptions;
-	'Beauty': BeautyOptions;
-	'BasicBeauty': BasicBeautyOptions;
-	'DeviceDetector': DeviceDetectorOptions;
-	'Debug': undefined;
-	'CrossRoom': StartCrossRoomOption;
-};
-export declare type PluginUpdateOptionsMap = {
-	'AudioMixer': UpdateAudioMixerOptions;
-	'CDNStreaming': CDNStreamingOptions;
-	'VirtualBackground': UpdateVirtualBackgroundOptions;
-	'Beauty': UpdateBeautyOptions;
-	'BasicBeauty': BasicBeautyOptions;
-	'CrossRoom': UpdateCrossRoomOption;
-};
-
-export declare type PluginStopOptionsMap = {
-	'AudioMixer': StopAudioMixerOptions;
-	'AIDenoiser': undefined;
-	'CDNStreaming': CDNStreamingOptions;
-	'VirtualBackground': undefined;
-	'Watermark': undefined;
-	'Beauty': undefined;
-	'BasicBeauty': undefined;
-	'DeviceDetector': undefined;
-	'Debug': undefined;
-	'CrossRoom': StopCrossRoomOption | undefined;
-};
-
-export declare class RtcError extends Error implements RTCErrorInterface {
-  name: string;
-  /**
-	 *
-	 * Error code
-	 * @see Detailed error code list: {@link module:ERROR_CODE ErrorCode}
-	 * @readonly
-	 * @memberof RtcError
-	 */
-  code: number;
-  /**
-	 *
-	 * Extended error code
-	 * @see Detailed error code list: {@link module:ERROR_CODE ErrorCode}
-	 * @readonly
-	 * @memberof RtcError
-	 */
-  extraCode?: number;
-  /**
-	 *
-	 * The name of the function that throws the error
-	 * @readonly
-	 * @memberof RtcError
-	 */
-  functionName: string;
-  /**
-	 *
-	 * Error message
-	 * @readonly
-	 * @memberof RtcError
-	 */
-  message: string;
-  /**
-	 * Error handler. For the following errors, you can call error.handler() for recovering.
-	 *
-	 * - {@link module:ERROR_CODE.DEVICE_ERROR ErrorCode.DEVICE_ERROR} extraCode: 5302
-	 *   ```js
-	 *    trtc.startLocalAudio().catch(error => {
-	 *     if (error.extraCode === 5302 && typeof error.handler === 'function') {
-	 *       // Prompt the user the browser permission(camera/microphone/screen sharing) has been denied by system. The browser will jump to the System Settings APP, please enable the relevant permissions!
-	 *       // Available in Windows and MacOS.
-	 *       error.handler();
-	 *     }
-	 *    })
-	 *   ```
-	 * @since v5.2.0
-	 * @readonly
-	 * @memberof RtcError
-	 */
-  handler?: () => void;
-  originError?: Error | DOMException | RtcError;
-  constructor({ code, extraCode, message, messageParams, fnName, originError }: RTCErrorParams);
-  static convertFrom(originError: Error, fnName?: string, fnParams?: any): RtcError;
-}
-
-export declare enum LOG_LEVEL {
-	/**
-	 * 输出所有日志
-	 */
-	TRACE = 0,
-	/**
-	 * 输出 DEBUG、INFO、WARN、ERROR 等级日志
-	 */
-	DEBUG = 1,
-	/**
-	 * 输出 INFO、WARN、ERROR 等级日志
-	 */
-	INFO = 2,
-	/**
-	 * 输出 WARN、ERROR 等级日志
-	 */
-	WARN = 3,
-	/**
-	 * 输出 ERROR 等级日志
-	 */
-	ERROR = 4,
-	/**
-	 * 不输出任何日志
-	 */
-	NONE = 5
-}
-export declare const audioProfileMap: {
-	readonly standard: {
-		readonly sampleRate: 48000;
-		readonly channelCount: 1;
-		readonly bitrate: 40;
-	};
-	readonly 'standard-stereo': {
-		readonly sampleRate: 48000;
-		readonly channelCount: 2;
-		readonly bitrate: 64;
-	};
-	readonly high: {
-		readonly sampleRate: 48000;
-		readonly channelCount: 1;
-		readonly bitrate: 192;
-	};
-	readonly 'high-stereo': {
-		readonly sampleRate: 48000;
-		readonly channelCount: 2;
-		readonly bitrate: 192;
-	};
-};
-export declare const videoProfileMap: {
-	readonly '120p': {
-		readonly width: 160;
-		readonly height: 120;
-		readonly frameRate: 15;
-		readonly bitrate: 200;
-	};
-	readonly '180p': {
-		readonly width: 320;
-		readonly height: 180;
-		readonly frameRate: 15;
-		readonly bitrate: 350;
-	};
-	readonly '240p': {
-		readonly width: 320;
-		readonly height: 240;
-		readonly frameRate: 15;
-		readonly bitrate: 400;
-	};
-	readonly '360p': {
-		readonly width: 640;
-		readonly height: 360;
-		readonly frameRate: 15;
-		readonly bitrate: 800;
-	};
-	readonly '480p': {
-		readonly width: 640;
-		readonly height: 480;
-		readonly frameRate: 15;
-		readonly bitrate: 900;
-	};
-	readonly '720p': {
-		readonly width: 1280;
-		readonly height: 720;
-		readonly frameRate: 15;
-		readonly bitrate: 1500;
-	};
-	readonly '1080p': {
-		readonly width: 1920;
-		readonly height: 1080;
-		readonly frameRate: 15;
-		readonly bitrate: 2000;
-	};
-	readonly '1440p': {
-		readonly width: 2560;
-		readonly height: 1440;
-		readonly frameRate: 30;
-		readonly bitrate: 4860;
-	};
-	readonly '4K': {
-		readonly width: 3840;
-		readonly height: 2160;
-		readonly frameRate: 30;
-		readonly bitrate: 9000;
-	};
-};
-export declare const screenProfileMap: {
-	readonly '480p': {
-		readonly width: 640;
-		readonly height: 480;
-		readonly frameRate: 5;
-		readonly bitrate: 900;
-	};
-	readonly '480p_2': {
-		readonly width: 640;
-		readonly height: 480;
-		readonly frameRate: 30;
-		readonly bitrate: 1000;
-	};
-	readonly '720p': {
-		readonly width: 1280;
-		readonly height: 720;
-		readonly frameRate: 5;
-		readonly bitrate: 1200;
-	};
-	readonly '720p_2': {
-		readonly width: 1280;
-		readonly height: 720;
-		readonly frameRate: 30;
-		readonly bitrate: 3000;
-	};
-	readonly '1080p': {
-		readonly width: 1920;
-		readonly height: 1080;
-		readonly frameRate: 5;
-		readonly bitrate: 1600;
-	};
-	readonly '1080p_2': {
-		readonly width: 1920;
-		readonly height: 1080;
-		readonly frameRate: 30;
-		readonly bitrate: 4000;
-	};
-};
-export declare const enum Scene {
-	LIVE = 'live',
-	RTC = 'rtc'
-}
-
-export declare const enum NetworkQualityValue {
-	UNKNOWN,
-	EXCELLENT,
-	GOOD,
-	POOR,
-	BAD,
-	VERY_BAD,
-	DISCONNECTED
-}
-
-export declare const enum PlayerState {
-	PAUSED = 'PAUSED',
-	PLAYING = 'PLAYING',
-	STOPPED = 'STOPPED'
-}
-export declare const enum UserRole {
-	ANCHOR = 'anchor',
-	AUDIENCE = 'audience'
-}
-export declare const enum ConnectionState {
-	CONNECTED = 'CONNECTED',
-	DISCONNECTED = 'DISCONNECTED',
-	CONNECTING = 'CONNECTING',
-	RECONNECTED = 'RECONNECTED',
-	RECONNECTING = 'RECONNECTING'
-}
-export declare interface PingResult {
-  domain: string;
-  cost: number;
-}
-export declare interface PingResults {
-  isPoorNetwork?: boolean;
-  timestamp?: number;
-  data?: PingResult[];
-}
-export declare interface NetworkQuality {
-	uplinkNetworkQuality: NetworkQualityValue;
-	downlinkNetworkQuality: NetworkQualityValue;
-	uplinkRTT: number;
-	uplinkLoss: number;
-	downlinkRTT: number;
-	downlinkLoss: number;
-	pingResults?: PingResults;
-}
-export declare const enum BannedReason {
-	BANNED = 'banned',
-	KICK = 'kick',
-	USER_TIME_OUT = 'user_time_out',
-	ROOM_DISBAND = 'room_disband'
-}
-
-export declare type PluginWithAssets = {
-	plugin: TRTCPlugin;
-	assetsPath?: string;
-};
-export declare interface TRTCOptions {
-	plugins?: Array<TRTCPlugin>;
-	enableSEI?: boolean;
-	assetsPath?: string;
-}
-export interface VideoProfile { width: number, height: number, frameRate: number, bitrate: number; }
-export interface AudioProfile { sampleRate: number, channelCount: number, bitrate: number; }
-export declare interface LocalVideoConfig {
-	view?: string | HTMLElement | HTMLElement[] | null;
-	publish?: boolean;
-	mute?: boolean | string;
-	option?: {
-		cameraId?: string;
-		useFrontCamera?: boolean;
-		profile?: keyof typeof videoProfileMap | VideoProfile;
-		fillMode?: 'contain' | 'cover' | 'fill';
-		mirror?: boolean | string;
-		small?: keyof typeof videoProfileMap | VideoProfile | boolean;
-		qosPreference?: typeof TRTCType.QOS_PREFERENCE_SMOOTH | typeof TRTCType.QOS_PREFERENCE_CLEAR;
-		videoTrack?: MediaStreamTrack;
-	};
-}
-export interface TurnServerOptions {
-  url: string;
-  username?: string;
-  credential?: string;
-  credentialType?: 'password';
-}
-export declare interface ProxyServer {
-	websocketProxy?: string;
-	loggerProxy?: string;
-	turnServer?: TurnServerOptions | TurnServerOptions[];
-	iceTransportPolicy?: RTCIceTransportPolicy;
-	webtransportProxy?: string;
-	scheduleProxy?: string;
-	unifiedProxy?: string;
-}
-export declare interface EnterRoomConfig {
-	sdkAppId: number;
-	userId: string;
-	userSig: string;
-	roomId?: number;
-	strRoomId?: string;
-	role?: UserRole;
-	autoReceiveAudio?: boolean;
-	autoReceiveVideo?: boolean;
-	privateMapKey?: string;
-	latencyLevel?: number;
-	businessInfo?: string;
-	enableAutoPlayDialog?: boolean;
-	proxy?: ProxyServer | string;
-	scene?: Scene;
-	userDefineRecordId?: string;
-}
-export declare interface ScreenShareConfig {
-	view?: string | HTMLElement | HTMLElement[] | null;
-	publish?: boolean;
-	option?: {
-		profile?: keyof typeof screenProfileMap | VideoProfile;
-		fillMode?: 'contain' | 'cover' | 'fill';
-		systemAudio?: boolean;
-		echoCancellation?: boolean;
-		autoGainControl?: boolean;
-		noiseSuppression?: boolean;
-		audioTrack?: MediaStreamTrack;
-		videoTrack?: MediaStreamTrack;
-		captureElement?: HTMLElement;
-		preferDisplaySurface?: 'current-tab' | 'tab' | 'window' | 'monitor';
-		qosPreference?: typeof TRTCType.QOS_PREFERENCE_SMOOTH | typeof TRTCType.QOS_PREFERENCE_CLEAR;
-	};
-}
-export declare interface UpdateScreenShareConfig extends ScreenShareConfig {
-	option?: {
-		fillMode?: 'contain' | 'cover' | 'fill';
-		qosPreference?: typeof TRTCType.QOS_PREFERENCE_SMOOTH | typeof TRTCType.QOS_PREFERENCE_CLEAR;
-	};
-}
-export declare interface RemoteVideoConfig {
-	view?: string | HTMLElement | HTMLElement[] | null;
-	userId: string;
-	streamType: TRTCStreamType;
-	option?: {
-		fillMode?: 'contain' | 'cover' | 'fill';
-		mirror?: boolean;
-		small?: boolean;
-		receiveWhenViewVisible?: boolean;
-		viewRoot?: HTMLElement;
-		canvasRender?: boolean;
-	};
-}
-export declare interface StopRemoteVideoConfig {
-	userId: string;
-	streamType?: TRTCStreamType;
-}
-export declare interface LocalAudioConfig {
-	publish?: boolean;
-	mute?: boolean;
-	option?: {
-		microphoneId?: string;
-		profile?: keyof typeof audioProfileMap;
-		audioTrack?: MediaStreamTrack;
-		captureVolume?: number;
-		earMonitorVolume?: number;
-		echoCancellation?: boolean;
-		autoGainControl?: boolean;
-		noiseSuppression?: boolean;
-	};
-}
-export declare interface UpdateLocalAudioConfig extends LocalAudioConfig {
-	mute?: boolean;
-	option?: {
-		microphoneId?: string;
-		audioTrack?: MediaStreamTrack;
-		captureVolume?: number;
-		earMonitorVolume?: number;
-		echoCancellation?: boolean;
-		autoGainControl?: boolean;
-		noiseSuppression?: boolean;
-	};
-}
-export declare interface RemoteAudioConfig {
-	userId: string;
-	option?: {
-		volume?: number;
-	};
-}
-export declare interface StopRemoteAudioConfig {
-	userId: string;
-}
-export declare const enum TRTCStreamType {
-	Main = 'main',
-	Sub = 'sub'
-}
-export declare enum TRTCDeviceType {
-	Camera = 'camera',
-	Microphone = 'microphone',
-	Speaker = 'speaker'
-}
-export declare enum TRTCDeviceAction {
-	Remove = 'remove',
-	Add = 'add',
-	Active = 'active'
-}
-export declare interface RTCErrorParams {
-	code: number;
-	extraCode?: number;
-	functionName?: string;
-	fnName?: string;
-	message?: string;
-	messageParams?: any;
-	originError?: Error | DOMException;
-}
-export declare interface RTCErrorInterface {
-	readonly name: string;
-	readonly code: number;
-	readonly extraCode?: number;
-	readonly functionName?: string;
-	readonly message?: string;
-	readonly originError?: Error | DOMException;
-}
-/**
- * **TRTC Constants**<br>
- * @module TYPE
- * @example
- * // Usage:
- * TRTC.TYPE.SCENE_LIVE
- */
-export declare const TRTCType: {
-	/**
-		 * Live streaming scene
-		 * @default 'live'
-		 * @memberof module:TYPE
-		 */
-	readonly SCENE_LIVE: Scene.LIVE;
-	/**
-		 * RTC scene
-		 * @default 'rtc'
-		 * @memberof module:TYPE
-		*/
-	readonly SCENE_RTC: Scene.RTC;
-	/**
-		 * Anchor role
-		 * @default 'anchor'
-		 * @memberof module:TYPE
-		 */
-	readonly ROLE_ANCHOR: UserRole.ANCHOR;
-	/**
-		 * Audience role
-		 * @default 'audience'
-		 * @memberof module:TYPE
-		 */
-	readonly ROLE_AUDIENCE: UserRole.AUDIENCE;
-	/**
-		 * Main stream
-		 *
-		 * - TRTC has a main video stream (main stream) and an sub video stream (sub stream)
-		 * - The camera is published through the main stream, and the screen sharing is published through the sub stream.
-		 * - The main video stream includes: high-definition large picture and low-definition small picture. By default, {@link TRTC#startRemoteVideo TRTC.startRemoteVideo} plays the high-definition large picture, and the low-definition small picture can be played through the small parameter. Refer to: [Enable small stream function](./tutorial-27-advanced-small-stream.html).
-		 * @default 'main'
-		 * @memberof module:TYPE
-		 */
-	readonly STREAM_TYPE_MAIN: TRTCStreamType.Main;
-	/**
-		 * Sub stream
-		 * @default 'sub'
-		 * @memberof module:TYPE
-		 */
-	readonly STREAM_TYPE_SUB: TRTCStreamType.Sub;
-	/**
-		 * Standard audio quality
-		* | Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
-		* | :---        | :---  | :--- | :---       |
-		* | TRTC.TYPE.AUDIO_PROFILE_STANDARD    | 48000 | Mono| 40         |
-		* | TRTC.TYPE.AUDIO_PROFILE_HIGH        | 48000 | Mono| 128        |
-		* | TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo| 64        |
-		* | TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo| 192        |
-		* @default 'standard'
-		* @memberof module:TYPE
-		*/
-	readonly AUDIO_PROFILE_STANDARD: 'standard';
-	/**
-		 * Standard stereo audio quality
-	 * | Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
-		* | :---        | :---  | :--- | :---       |
-		* | TRTC.TYPE.AUDIO_PROFILE_STANDARD    | 48000 | Mono| 40         |
-		* | TRTC.TYPE.AUDIO_PROFILE_HIGH        | 48000 | Mono| 128        |
-		* | TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo| 64        |
-		* | TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo| 192        |
-		* @default 'standard-stereo'
-		* @memberof module:TYPE
-		*/
-	readonly AUDIO_PROFILE_STANDARD_STEREO: 'standard-stereo';
-	/**
-		 * High audio quality
-		 * | Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
-		 * | :---        | :---  | :--- | :---       |
-		 * | TRTC.TYPE.AUDIO_PROFILE_STANDARD    | 48000 | Mono| 40         |
-		 * | TRTC.TYPE.AUDIO_PROFILE_HIGH        | 48000 | Mono| 128        |
-		 * | TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo| 64        |
-		 * | TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo| 192        |
-		* @default 'high'
-		* @memberof module:TYPE
-		*/
-	readonly AUDIO_PROFILE_HIGH: 'high';
-	/**
-		 * High-quality stereo audio
-		 * | Audio Profile | Sampling Rate | Channel | Bitrate (kbps) |
-		 * | :---        | :---  | :--- | :---       |
-		 * | TRTC.TYPE.AUDIO_PROFILE_STANDARD    | 48000 | Mono| 40         |
-		 * | TRTC.TYPE.AUDIO_PROFILE_HIGH        | 48000 | Mono| 128        |
-		 * | TRTC.TYPE.AUDIO_PROFILE_STANDARD_STEREO | 48000 | Stereo| 64        |
-		 * | TRTC.TYPE.AUDIO_PROFILE_HIGH_STEREO | 48000 | Stereo| 192        |
-		 * @default 'high-stereo'
-
-		* @memberof module:TYPE
-		*/
-	readonly AUDIO_PROFILE_HIGH_STEREO: 'high-stereo';
-	/**
-	 * When the network is weak, the video encoding strategy takes 'smooth' first, i.e., the priority is to preserve frame rate.
-	 * <br>
-	 * Default 'smooth' first for camera, 'default' clear first for screen sharing
-	* @default 'smooth'
-	* @memberof module:TYPE
-	*/
-	readonly QOS_PREFERENCE_SMOOTH: 'smooth';
-	/**
-	 * When the network is weak, the video encoding strategy takes 'clear' first, i.e., the priority is to preserve resolution.
-	 * <br>
-	 * Default 'smooth' first for camera, 'default' clear first for screen sharing
-	* @default 'clear'
-	* @memberof module:TYPE
-	*/
-	readonly QOS_PREFERENCE_CLEAR: 'clear';
-};
-export declare interface AudioMixerOptions {
-	id: string;
-	url: string;
-	loop?: boolean;
-	volume?: number;
-}
-export declare interface UpdateAudioMixerOptions {
-	id: string;
-	loop?: boolean;
-	volume?: number;
-	seekFrom?: number;
-	operation?: 'pause' | 'resume' | 'stop';
-}
-export declare interface StopAudioMixerOptions {
-	id: string;
-}
-export declare interface AIDenoiserOptions {
-	assetsPath: string;
-	sdkAppId: number;
-	userId: string;
-	userSig: string;
-}
-
-export declare interface TRTCStatistics {
-	rtt: number;
-	downLoss: number;
-	upLoss: number;
-	bytesSent: number;
-	bytesReceived: number;
-	localStatistics: LocalStatistic;
-	remoteStatistics: RemoteStatistic[];
-}
-export declare interface LocalStatistic {
-	audio: {
-		bitrate: number;
-		audioLevel: number;
-	};
-	video: {
-		width: number;
-		height: number;
-		frameRate: number;
-		bitrate: number;
-		videoType: TRTCVideoType;
-	}[];
-}
-export declare enum TRTCVideoType {
-	Big = 'big',
-	Small = 'small',
-	Sub = 'sub'
-}
-export declare interface RemoteStatistic {
-	audio: {
-		bitrate: number;
-		audioLevel: number;
-	};
-	video: {
-		width: number;
-		height: number;
-		frameRate: number;
-		bitrate: number;
-		videoType: TRTCVideoType;
-	}[];
-	userId: string;
-}
-export declare interface VideoFrameConfig {
-	userId?: string;
-	streamType?: TRTCStreamType;
-}
-export declare enum AutoStartPluginName {
-	Debug = 'Debug'
-}
-
-/**
- * @typedef TRTCStatistics TRTC statistics
- * @property {number} rtt The round-trip time from SDK to TRTC server(SDK -> TRTC server -> SDK). Unit: ms.
- * @property {number} upLoss Uplink loss rate from SDK to TRTC server. Unit: %
- * @property {number} downLoss Downlink loss rate from TRTC server to SDK. Unit: %
- * @property {number} bytesSent Total bytes sent, including signaling data and media data. Unit: bytes.
- * @property {number} bytesReceived Total bytes received, including signaling data and media data. Unit: bytes.
- * @property {TRTCLocalStatistics} localStatistics Local statistics.
- * @property {TRTCRemoteStatistics[]} remoteStatistics Remote statistics.
- */
-/**
- * Local statistics
- * @typedef TRTCLocalStatistics
- * @property {TRTCAudioStatistic} audio Local audio statistics
- * @property {TRTCVideoStatistic[]} video Local video statistics
- */
-/**
- * Remote statistics.
- * @typedef TRTCRemoteStatistics
- * @property {string} userId The userId of remote user
- * @property {TRTCAudioStatistic} audio Remote audio statistics
- * @property {TRTCVideoStatistic[]} video Remote video statistics
- */
-/**
- * Audio statistics
- * @typedef TRTCAudioStatistic
- * @property {number} bitrate Audio bitrate. Unit: kbps
- * @property {number} audioLevel Audio level. Value: float from 0 to 1.
- */
-/** Video statistics
- * @typedef TRTCVideoStatistic
- * @property {number} bitrate Video bitrate. Unit: kbps
- * @property {number} width Video width
- * @property {number} height Video height
- * @property {number} frameRate Video frameRate
- * @property {'big'|'small'|'sub'} videoType Video type: big, small, sub.
- */
-/**
- * **TRTC Event List**<br>
- * <br>
- * Listen to specific events through {@link TRTC#on trtc.on(TRTC.EVENT.XXX)}. You can use these events to manage the room user list, manage user stream state, and perceive network state. The following is a detailed introduction to the events.
- * > !
- * > - Events need to be listened to before they are triggered, so that you can receive the corresponding event notifications. Therefore, it is recommended to complete event listening before entering the room, so as to ensure that no event notifications are missed.
- * @module EVENT
- * @example
- * // Usage:
- * trtc.on(TRTC.EVENT.ERROR, () => {});
- */
-export declare const TRTCEvent: {
-	/**
-	 * Error event, non-API call error, SDK throws when an unrecoverable error occurs during operation.
-	 *
-	 * - Error code (error.code): {@link module:ERROR_CODE.OPERATION_FAILED ErrorCode.OPERATION_FAILED}
-	 * - Possible extended error codes (error.extraCode): 5501, 5502
-	 * @default 'error'
-	 * @memberof module:EVENT
-	 * @see {@link RtcError RtcError}
-	 * @e
-	 * @example
-	 *
-	 * trtc.on(TRTC.EVENT.ERROR, error => {
-	 *   console.error('trtc error observed: ' + error);
-	 *   const errorCode = error.code;
-	 *   const extraCode = error.extraCode;
-	 * });
-	 */
-	readonly ERROR: 'error';
-	/**
-		 * @description Automatic playback failed, refer to {@tutorial 21-advanced-auto-play-policy}
-		 * @default 'autoplay-failed'
-		 * @memberof module:EVENT
-		 * @example
-		 * trtc.on(TRTC.EVENT.AUTOPLAY_FAILED, event => {
-		 *   // Guide user to click the page, SDK will resume playback automatically when user click the page.
-		 *   // Since v5.1.3+, you can get userId on this event.
-		 *   console.log(event.userId);
-		 * });
-		 */
-	readonly AUTOPLAY_FAILED: 'autoplay-failed';
-	/**
-	 * @description Kicked out of the room for some reason, including:<br>
-	 * - kick: The same user with same userId enters same room. The user who enters the room first will be kicked out of the room by the user who enters later.
-	 *   - Entering a room with the same userId is not allowed behavior, which may lead to abnormal audio/video calls between the two parties, and should be avoided on the business side.
-	 *   - Users with the same userId who enter the same room with the same audience role may not receive this event.
-	 * - banned: kicked out by the administrator using [Server API - RemoveUser](https://trtc.io/document/34267/34268).
-	 * - room_disband: kicked out by the administrator using [Server API - DismissRoom](https://trtc.io/document/34267/34269).
-	 * @default 'kicked-out'
-	 * @memberof module:EVENT
-	 * @example
-	 *
-	 * trtc.on(TRTC.EVENT.KICKED_OUT, event => {
-	 *   console.log(event.reason)
-	 * });
-	 */
-	readonly KICKED_OUT: 'kicked-out';
-	/**
-	 * Remote user enters the room event.
-	 *
-	 * - In `rtc` mode, all users will receive the notification of entering and exiting the room of the other user.
-	 * - In `live` mode, only the anchor has the notification of entering and exiting the room, and the audience does not have the notification of entering and exiting the room. The audience can receive the notification of entering and exiting the room of the anchor.
-	 * @default 'remote-user-enter'
-	 * @memberof module:EVENT
-	 * @example
-	 *
-	 * trtc.on(TRTC.EVENT.REMOTE_USER_ENTER, event => {
-	 *   const userId = event.userId;
-	 * });
-	 */
-	readonly REMOTE_USER_ENTER: 'remote-user-enter';
-	/**
-	 * Remote user exits the room event.
-	 *
-	 * - In `rtc` mode, all users will receive the notification of entering and exiting the room of the other user.
-	 * - In `live` mode, only the anchor has the notification of entering and exiting the room, and the audience does not have the notification of entering and exiting the room. The audience can receive the notification of entering and exiting the room of the anchor.
-	 * @default 'remote-user-exit'
-	 * @memberof module:EVENT
-	 * @example
-	 *
-	 * trtc.on(TRTC.EVENT.REMOTE_USER_EXIT, event => {
-	 *   const userId = event.userId;
-	 * });
-	 */
-	readonly REMOTE_USER_EXIT: 'remote-user-exit';
-	/**
-	 * Remote user publishes audio. You will receive this notification when the remote user turns on the microphone. Refer to: [Turn on/off camera and microphone](./tutorial-15-basic-dynamic-add-video.html)
-	 *
-	 * - By default, the SDK automatically plays remote audio, and you do not need to call the API to play remote audio. You can listen for this event and {@link module:EVENT.REMOTE_AUDIO_UNAVAILABLE REMOTE_AUDIO_UNAVAILABLE} to update the UI icon for "whether the remote microphone is turned on".
-	 * - Note: If the user has not interacted with the page before entering the room, automatic audio playback may fail due to the [browser's automatic playback policy restrictions](./tutorial-21-advanced-auto-play-policy.html). You need to refer to the [suggestions for handling automatic playback restrictions](./tutorial-21-advanced-auto-play-policy.html) for processing.
-	 * - If you do not want the SDK to automatically play audio, you can set `autoReceiveAudio` to `false` to turn off automatic audio playback when calling {@link TRTC#enterRoom trtc.enterRoom()}.
-	 * - Listen for the {@link module:EVENT.REMOTE_AUDIO_AVAILABLE TRTC.EVENT.REMOTE_AUDIO_AVAILABLE} event, record the userId with remote audio, and call the {@link TRTC#muteRemoteAudio trtc.muteRemoteAudio(userId, false)} method when you need to play audio.
-	 * @default 'remote-audio-available'
-	 * @memberof module:EVENT
-	 * @example
-	 * // Listen before entering the room
-	 * trtc.on(TRTC.EVENT.REMOTE_AUDIO_AVAILABLE, event => {
-	 *   const userId = event.userId;
-	 * });
-	 */
-	readonly REMOTE_AUDIO_AVAILABLE: 'remote-audio-available';
-	/**
-	 * Remote user stops publishing audio. You will receive this notification when the remote user turns off the microphone.
-	 *
-	 * @default 'remote-audio-unavailable'
-	 * @memberof module:EVENT
-	 * @example
-	 * // Listen before entering the room
-	 * trtc.on(TRTC.EVENT.REMOTE_AUDIO_UNAVAILABLE, event => {
-	 *   const userId = event.userId;
-	 *
-	 * });
-	 */
-	readonly REMOTE_AUDIO_UNAVAILABLE: 'remote-audio-unavailable';
-	/**
-	 * Remote user publishes video. You will receive this notification when the remote user turns on the camera. Refer to: [Turn on/off camera and microphone](./tutorial-15-basic-dynamic-add-video.html)
-	 *
-	 * - You can listen for this event and {@link module:EVENT.REMOTE_VIDEO_UNAVAILABLE REMOTE_VIDEO_UNAVAILABLE} to update the UI icon for "whether the remote camera is turned on".
-	 * @see {@link module:TYPE.STREAM_TYPE_MAIN STREAM_TYPE_MAIN}
-	 * @see {@link module:TYPE.STREAM_TYPE_SUB STREAM_TYPE_SUB}
-	 * @default 'remote-video-available'
-	 * @memberof module:EVENT
-	 * @example
-	 * // Listen before entering the room
-	 * trtc.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE, event => {
-	 *   const userId = event.userId;
-	 *   const streamType = event.streamType;
-	 *   trtc.startRemoteVideo({userId, streamType, view});
-	 * });
-	 */
-	readonly REMOTE_VIDEO_AVAILABLE: 'remote-video-available';
-	/**
-	 * Remote user stops publishing video. You will receive this notification when the remote user turns off the camera.
-	 * @default 'remote-video-unavailable'
-	 * @memberof module:EVENT
-	 * @example
-	 * // Listen before entering the room
-	 * trtc.on(TRTC.EVENT.REMOTE_VIDEO_UNAVAILABLE, event => {
-	 *   const userId = event.userId;
-	 *   const streamType = event.streamType;
-	 *   // At this point, the SDK will automatically stop playing, and there is no need to call stopRemoteVideo.
-	 * });
-	 */
-	readonly REMOTE_VIDEO_UNAVAILABLE: 'remote-video-unavailable';
-	/**
-	 * @description Volume event<br>
-	 * After calling the {@link TRTC#enableAudioVolumeEvaluation enableAudioVolumeEvaluation} interface to enable the volume callback, the SDK will throw this event regularly to notify the volume of each userId.<br>
-	 * **Note**
-	 * - The callback contains the volume of the local microphone and the volume of the remote user. The callback will be triggered regardless of whether anyone is speaking.
-	 * - The event.result will be sorted from large to small according to the volume size.
-	 * - When userId is an empty string, it represents the volume of the local microphone.
-	 * - volume is a positive integer with a value of 0-100.
-	 * @default 'audio-volume'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.AUDIO_VOLUME, event => {
-	 *    event.result.forEach(({ userId, volume }) => {
-	 *        const isMe = userId === ''; // When userId is an empty string, it represents the volume of the local microphone.
-	 *        if (isMe) {
-	 *            console.log(`my volume: ${volume}`);
-	 *        } else {
-	 *            console.log(`user: ${userId} volume: ${volume}`);
-	 *        }
-	 *    })
-	 * });
-	 *
-	 * // Enable volume callback and trigger the event every 1000ms
-	 * trtc.enableAudioVolumeEvaluation(1000);
-	 */
-	readonly AUDIO_VOLUME: 'audio-volume';
-	/**
-	 * @description Network quality statistics data event, which starts to be counted after entering the room and triggers every two seconds. This data reflects the network quality of your local uplink and downlink.
-	 * - The uplink network quality (uplinkNetworkQuality) refers to the network situation of uploading local streams (uplink connection network quality from SDK to Tencent Cloud)
-	 * - The downlink network quality (downlinkNetworkQuality) refers to the average network situation of downloading all streams (average network quality of all downlink connections from Tencent Cloud to SDK)
-	 *
-	 *    The enumeration values and meanings are shown in the following table:
-	 *    | Value | Meaning |
-	 *    | :--- | :---- |
-	 *    | 0 | Network state is unknown, indicating that the current trtc instance has not established an uplink/downlink connection |
-	 *    | 1 | Network state is excellent |
-	 *    | 2 | Network state is good |
-	 *    | 3 | Network state is average |
-	 *    | 4 | Network state is poor |
-	 *    | 5 | Network state is very poor |
-	 *    | 6 | Network connection is disconnected<br/>Note: If the downlink network quality is this value, it means that all downlink connections have been disconnected |
-	 * - uplinkRTT, uplinkLoss are the uplink RTT (ms) and uplink packet loss rate.
-	 * - downlinkRTT, downlinkLoss are the average RTT (ms) and average packet loss rate of all downlink connections.
-	 *
-	 * **Note**
-	 * - If you want to know the uplink and downlink network conditions of the other party, you need to broadcast the other party's network quality through IM.
-	 *
-	 * @default 'network-quality'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.NETWORK_QUALITY, event => {
-	 *    console.log(`network-quality, uplinkNetworkQuality:${event.uplinkNetworkQuality}, downlinkNetworkQuality: ${event.downlinkNetworkQuality}`)
-	 *    console.log(`uplink rtt:${event.uplinkRTT} loss:${event.uplinkLoss}`)
-	 *    console.log(`downlink rtt:${event.downlinkRTT} loss:${event.downlinkLoss}`)
-	 * })
-	 */
-	readonly NETWORK_QUALITY: 'network-quality';
-	/**
-	 * @description SDK and Tencent Cloud connection state change event, you can use this event to listen to the overall connection state of the SDK and Tencent Cloud.<br>
-	 * - 'DISCONNECTED': Connection disconnected
-	 * - 'CONNECTING': Connecting
-	 * - 'CONNECTED': Connected
-	 *
-	 * Meanings of different state changes:
-	 *
-	 * - DISCONNECTED -> CONNECTING: Trying to establish a connection, triggered when calling the enter room interface or when the SDK automatically reconnects.
-	 * - CONNECTING -> DISCONNECTED: Connection establishment failed, triggered when calling the exit room interface to interrupt the connection or when the connection fails after SDK retries.
-	 * - CONNECTING -> CONNECTED: Connection established successfully, triggered when the connection is successful.
-	 * - CONNECTED -> DISCONNECTED: Connection interrupted, triggered when calling the exit room interface or when the connection is disconnected due to network anomalies.
-	 *
-	 * Suggestion: You can listen to this event and display different UIs in different states to remind users of the current connection state.
-	 *
-	 * @default 'connection-state-changed'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.CONNECTION_STATE_CHANGED, event => {
-	 *   const prevState = event.prevState;
-	 *   const curState = event.state;
-	 * });
-	 */
-	readonly CONNECTION_STATE_CHANGED: 'connection-state-changed';
-	/**
-	 * @description Audio playback state change event
-	 *
-	 * event.userId When userId is an empty string, it represents the local user, and when it is a non-empty string, it represents a remote user.
-	 *
-	 * event.state The value is as follows:
-	 * - 'PLAYING': start playing
-	 *   - event.reason is 'playing' or 'unmute'.
-	 * - 'PAUSED': pause playback
-	 *   - When event.reason is 'pause', it is triggered by the pause event of the \<audio\> element. The following situations will trigger:
-	 *      - Call the HTMLMediaElement.pause interface.
-	 *   - When event.reason is 'mute'. See event {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/mute_event | MediaStreamTrack.mute_event}
-	 *      - When userId is oneself, this event is triggered, indicating that audio collection is paused, usually caused by device abnormalities, such as being preempted by other applications on the device, at this time, the user needs to be guided to recollect.
-	 *      - When userId is others, this event is triggered, indicating that the received audio data is not enough to play. Usually caused by network jitter, no processing is required on the access side. When the received data is sufficient to play, it will automatically resume.
-	 * - 'STOPPED': stop playing
-	 *   - event.reason is 'ended'.
-	 *
-	 * event.reason The reason for the state change, the value is as follows:
-	 * - 'playing': start playing, see event {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playing_event | HTMLMediaElement.playing_event}
-	 * - 'mute': The audio track cannot provide data temporarily, see event {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/mute_event | MediaStreamTrack.mute_event}
-	 * - 'unmute': The audio track resumes providing data, see event {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/unmute_event | MediaStreamTrack.unmute_event}
-	 * - 'ended': The audio track has been closed
-	 * - 'pause': Playback paused
-	 * @default 'audio-play-state-changed'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.AUDIO_PLAY_STATE_CHANGED, event => {
-	 *   console.log(`${event.userId} player is ${event.state} because of ${event.reason}`);
-	 * });
-	 */
-	readonly AUDIO_PLAY_STATE_CHANGED: 'audio-play-state-changed';
-	/**
-	 * @description Video playback state change event
-	 *
-	 * event.userId When userId is an empty string, it represents the local user, and when it is a non-empty string, it represents a remote user.
-	 *
-	 * event.streamType Stream type, value: {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN} {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}
-	 *
-	 * event.state The value is as follows:
-	 * - 'PLAYING': start playing
-	 *   - event.reason is 'playing' or 'unmute'.
-	 * - 'PAUSED': pause playback
-	 *   - When event.reason is 'pause', it is triggered by the pause event of the \<video\> element. The following situations will trigger:
-	 *      - Call the HTMLMediaElement.pause interface.
-	 *      - After successful playback, the view container for playing the video is removed from the DOM.
-	 *   - When event.reason is 'mute'. See event {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/mute_event | MediaStreamTrack.mute_event}
-	 *      - When userId is oneself, this event is triggered, indicating that video collection is paused, usually caused by device abnormalities, such as being preempted by other applications on the device, at this time, the user needs to be guided to recollect.
-	 *      - When userId is others, this event is triggered, indicating that the received video data is not enough to play. Usually caused by network jitter, no processing is required on the access side. When the received data is sufficient to play, it will automatically resume.
-	 * - 'STOPPED': stop playing
-	 *   - event.reason is 'ended'.
-	 *
-	 * event.reason The reason for the state change, the value is as follows:
-	 * - 'playing': start playing, see event {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playing_event | HTMLMediaElement.playing_event}
-	 * - 'mute': The video track cannot provide data temporarily, see event {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/mute_event | MediaStreamTrack.mute_event}
-	 * - 'unmute': The video track resumes providing data, see event {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaStreamTrack/unmute_event | MediaStreamTrack.unmute_event}
-	 * - 'ended': The video track has been closed
-	 * - 'pause': Playback paused
-	 * @default 'video-play-state-changed'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.VIDEO_PLAY_STATE_CHANGED, event => {
-	 *   console.log(`${event.userId} ${event.streamType} video player is ${event.state} because of ${event.reason}`);
-	 * });
-	 */
-	readonly VIDEO_PLAY_STATE_CHANGED: 'video-play-state-changed';
-	/**
-	 * @description Notification event for local screen sharing stop, only valid for local screen sharing streams.
-	 * @default 'screen-share-stopped'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.SCREEN_SHARE_STOPPED, () => {
-	 *   console.log('screen sharing was stopped');
-	 * });
-	 */
-	readonly SCREEN_SHARE_STOPPED: 'screen-share-stopped';
-	/**
-	 * @description Notification event for device changes such as camera and microphone.
-	 * - event.device is a [MediaDeviceInfo](https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo) object with properties:
-	 *    - deviceId: device ID
-	 *    - label: device description information
-	 *    - groupId: device group ID
-	 * - event.type value: `'camera'|'microphone'|'speaker'`
-	 * - event.action value:
-	 *    - 'add' device has been added.
-	 *    - 'remove' device has been removed.
-	 *    - 'active' device has been activated, for example: after startLocalVideo is successful, this event will be triggered.
-	 * @default 'device-changed'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.DEVICE_CHANGED, (event) => {
-	 *   console.log(`${event.type}(${event.device.label}) ${event.action}`);
-	 * });
-	 */
-	readonly DEVICE_CHANGED: 'device-changed';
-	/**
-	 * @description Publish state change event.
-	 * - event.mediaType media type, value: `'audio'|'video'|'screen'`.
-	 * - event.state current publish state, value:
-	 *    - `'starting'` trying to publish stream
-	 *    - `'started'` publish stream succeeded
-	 *    - `'stopped'` publish stream stopped, see event.reason field for the reason
-	 * - event.prevState the publish state at the last event trigger, with the same type as event.state.
-	 * - event.reason the reason for the publish state to become `'stopped'`, value:
-	 *    - `'timeout'` publish stream timeout, usually caused by network jitter or firewall interception. The SDK will keep retrying, and the business side can guide the user to check the network or change the network at this time.
-	 *    - `'error'` publish stream error, at this time, you can get the specific error information from event.error, usually caused by the browser not supporting H264 encoding.
-	 *    - `'api-call'` publish stream stopped due to business side API call, for example, stopLocalVideo was called to stop the publish stream before startLocalVideo was successful, which is a normal behavior and the business side does not need to pay attention to it.
-	 * - event.error error information when event.reason is `'error'`.
-	 * @default 'publish-state-changed'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.PUBLISH_STATE_CHANGED, (event) => {
-	 *   console.log(`${event.mediaType} ${event.state} ${event.reason}`);
-	 * });
-	 */
-	readonly PUBLISH_STATE_CHANGED: 'publish-state-changed';
-	/**
-	 * @since v5.3.0
-	 * @description a new MediaStreamTrack object received.
-	 * @default 'track'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.TRACK, event => {
-	 *   // userId === '' means event.track is a local track, otherwise it's a remote track
-	 *   const isLocal = event.userId === '';
-	 *   // Usually the sub stream is a screen-sharing video stream.
-	 *   const isSubStream = event.streamType === TRTC.TYPE.STREAM_TYPE_SUB;
-	 *   const mediaStreamTrack = event.track;
-	 *   const kind = event.track.kind; // audio or video
-	 * })
-	 */
-	readonly TRACK: 'track';
-	/**
-	 * @description TRTC statistics.<br>
-	 *
-	 * - SDK will fires this event once every 2s.
-	 * - You can get the network quality, statistics of audio and video from this event. For detailed parameter description, please refer to {@link TRTCStatistics}.
-	 * @default 'statistics'
-	 * @since v5.2.0
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.STATISTICS, statistics => {
-	 *    console.warn(statistics.rtt, statistics.upLoss, statistics.downLoss);
-	 * })
-	 */
-	readonly STATISTICS: 'statistics';
-	/**
-	 * @since v5.3.0
-	 * @description SEI message received<br>
-	 * @default 'sei-message'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.SEI_MESSAGE, event => {
-	 *    console.log(`received sei message from ${event.userId}, data: ${event.data}, streamType: ${event.streamType}`)
-	 * })
-	 */
-	readonly SEI_MESSAGE: 'sei-message';
-	/**
-	 * @since v5.6.0
-	 * @description received a new custom message.
-	 * @default 'custom-message'
-	 * @memberof module:EVENT
-	 * @example
-	 * trtc.on(TRTC.EVENT.CUSTOM_MESSAGE, event => {
-	 *    // event.userId: remote userId.
-	 *    // event.cmdId: message cmdId.
-	 *    // event.seq: message sequence number.
-	 *    // event.data: custom message data, type is ArrayBuffer.
-	 * })
-	 */
-	readonly CUSTOM_MESSAGE: 'custom-message';
-};
-export declare interface TRTCEventTypes {
-	[TRTCEvent.ERROR]: [RtcError];
-	[TRTCEvent.AUTOPLAY_FAILED]: [{
-		userId: string;
-	}];
-	[TRTCEvent.KICKED_OUT]: [{
-		reason: Exclude<BannedReason, 'user_time_out'>;
-	}];
-	[TRTCEvent.REMOTE_USER_ENTER]: [{
-		userId: string;
-	}];
-	[TRTCEvent.REMOTE_USER_EXIT]: [{
-		userId: string;
-	}];
-	[TRTCEvent.REMOTE_AUDIO_AVAILABLE]: [{
-		userId: string;
-	}];
-	[TRTCEvent.REMOTE_AUDIO_UNAVAILABLE]: [{
-		userId: string;
-	}];
-	[TRTCEvent.REMOTE_VIDEO_AVAILABLE]: [{
-		userId: string;
-		streamType: TRTCStreamType;
-	}];
-	[TRTCEvent.REMOTE_VIDEO_UNAVAILABLE]: [{
-		userId: string;
-		streamType: TRTCStreamType;
-	}];
-	[TRTCEvent.AUDIO_VOLUME]: [{
-		result: {
-			userId: string;
-			volume: number;
-		}[];
-	}];
-	[TRTCEvent.NETWORK_QUALITY]: [NetworkQuality];
-	[TRTCEvent.CONNECTION_STATE_CHANGED]: [{
-		prevState: ConnectionState;
-		state: ConnectionState;
-	}];
-	[TRTCEvent.AUDIO_PLAY_STATE_CHANGED]: [{
-		userId: string;
-		state: PlayerState;
-		reason: string;
-	}];
-	[TRTCEvent.VIDEO_PLAY_STATE_CHANGED]: [{
-		userId: string;
-		streamType: TRTCStreamType;
-		state: PlayerState;
-		reason: string;
-	}];
-	[TRTCEvent.SCREEN_SHARE_STOPPED]: [];
-	[TRTCEvent.DEVICE_CHANGED]: [{
-		type: TRTCDeviceType;
-		action: TRTCDeviceAction;
-		device: MediaDeviceInfo;
-	}];
-	[TRTCEvent.PUBLISH_STATE_CHANGED]: [
-		{
-			mediaType: 'audio' | 'video' | 'screen';
-			state: 'started' | 'stopped' | 'starting';
-			prevState: 'started' | 'stopped' | 'starting';
-			reason?: 'timeout' | 'error' | 'api-call';
-			error?: RtcError;
-		}
-	];
-	[TRTCEvent.SEI_MESSAGE]: [{
-		data: ArrayBuffer;
-		userId: string;
-		streamType: TRTCStreamType;
-		seiPayloadType: number;
-	}];
-	[TRTCEvent.STATISTICS]: [statistics: TRTCStatistics];
-	[TRTCEvent.TRACK]: [{
-		userId: string;
-		streamType?: TRTCStreamType;
-		track: MediaStreamTrack;
-	}];
-	[TRTCEvent.CUSTOM_MESSAGE]: [CustomMessage];
-}
-
-export declare interface CustomMessageData {
-  cmdId: number;
-  data: ArrayBuffer;
-}
-export declare interface CustomMessage extends CustomMessageData {
-  userId: string;
-  seq: number;
-}
-export declare class TRTC {
-  /**
-	 * Create a TRTC object for implementing functions such as entering a room, previewing, publishing, and subscribing streams.<br>
-	 *
-	 * **Note:**
-	 * - You must create a TRTC object first and call its methods and listen to its events to implement various functions required by the business.
-	 * @example
-	 * // Create a TRTC object
-	 * const trtc = TRTC.create();
-	 *
-	 * @returns {TRTC} TRTC object
-	 */
-  static create(options?: TRTCOptions): TRTC;
-  /**
-	 * @private
-	 * regi <br>
-	 *
-	 * @example
-	 * import { VirtualBackground } from 'trtc-sdk-v5/plugins/video-effect/virtual-background';
-	 * trtc.use({ plugin: VirtualBackground });
-	 *
-	 * @example
-	 * import { VirtualBackground } from 'trtc-sdk-v5/plugins/video-effect/virtual-background';
-	 * trtc.use({ plugin: VirtualBackground, assetsPath: './js/assets/' });
-	 *
-	 * @example
-	 * // 简写使用
-	 * import { VirtualBackground } from 'trtc-sdk-v5/plugins/video-effect/virtual-background';
-	 * trtc.use(VirtualBackground);
-	 */
-  use(pluginObject: PluginWithAssets | TRTCPlugin): void;
-  /**
-	 * @typedef TurnServer
-	 * @property {string} url TURN server url
-	 * @property {string=} username TURN server auth user name
-	 * @property {string=} credential TURN server password
-	 * @property {string=} [credentialType=password] TURN server verify password type
-	 */
-  /**
-	 * @typedef ProxyServer
-	 * @property {string} [websocketProxy] websocket service proxy
-	 * @property {string} [loggerProxy] log service agent
-	 * @property {TurnServer[]} [turnServer] media data transmission agent
-	 * @property {'all'|'relay'} [iceTransportPolicy='all'] 'all' gives priority to directly connecting to TRTC, and tries to go to the turn server if the connection fails.<br>
-	 * 'relay' forces the connection through the TURN server.
-	 */
-  /**
-	 * Enter a video call room.<br>
-	 * - Entering a room means starting a video call session. Only after entering the room successfully can you make audio and video calls with other users in the room.
-	 * - You can publish local audio and video streams through {@link TRTC#startLocalVideo startLocalVideo()} and {@link TRTC#startLocalAudio startLocalAudio()} respectively. After successful publishing, other users in the room will receive the {@link module:EVENT.REMOTE_AUDIO_AVAILABLE REMOTE_AUDIO_AVAILABLE} and {@link module:EVENT.REMOTE_VIDEO_AVAILABLE REMOTE_VIDEO_AVAILABLE} event notifications.
-	 * - By default, the SDK automatically plays remote audio. You need to call {@link TRTC#startRemoteVideo startRemoteVideo()} to play remote video.
-	 *
-	 * @param {object} options Enter room parameters
-	 * @param {number} options.sdkAppId sdkAppId <br>
-	 * You can obtain the sdkAppId information in the **Application Information** section after creating a new application by clicking **Application Management** > **Create Application** in the [TRTC Console](https://console.intl.cloud.tencent.com/trtc).
-	 * @param {string} options.userId User ID <br>
-	 * It is recommended to limit the length to 32 bytes, and only allow uppercase and lowercase English letters (a-zA-Z), numbers (0-9), underscores, and hyphens.
-	 * @param {string} options.userSig UserSig signature <br>
-	 * Please refer to [UserSig related](https://www.tencentcloud.com/document/product/647/35166) for the calculation method of userSig.
-	 * @param {number=} options.roomId
-	 * the value must be an integer between 1 and 4294967294<br>
-	 * <font color="red">If you need to use a string type room id, please use the strRoomId parameter. One of roomId and strRoomId must be passed in. If both are passed in, the roomId will be selected first.</font>
-	 * @param {string=} options.strRoomId
-	 * String type room id, the length is limited to 64 bytes, and only supports the following characters:
-	 * - Uppercase and lowercase English letters (a-zA-Z)
-	 * - Numbers (0-9)
-	 * - Space ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
-	 * <font color="red">Note: It is recommended to use a numeric type roomId. The string type room id "123" is not the same room as the numeric type room id 123.</font>
-	 * @param {string} [options.scene] Application scene, currently supports the following two scenes:
-	 * - {@link module:TYPE.SCENE_RTC TRTC.TYPE.SCENE_RTC} (default) Real-time call scene, which is suitable for 1-to-1 audio and video calls, or online meetings with up to 300 participants. {@tutorial 04-info-uplink-limits}.
-	 * - {@link module:TYPE.SCENE_LIVE TRTC.TYPE.SCENE_LIVE} Interactive live streaming scene, which is suitable for online live streaming scenes with up to 100,000 people, but you need to specify the role field in the options parameter introduced next.
-	 * @param {string=} [options.role] User role, only meaningful in the {@link module:TYPE.SCENE_LIVE TRTC.TYPE.SCENE_LIVE} scene, and the {@link module:TYPE.SCENE_RTC TRTC.TYPE.SCENE_RTC} scene does not need to specify the role. Currently supports two roles:
-	 * - {@link module:TYPE.ROLE_ANCHOR TRTC.TYPE.ROLE_ANCHOR} (default) Anchor
-	 * - {@link module:TYPE.ROLE_AUDIENCE TRTC.TYPE.ROLE_AUDIENCE} Audience
-	 * Note: The audience role does not have the permission to publish local audio and video, only the permission to watch remote streams. If the audience wants to interact with the anchor by connecting to the microphone, please switch the role to the anchor through {@link TRTC#switchRole switchRole()} before publishing local audio and video.
-	 * @param {boolean} [options.autoReceiveAudio=true] Whether to automatically receive audio. When a remote user publishes audio, the SDK automatically plays the remote user's audio.
-	 * @param {boolean} [options.autoReceiveVideo=false] Whether to automatically receive video. When a remote user publishes video, the SDK automatically subscribes and decodes the remote video. You need to call {@link TRTC#startRemoteVideo startRemoteVideo} to play the remote video.
-	 * - The default value was changed to `false` since v5.6.0. Refer to [Breaking Changed for v5.6.0](https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-00-info-update-guideline.html).
-	 * @param {boolean} [options.enableAutoPlayDialog] Whether to enable the SDK's automatic playback failure dialog box, default: true.
-	 * - Enabled by default. When automatic playback fails, the SDK will pop up a dialog box to guide the user to click the page to restore audio and video playback.
-	 * - Can be set to false in order to turn off. Refer to {@tutorial 21-advanced-auto-play-policy}.
-	 * @param {string|ProxyServer} [options.proxy] proxy config. Refer to {@tutorial 34-advanced-proxy}.
-	 * @param {boolean} [options.privateMapKey] Key for entering a room. If permission control is required, please carry this parameter (empty or incorrect value will cause a failure in entering the room).<br>[privateMapKey permission configuration](https://www.tencentcloud.com/document/product/647/35157?lang=en&pg=).
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * - {@link module:ERROR_CODE.ENV_NOT_SUPPORTED ENV_NOT_SUPPORTED}
-	 * - {@link module:ERROR_CODE.SERVER_ERROR SERVER_ERROR}
-	 * @example
-	 * const trtc = TRTC.create();
-	 * await trtc.enterRoom({ roomId: 8888, sdkAppId, userId, userSig });
-	 */
-  enterRoom(params: EnterRoomConfig): Promise<void>;
-  /**
-	 * Exit the current audio and video call room.
-	 * - After exiting the room, the connection with remote users will be closed, and remote audio and video will no longer be received and played, and the publishing of local audio and video will be stopped.
-	 * - The capture and preview of the local camera and microphone will not stop. You can call {@link TRTC#stopLocalVideo stopLocalVideo()} and {@link TRTC#stopLocalAudio stopLocalAudio()} to stop capturing local microphone and camera.
-	 * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @memberof TRTC
-	 * @example
-	 * await trtc.exitRoom();
-	 */
-  exitRoom(): Promise<void>;
-  /**
-	 * Switches the user role, only effective in TRTC.TYPE.SCENE_LIVE interactive live streaming mode.
-	 *
-	 * In interactive live streaming mode, a user may need to switch between "audience" and "anchor".
-	 * You can determine the role through the role field in {@link TRTC#enterRoom enterRoom()}, or switch roles after entering the room through switchRole.
-	 * - Audience switches to anchor, call trtc.switchRole(TRTC.TYPE.ROLE_ANCHOR) to convert the user role to TRTC.TYPE.ROLE_ANCHOR anchor role, and then call {@link TRTC#startLocalVideo startLocalVideo()} and {@link TRTC#startLocalAudio startLocalAudio()} to publish local audio and video as needed.
-	 * - Anchor switches to audience, call trtc.switchRole(TRTC.TYPE.ROLE_AUDIENCE) to convert the user role to TRTC.TYPE.ROLE_AUDIENCE audience role. If there is already published local audio and video, the SDK will cancel the publishing of local audio and video.
-	 * > !
-	 * > - This interface can only be called after entering the room successfully.
-	 * > - After closing the camera and microphone, it is recommended to switch to the audience role in time to avoid the anchor role occupying the resources of 50 upstreams.
-	 * @param {string} role User role
-	 * - TRTC.TYPE.ROLE_ANCHOR anchor, can publish local audio and video, up to 50 anchors can publish local audio and video in a single room at the same time.
-	 * - TRTC.TYPE.ROLE_AUDIENCE audience, cannot publish local audio and video, can only watch remote streams, and there is no upper limit on the number of audience members in a single room.
-	 * @param {object} [option]
-	 * @param {string} [option.privateMapKey] `Since v5.3.0+` <br>
-	 * The privateMapKey may expire after a timeout, so you can use this parameter to update the privateMapKey.
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.INVALID_OPERATION INVALID_OPERATION}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * - {@link module:ERROR_CODE.SERVER_ERROR SERVER_ERROR}
-	 * @memberof TRTC
-	 * @example
-	 * // After entering the room successfully
-	 * // TRTC.TYPE.SCENE_LIVE interactive live streaming mode, audience switches to anchor
-	 * await trtc.switchRole(TRTC.TYPE.ROLE_ANCHOR);
-	 * // Switch from audience role to anchor role and start streaming
-	 * await trtc.startLocalVideo();
-	 *
-	 * // TRTC.TYPE.SCENE_LIVE interactive live streaming mode, anchor switches to audience
-	 * await trtc.switchRole(TRTC.TYPE.ROLE_AUDIENCE);
-	 * @example
-	 * // Since v5.3.0+
-	 * await trtc.switchRole(TRTC.TYPE.ROLE_ANCHOR, { privateMapKey: 'your new privateMapKey' });
-	 */
-  switchRole(role: UserRole, option?: {
-		privateMapKey?: string;
-		latencyLevel?: number;
-	}): Promise<void>;
-	/**
-	 * Destroy the TRTC instance <br/>
-	 *
-	 * After exiting the room, if the business side no longer needs to use trtc, you need to call this interface to destroy the trtc instance in time and release related resources.
-	 *
-	 * Note:
-	 *  - The trtc instance after destruction cannot be used again.
-	 *  - If you have entered the room, you need to call the {@link TRTC#exitRoom TRTC.exitRoom} interface to exit the room successfully before calling this interface to destroy trtc.
-	 *
-	 * @example
-	 * // When the call is over
-	 * await trtc.exitRoom();
-	 * // If the trtc is no longer needed, destroy the trtc and release the reference.
-	 * trtc.destroy();
-	 * trtc = null;
-	 * @throws {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * @memberof TRTC
-	 */
-  destroy(): void;
-  /**
-	 * Start collecting audio from the local microphone and publish it to the current room.
-	 * - When to call: can be called before or after entering the room, cannot be called repeatedly.
-	 * - Only one microphone can be opened for a trtc instance. If you need to open another microphone for testing in the case of already opening one microphone, you can create multiple trtc instances to achieve it.
-	 *
-	 * @param {object} [config] - Configuration item
-	 * @param {boolean} [config.publish] - Whether to publish local audio to the room, default is true. If you call this interface before entering the room and publish = true, the SDK will automatically publish after entering the room. You can get the publish state by listening this event {@link module:EVENT.PUBLISH_STATE_CHANGED PUBLISH_STATE_CHANGED}.
-	 * @param {boolean} [config.mute] - Whether to mute microphone. Refer to: {@tutorial 15-basic-dynamic-add-video}.
-	 * @param {object} [config.option] - Local audio options
-	 * @param {string} [config.option.microphoneId]- Specify which microphone to use
-	 * @param {MediaStreamTrack} [config.option.audioTrack] - Custom audioTrack. {@tutorial 20-advanced-customized-capture-rendering}.
-	 * @param {number} [config.option.captureVolume] - Set the capture volume of microphone. The default value is 100. Setting above 100 enlarges the capture volume. Since v5.2.1+.
-	 * @param {number} [config.option.earMonitorVolume] - Set the ear return volume, value range [0, 100], the local microphone is muted by default.
-	 * @param {string} [config.option.profile] - Audio encoding configuration, default {@link module:TYPE.AUDIO_PROFILE_STANDARD TRTC.TYPE.AUDIO_PROFILE_STANDARD}
-	 * @throws
-	 * - {@link module:ERROR_CODE.ENV_NOT_SUPPORTED ENV_NOT_SUPPORTED}
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.DEVICE_ERROR DEVICE_ERROR}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * - {@link module:ERROR_CODE.SERVER_ERROR SERVER_ERROR}
-	 * @example
-	 * // Collect the default microphone and publish
-	 * await trtc.startLocalAudio();
-	 * @example
-	 * // The following is a code example for testing microphone volume, which can be used for microphone volume detection.
-	 * trtc.enableAudioVolumeEvaluation();
-	 * trtc.on(TRTC.EVENT.AUDIO_VOLUME, event => { });
-	 * // No need to publish audio for testing microphone
-	 * await trtc.startLocalAudio({ publish: false });
-	 * // After the test is completed, turn off the microphone
-	 * await trtc.stopLocalAudio();
-	 * @memberof TRTC
-	 */
-  startLocalAudio(config?: LocalAudioConfig): Promise<void>;
-  /**
-	 * Update the configuration of the local microphone.
-	 * - When to call: This interface needs to be called after {@link TRTC#startLocalAudio startLocalAudio()} is successful and can be called multiple times.
-	 * - This method uses incremental update: only update the passed parameters, and keep the parameters that are not passed unchanged.
-	 * @param {object} [config]
-	 * @param {boolean} [config.publish] - Whether to publish local audio to the room. You can get the publish state by listening this event {@link module:EVENT.PUBLISH_STATE_CHANGED PUBLISH_STATE_CHANGED}.
-	 * @param {boolean} [config.mute] - Whether to mute microphone. Refer to: {@tutorial 15-basic-dynamic-add-video}.
-	 * @param {object} [config.option] - Local audio configuration
-	 * @param {string} [config.option.microphoneId] - Specify which microphone to use to switch microphones.
-	 * @param {MediaStreamTrack} [config.option.audioTrack] - Custom audioTrack. {@tutorial 20-advanced-customized-capture-rendering}.
-	 * @param {number} [config.option.captureVolume] - Set the capture volume of microphone. The default value is 100. Setting above 100 enlarges the capture volume. Since v5.2.1+.
-	 * @param {number} [config.option.earMonitorVolume] - Set the ear return volume, value range [0, 100], the local microphone is muted by default.
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.DEVICE_ERROR DEVICE_ERROR}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * // Switch microphone
-	 * const microphoneList = await TRTC.getMicrophoneList();
-	 * if (microphoneList[1]) {
-	 *   await trtc.updateLocalAudio({ option: { microphoneId: microphoneList[1].deviceId }});
-	 * }
-	 * @memberof TRTC
-	 */
-  updateLocalAudio(config: UpdateLocalAudioConfig): Promise<void>;
-  /**
-	 * Stop collecting and publishing the local microphone.
-	 * - If you just want to mute the microphone, please use updateLocalAudio({ mute: true }). Refer to: {@tutorial 15-basic-dynamic-add-video}.
-	 * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * await trtc.stopLocalAudio();
-	 */
-  stopLocalAudio(): Promise<void>;
-  /**
-	 * @typedef {object|string} VideoProfile - Configuration for local video stream
-	 *
-	 * Video configuration parameters, can use preset values in string format or custom resolution and other parameters
-	 * | Video Profile | Resolution (Width x Height) | Frame Rate (fps) | Bitrate (kbps) | Remarks |
-	 * | :---       | :---           | :---      | :---      | :--- |
-	 * | 120p       | 160 x 120      | 15        | 200        ||
-	 * | 180p       | 320 x 180      | 15        | 350       ||
-	 * | 240p       | 320 x 240      | 15        | 400       ||
-	 * | 360p       | 640 x 360      | 15        | 800       ||
-	 * | 480p       | 640 x 480      | 15        | 900       ||
-	 * | 720p       | 1280 x 720     | 15        | 1500      ||
-	 * | 1080p      | 1920 x 1080    | 15        | 2000      ||
-	 * | 1440p      | 2560 x 1440    | 30        | 4860      ||
-	 * | 4K         | 3840 x 2160    | 30        | 9000      ||
-		* @property {number} width - Video width
-		* @property {number} height - Video height
-		* @property {number} frameRate - Video frame rate
-		* @property {number} bitrate - Video bitrate
-	 * @example
-	 * const config = {
-	 *  option: {
-	 *   profile: '480p',
-	 *  },
-	 * }
-	 * await trtc.startLocalVideo(config);
-	 * @example
-	 * const config = {
-	 *  option: {
-	 *    profile: {
-	 *      width: 640,
-	 *      height: 480,
-	 *      frameRate: 15,
-	 *      bitrate: 900,
-	 *    }
-	 *  }
-	 * }
-	 * await trtc.startLocalVideo(config);
-	 */
-  /**
-	 * Start collecting video from the local camera, play the camera's video on the specified HTMLElement tag, and publish the camera's video to the current room.
-	 * - When to call: can be called before or after entering the room, but cannot be called repeatedly.
-	 * - Only one camera can be started per trtc instance. If you need to start another camera for testing while one camera is already started, you can create multiple trtc instances to achieve this.
-
-	 * @param {object} [config]
-	 * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - The HTMLElement instance or ID for local video preview. If not passed or passed as null, the video will not be played.
-	 * @param {boolean} [config.publish] - Whether to publish the local video to the room. If you call this interface before entering the room and publish = true, the SDK will automatically publish after entering the room. You can get the publish state by listening this event {@link module:EVENT.PUBLISH_STATE_CHANGED PUBLISH_STATE_CHANGED}.
-	 * @param {boolean | string} [config.mute] - Whether to mute camera. Supports passing in image url string, the image will be published instead of origin camera stream, Other users in the room will receive the REMOTE_AUDIO_AVAILABLE event. It does not support calling when the camera is turned off. More information: {@tutorial 15-basic-dynamic-add-video}.
-	 * @param {object} [config.option] - Local video configuration
-	 * @param {string} [config.option.cameraId] - Specify which camera to use for switching cameras.
-	 * @param {boolean} [config.option.useFrontCamera] - Whether to use the front camera.
-	 * @param {MediaStreamTrack} [config.option.videoTrack] - Custom videoTrack. {@tutorial 20-advanced-customized-capture-rendering}.
-	 * @param {'view' | 'publish' | 'both' | boolean} [config.option.mirror] - Video mirroring mode, default is 'view'.
-	 * - 'view': You see yourself as a mirror image, and the other person sees you as a non-mirror image.
-	 * - 'publish': The other person sees you as a mirror image, and you see yourself as a non-mirror image.
-	 * - 'both': You see yourself as a mirror image, and the other person sees you as a mirror image.
-	 * - false: Boolean value, represents no mirroring.
-	 *
-	 * <font color="orange"> Note: Before version 5.3.2, only boolean can be passed, where true represents local preview mirroring, and false represents no mirroring.</font>
-	 * @param {'contain' | 'cover' | 'fill'} [config.option.fillMode] - Video fill mode. The default is `cover`. Refer to the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit CSS object-fit} property.
-	 * @param {string | VideoProfile} [config.option.profile] - Video encoding parameters for the main video.
-	 * @param {string | boolean | VideoProfile} [config.option.small] - Video encoding parameters for the small video. Refer to {@tutorial 27-advanced-small-stream}
-	 * @param {QOS_PREFERENCE_SMOOTH|QOS_PREFERENCE_CLEAR} [config.option.qosPreference] - Set the video encoding strategy for weak networks. Smooth first(default) ({@link module:TYPE.QOS_PREFERENCE_SMOOTH QOS_PREFERENCE_SMOOTH}) or Clear first ({@link module:TYPE.QOS_PREFERENCE_CLEAR QOS_ PREFERENCE_SMOOTH})
-	 * @throws
-	 * - {@link module:ERROR_CODE.ENV_NOT_SUPPORTED ENV_NOT_SUPPORTED}
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.DEVICE_ERROR DEVICE_ERROR}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * - {@link module:ERROR_CODE.SERVER_ERROR SERVER_ERROR}
-	 * @example
-	 * // Preview and publish the camera
-	 * await trtc.startLocalVideo({
-	 *   view: document.getElementById('localVideo'), // Preview the video on the element with the DOM elementId of localVideo.
-	 * });
-	 * @example
-	 * // Preview the camera without publishing. Can be used for camera testing.
-	 * const config = {
-	 *   view: document.getElementById('localVideo'), // Preview the video on the element with the DOM elementId of localVideo.
-	 *   publish: false // Do not publish the camera
-	 * }
-	 * await trtc.startLocalVideo(config);
-	 * // Call updateLocalVideo when you need to publish the video
-	 * await trtc.updateLocalVideo({ publish:true });
-	 * @example
-	 * // Use a specified camera.
-	 * const cameraList = await TRTC.getCameraList();
-	 * if (cameraList[0]) {
-	 *   await trtc.startLocalVideo({
-	 *     view: document.getElementById('localVideo'), // Preview the video on the element with the DOM elementId of localVideo.
-	 *     option: {
-	 *       cameraId: cameraList[0].deviceId,
-	 *     }
-	 *   });
-	 * }
-	 *
-	 * // use front camera on mobile device.
-	 * await trtc.startLocalVideo({ view, option: { useFrontCamera: true }});
-	 * // use rear camera on mobile device.
-	 * await trtc.startLocalVideo({ view, option: { useFrontCamera: false }});
-	 * @memberof TRTC
-	 */
-  startLocalVideo(config?: LocalVideoConfig): Promise<void>;
-  /**
-	 * Update the local camera configuration.
-	 * - This interface needs to be called after {@link TRTC#startLocalVideo startLocalVideo()} is successful.
-	 * - This interface can be called multiple times.
-	 * - This method uses incremental update: only updates the passed-in parameters, and keeps the parameters that are not passed in unchanged.
-	 * @param {object} [config]
-	 * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - The HTMLElement instance or Id of the preview camera. If not passed in or passed in null, the video will not be rendered, but the container that consumes bandwidth will still be pushed.
-	 * @param {boolean} [config.publish] - Whether to publish the local video to the room. You can get the publish state by listening this event {@link module:EVENT.PUBLISH_STATE_CHANGED PUBLISH_STATE_CHANGED}.
-	 * @param {boolean | string} [config.mute] - Whether to mute camera. Supports passing in image url string, the image will be published instead of origin camera stream, Other users in the room will receive the REMOTE_AUDIO_AVAILABLE event. It does not support calling when the camera is turned off. More information: {@tutorial 15-basic-dynamic-add-video}.
-	 * @param {object} [config.option] - Local video configuration
-	 * @param {string} [config.option.cameraId] - Specify which camera to use
-	 * @param {boolean} [config.option.useFrontCamera] - Whether to use the front camera
-	 * @param {MediaStreamTrack} [config.option.videoTrack] - Custom videoTrack. {@tutorial 20-advanced-customized-capture-rendering}.
-	 * @param {'view' | 'publish' | 'both' | boolean} [config.option.mirror] - Video mirroring mode, default is 'view'.
-	 * - 'view': You see yourself as a mirror image, and the other person sees you as a non-mirror image.
-	 * - 'publish': The other person sees you as a mirror image, and you see yourself as a non-mirror image.
-	 * - 'both': You see yourself as a mirror image, and the other person sees you as a mirror image.
-	 * - false: Boolean value, represents no mirroring.
-	 * @param {'contain' | 'cover' | 'fill'} [config.option.fillMode] - Video fill mode. Refer to the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit| CSS object-fit} property
-	 * @param {string | VideoProfile} [config.option.profile] - Video encoding parameters for the main stream
-	 * @param {string | boolean | VideoProfile} [config.option.small] - Video encoding parameters for the small video. Refer to {@tutorial 27-advanced-small-stream}
-	 * @param {QOS_PREFERENCE_SMOOTH|QOS_PREFERENCE_CLEAR} [config.option.qosPreference] - Set the video encoding strategy for weak networks. Smooth first ({@link module:TYPE.QOS_PREFERENCE_SMOOTH QOS_PREFERENCE_SMOOTH}) or Clear first ({@link module:TYPE.QOS_PREFERENCE_CLEAR QOS_ PREFERENCE_SMOOTH})
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.DEVICE_ERROR DEVICE_ERROR}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * // Switch camera
-	 * const cameraList = await TRTC.getCameraList();
-	 * if (cameraList[1]) {
-	 *   await trtc.updateLocalVideo({ option: { cameraId: cameraList[1].deviceId }});
-	 * }
-	 * @example
-	 * // Stop publishing video, but keep local preview
-	 * await trtc.updateLocalVideo({ publish:false });
-	 * @memberof TRTC
-	 */
-  updateLocalVideo(config: LocalVideoConfig): Promise<void>;
-  /**
-	 * Stop capturing, previewing, and publishing the local camera.
-	 * - If you only want to stop publishing video but keep the local camera preview, you can use the {@link TRTC#updateLocalVideo updateLocalVideo({ publish:false })} method.<br>
-	 * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * await trtc.stopLocalVideo();
-	 */
-  stopLocalVideo(): Promise<void>;
-  /**
-	 * @typedef {object|string} ScreenShareProfile - Screen sharing resolution, bit rate, and frame rate configuration
-	 * Screen sharing configuration parameters, can use preset values or custom resolution and other parameters
-	 * | Screen Profile | Resolution (width x height) | Frame Rate (fps) | Bitrate (kbps) |
-	 * | :---       | :---           | :---      | :---        |
-	 * | 480p       | 640 x 480      | 5         | 900         |
-	 * | 480p_2     | 640 x 480      | 30        | 1000        |
-	 * | 720p       | 1280 x 720     | 5         | 1200        |
-	 * | 720p_2     | 1280 x 720     | 30        | 3000        |
-	 * | 1080p      | 1920 x 1080    | 5         | 1600        |
-	 * | 1080p_2    | 1920 x 1080    | 30        | 4000        |
-	 * - The default resolution for screen sharing is `1080p`.
-	 * - If the above profiles do not meet your business needs, you can also specify custom resolution, frame rate, and bitrate.
-
-	 * @property {number} width - Screen sharing width
-	 * @property {number} height - Screen sharing height
-	 * @property {number} frameRate - Screen sharing frame rate
-	 * @property {number} bitrate - Screen sharing bitrate
-	 * @example
-	 * const config = {
-	 *  option: {
-	 *   profile: '720p',
-	 *  },
-	 * }
-	 * await trtc.startScreenShare(config);
-	 */
-  /**
-	 * Start screen sharing.
-	 *
-	 * - After starting screen sharing, other users in the room will receive the {@link module:EVENT.REMOTE_VIDEO_AVAILABLE REMOTE_VIDEO_AVAILABLE} event, with streamType as {@link module:TYPE.STREAM_TYPE_SUB STREAM_TYPE_SUB}, and other users can play screen sharing through {@link TRTC#startRemoteVideo startRemoteVideo}.
-	 * @param {object} [config]
-	 * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - The HTMLElement instance or Id for previewing local screen sharing. If not passed or passed as null, local screen sharing will not be rendered.
-	 * @param {boolean} [config.publish] - Whether to publish screen sharing to the room. The default is true. If you call this interface before entering the room and publish = true, the SDK will automatically publish after entering the room. You can get the publish state by listening this event {@link module:EVENT.PUBLISH_STATE_CHANGED PUBLISH_STATE_CHANGED}.
-	 * @param {object} [config.option] - Screen sharing configuration
-	 * @param {boolean} [config.option.systemAudio] - Whether to capture system audio. The default is false.
-	 * @param {'contain' | 'cover' | 'fill'} [config.option.fillMode] - Video fill mode. The default is `contain`, refer to {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit CSS object-fit} property.
-	 * @param {ScreenShareProfile} [config.option.profile] - Screen sharing encoding configuration.
-	 * @param {QOS_PREFERENCE_SMOOTH|QOS_PREFERENCE_CLEAR} [config.option.qosPreference] - Set the video encoding strategy for weak networks. Smooth first ({@link module:TYPE.QOS_PREFERENCE_SMOOTH QOS_PREFERENCE_SMOOTH}) or Clear first(default) ({@link module:TYPE.QOS_PREFERENCE_CLEAR QOS_ PREFERENCE_SMOOTH})
-	 * @param {HTMLElement} [config.option.captureElement] - Capture screen from the specified element of current tab. Available on Chrome 104+.
-	 * @param {'current-tab' | 'tab' | 'window' | 'monitor'} [config.option.preferDisplaySurface='monitor'] - The prefer display surface for screen sharing. Available on Chrome 94+.
-	 * - The default is monitor, which means that monitor capture will be displayed first in the Screen Sharing Capture pre-checkbox。
-	 * - If you fill in 'current-tab', the pre-checkbox will only show the current page.
-	 * @throws
-	 * - {@link module:ERROR_CODE.ENV_NOT_SUPPORTED ENV_NOT_SUPPORTED}
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.DEVICE_ERROR DEVICE_ERROR}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * - {@link module:ERROR_CODE.SERVER_ERROR SERVER_ERROR}
-	 * @example
-	 * // Start screen sharing
-	 * await trtc.startScreenShare();
-	 * @memberof TRTC
-	 */
-  startScreenShare(config?: ScreenShareConfig): Promise<void>;
-  /**
-	 * Update screen sharing configuration
-	 * - This interface needs to be called after {@link TRTC#startScreenShare startScreenShare()} is successful.
-	 * - This interface can be called multiple times.
-	 * - This method uses incremental update: only update the passed-in parameters, and keep the parameters that are not passed-in unchanged.
-	 * @param {object} [config]
-	 * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - The HTMLElement instance or Id for screen sharing preview. If not passed in or passed in null, the screen sharing will not be rendered.
-	 * @param {boolean} [config.publish=true] - Whether to publish screen sharing to the room
-	 * @param {object} [config.option] - Screen sharing configuration
-	 * @param {'contain' | 'cover' | 'fill'} [config.option.fillMode] - Video fill mode. The default is `contain`, refer to {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit CSS object-fit} property.
-	 * @param {QOS_PREFERENCE_SMOOTH|QOS_PREFERENCE_CLEAR} [config.option.qosPreference] - Set the video encoding strategy for weak networks. Smooth first ({@link module:TYPE.QOS_PREFERENCE_SMOOTH QOS_PREFERENCE_SMOOTH}) or Clear first ({@link module:TYPE.QOS_PREFERENCE_CLEAR QOS_ PREFERENCE_SMOOTH})
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.DEVICE_ERROR DEVICE_ERROR}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * - {@link module:ERROR_CODE.SERVER_ERROR SERVER_ERROR}
-	 * @example
-	 * // Stop screen sharing, but keep the local preview of screen sharing
-	 * await trtc.updateScreenShare({ publish:false });
-	 * @memberof TRTC
-	 */
-  updateScreenShare(config: UpdateScreenShareConfig): Promise<void>;
-  /**
-	 * Stop screen sharing.
-
-	 * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * await trtc.stopScreenShare();
-	 */
-  stopScreenShare(): Promise<void>;
-  /**
-	 * Play remote video
-	 *
-	 * - When to call: Call after receiving the {@link module:EVENT.REMOTE_VIDEO_AVAILABLE TRTC.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE)} event.
-	 * @param {object} [config]
-	 * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - The HTMLElement instance or Id used to play remote video. If not passed or passed null, the video will not be rendered, but the bandwidth will still be consumed.
-	 * @param {string} config.userId - Remote user ID
-	 * @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} config.streamType - Remote stream type
-	 * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (remote user's camera)
-	 * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (remote user's screen sharing)
-	 * @param {object} [config.option] - Remote video configuration
-	 * @param {boolean} [config.option.small] - Whether to subscribe small streams
-	 * @param {boolean} [config.option.mirror] - Whether to enable mirror
-	 * @param {'contain' | 'cover' | 'fill'} [config.option.fillMode] - Video fill mode. Refer to the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit CSS object-fit} property.
-	 * @param {boolean} [config.option.receiveWhenViewVisible] - Since v5.4.0 <br>Subscribe video only when view is visible. Refer to: {@tutorial 27-advanced-small-stream}.
-	 * @param {HTMLElement} [config.option.viewRoot=document.body] - Since v5.4.0 <br>The root element is the parent element of the view and is used to calculate whether the view is visible relative to the root. The default value is document.body, and it is recommended that you use the first-level parent of the video view list. Refer to: {@tutorial 27-advanced-small-stream}.
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.INVALID_OPERATION INVALID_OPERATION}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * - {@link module:ERROR_CODE.SERVER_ERROR SERVER_ERROR}
-	 * @example
-	 * trtc.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE, ({ userId, streamType }) => {
-	 *   // You need to place the video container in the DOM in advance, and it is recommended to use `${userId}_${streamType}` as the element id.
-	 *   trtc.startRemoteVideo({ userId, streamType, view: `${userId}_${streamType}` });
-	 * })
-	 * @memberof TRTC
-	 */
-  startRemoteVideo(config: RemoteVideoConfig): Promise<void>;
-  /**
-	 * Update remote video playback configuration<br>
-	 * - This method should be called after {@link TRTC#startRemoteVideo startRemoteVideo} is successful.
-	 * - This method can be called multiple times.
-	 * - This method uses incremental updates, so only the configuration items that need to be updated need to be passed in.
-	 * @param {object} [config]
-	 * @param {string | HTMLElement | HTMLElement[] | null} [config.view] - The HTMLElement instance or Id used to play remote video. If not passed or passed null, the video will not be rendered, but the bandwidth will still be consumed.
-	 * @param {string} config.userId - Remote user ID
-	 * @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} config.streamType - Remote stream type
-	 * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (remote user's camera)
-	 * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (remote user's screen sharing)
-	 * @param {object} [config.option] - Remote video configuration
-	 * @param {boolean} [config.option.small] - Whether to subscribe small streams. Refer to: {@tutorial 27-advanced-small-stream}.
-	 * @param {boolean} [config.option.mirror] - Whether to enable mirror
-	 * @param {'contain' | 'cover' | 'fill'} [config.option.fillMode] - Video fill mode. Refer to the {@link https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit CSS object-fit} property.
-	 * @param {boolean} [config.option.receiveWhenViewVisible] - Since v5.4.0 <br>Subscribe video only when view is visible. Refer to: {@tutorial 27-advanced-small-stream}.
-	 * @param {HTMLElement} [config.option.viewRoot=document.body] - Since v5.4.0 <br>The root element is the parent element of the view and is used to calculate whether the view is visible relative to the root. The default value is document.body, and it is recommended that you use the first-level parent of the video view list. Refer to: {@tutorial 27-advanced-small-stream}.
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.INVALID_OPERATION INVALID_OPERATION}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * const config = {
-	 *  view: document.getElementById(userId), // you can use a new view to update the position of video.
-	 *  userId,
-	 *  streamType: TRTC.TYPE.STREAM_TYPE_MAIN
-	 * }
-	 * await trtc.updateRemoteVideo(config);
-	 * @memberof TRTC
-	 */
-  updateRemoteVideo(config: RemoteVideoConfig): Promise<void>;
-  /**
-	 * Used to stop remote video playback.<br>
-	 * @param {object} config - Remote video configuration
-	 * @param {string} config.userId - Remote user ID, '*' represents all users.
-	 * @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} [config.streamType] - Remote stream type. This field is required when userId is not '*'.
-	 * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (remote user's camera)
-	 * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (remote user's screen sharing)
-	 * @throws {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * // Stop playing all remote users
-	 * await trtc.stopRemoteVideo({ userId: '*' });
-	 */
-  stopRemoteVideo(config: StopRemoteVideoConfig): Promise<void>;
-  /**
-	 * Mute a remote user and stop subscribing audio data from that user. Only effective for the current user, other users in the room can still hear the muted user's voice.<br>
-	 *
-	 * Note:
-	 * - By default, after entering the room, the SDK will automatically play remote audio. You can call this interface to mute or unmute remote users.
-	 * - If the parameter autoReceiveAudio = false is passed in when entering the room, remote audio will not be played automatically. When audio playback is required, you need to call this method (mute is passed in false) to play remote audio.
-	 * - This interface is effective before or after entering the room (enterRoom), and the mute state will be reset to false after exiting the room (exitRoom).
-	 * - If you want to continue subscribing audio data from the user but not play it, you can call setRemoteAudioVolume(userId, 0)
-	 * @param {string} userId - Remote user ID, '*' represents all users.
-	 * @param {boolean} mute - Whether to mute
-	 * @throws
-	 * - {@link module:ERROR_CODE.INVALID_PARAMETER INVALID_PARAMETER}
-	 * - {@link module:ERROR_CODE.INVALID_OPERATION INVALID_OPERATION}
-	 * - {@link module:ERROR_CODE.OPERATION_FAILED OPERATION_FAILED}
-	 * - {@link module:ERROR_CODE.OPERATION_ABORT OPERATION_ABORT}
-	 * @example
-	 * // Mute all remote users
-	 * await trtc.muteRemoteAudio('*', true);
-	 */
-  muteRemoteAudio(userId: string, mute: boolean): Promise<void>;
-  /**
-	 * Used to control the playback volume of remote audio.<br>
-	 *
-	 * - Not supported by iOS Safari
-	 * @param {string} userId - Remote user ID。'*' represents all remote users.
-	 * @param {number} volume - Volume, ranging from 0 to 100. The default value is 100.<br>
-	 * Since `v5.1.3+`, the volume can be set higher than 100.
-	 * @example
-	 * await trtc.setRemoteAudioVolume('123', 90);
-	 */
-  setRemoteAudioVolume(userId: string, volume: number): void;
-  startPlugin<T extends keyof PluginStartOptionsMap, O extends PluginStartOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
-  startPlugin<T extends keyof PluginStartOptionsMap, O extends PluginStartOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
-  updatePlugin<T extends keyof PluginUpdateOptionsMap, O extends PluginUpdateOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
-  updatePlugin<T extends keyof PluginUpdateOptionsMap, O extends PluginUpdateOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
-  stopPlugin<T extends keyof PluginStopOptionsMap, O extends PluginStopOptionsMap[T]>(plugin: O extends undefined ? never : T, options: O): Promise<any>;
-  stopPlugin<T extends keyof PluginStopOptionsMap, O extends PluginStopOptionsMap[T]>(plugin: O extends undefined ? T : never): Promise<any>;
-  /**
-	 * Enables or disables the volume callback.<br>
-	 *
-	 * - After enabling this function, whether someone is speaking in the room or not, the SDK will regularly throw the {@link module:EVENT.AUDIO_VOLUME TRTC.on(TRTC.EVENT.AUDIO_VOLUME)} event, which feedbacks the volume evaluation value of each user.<br>
-	 *
-	 * @param {number} [interval=2000] Used to set the time interval for triggering the volume callback event. The default is 2000(ms), and the minimum value is 100(ms). If set to less than or equal to 0, the volume callback will be turned off.
-	 * @param {boolean} [enableInBackground=false] For performance reasons, when the page switches to the background, the SDK will not throw volume callback events. If you need to receive volume callback events when the page is switched to the background, you can set this parameter to true.
-	 * @memberof TRTC
-	 * @example
-	 * trtc.on(TRTC.EVENT.AUDIO_VOLUME, event => {
-	 *    event.result.forEach(({ userId, volume }) => {
-	 *        const isMe = userId === ''; // When userId is an empty string, it represents the local microphone volume.
-	 *        if (isMe) {
-	 *            console.log(`my volume: ${volume}`);
-	 *        } else {
-	 *            console.log(`user: ${userId} volume: ${volume}`);
-	 *        }
-	 *    })
-	 * });
-	 *
-	 * // Enable volume callback and trigger the event every 1000ms
-	 * trtc.enableAudioVolumeEvaluation(1000);
-	 *
-	 * // To turn off the volume callback, pass in an interval value less than or equal to 0
-	 * trtc.enableAudioVolumeEvaluation(-1);
-	 */
-  enableAudioVolumeEvaluation(interval?: number, enableInBackground?: boolean): void;
-  /**
-	 * Listen to TRTC events<br><br>
-	 * For a detailed list of events, please refer to: {@link module:EVENT TRTC.EVENT}
-	 *
-	 * @param {string} eventName Event name
-	 * @param {function} handler Event callback function
-	 * @param {context} context Context
-	 * @memberof TRTC
-	 * @example
-	 * trtc.on(TRTC.EVENT.REMOTE_VIDEO_AVAILABLE, event => {
-	 *   // REMOTE_VIDEO_AVAILABLE event handler
-	 * });
-	 */
-  on<T extends keyof TRTCEventTypes>(event: T, handler: (...args: TRTCEventTypes[T]) => void, context?: any): this;
-  /**
-	 * Remove event listener<br>
-	 *
-	 * @param {string} eventName Event name. Passing in the wildcard '*' will remove all event listeners.
-	 * @param {function} handler Event callback function
-	 * @param {context} context Context
-	 * @memberof TRTC
-	 * @example
-	 * trtc.on(TRTC.EVENT.REMOTE_USER_ENTER, function peerJoinHandler(event) {
-	 *   // REMOTE_USER_ENTER event handler
-	 *   console.log('remote user enter');
-	 *
-	 *   trtc.off(TRTC.EVENT.REMOTE_USER_ENTER, peerJoinHandler);
-	 * });
-	 *
-	 * // Remove all event listeners
-	 * trtc.off('*');
-	 */
-  off<T extends keyof TRTCEventTypes>(event: T | '*', handler: T extends '*' ? never : (...args: TRTCEventTypes[T]) => void, context?: any): this;
-  /**
-	 * Get audio track
-	 *
-	 * @returns {MediaStreamTrack?} Audio track
-	 * @param {Object|string} [config] If not passed, get the local microphone audioTrack
-	 * @param {string} [config.userId] If not passed or passed an empty string, get the local audioTrack. Pass the userId of the remote user to get the remote user's audioTrack.
-	 * @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
-	 * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's microphone)(default)
-	 * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing audio). Only works for local screen sharing audio because there is only one remote audioTrack, and there is no distinction between Main and Sub for remote audioTrack.
-   * @param {boolean} [config.processed=false] - Whether to get the processed audioTrack. The processed audioTrack is the audioTrack after the SDK processes the audio frame, such as ai-denose, gain, mix. The default value is false.
-	 * @memberof TRTC
-	 * @example
-	 * // Version before v5.4.3
-	 * trtc.getAudioTrack(); // Get local microphone audioTrack, captured by trtc.startLocalAudio()
-	 * trtc.getAudioTrack('remoteUserId'); // Get remote audioTrack
-	 *
-	 * // Since v5.4.3+, you can get local screen audioTrack by passing the streamType = TRTC.STREAM_TYPE_SUB
-	 * trtc.getAudioTrack({ streamType: TRTC.STREAM_TYPE_SUB });
-   *
-   * // Since v5.8.2+, you can get the processed audioTrack by passing processed = true
-   * trtc.getAudioTrack({ processed: true });
-	 */
-  getAudioTrack(configOrUserId?: {
-		userId?: string;
-		streamType?: TRTCStreamType;
-    	processed?: boolean;
-	} | string): MediaStreamTrack | null;
-	/**
-	 * Get video track
-	 *
-	 * @param {string} [config] If not passed, get the local camera videoTrack
-	 * @param {string} [config.userId] If not passed or passed an empty string, get the local videoTrack. Pass the userId of the remote user to get the remote user's videoTrack.
-	 * @param {STREAM_TYPE_MAIN|STREAM_TYPE_SUB} [config.streamType] - stream type:
-	 * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream (user's camera)(default)
-	 * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream (user's screen sharing)
-   * @param {boolean} [config.processed=false] - Whether to get the processed videoTrack. The processed videoTrack is the videoTrack after the SDK processes the video frame, such as visualbackground, mirror, watermark. The default value is false.
-	 * @returns {MediaStreamTrack|null} Video track
-	 * @memberof TRTC
-	 * @example
-	 * // Get local camera videoTrack
-	 * const videoTrack = trtc.getVideoTrack();
-	 * // Get local screen sharing videoTrack
-	 * const screenVideoTrack = trtc.getVideoTrack({ streamType: TRTC.TYPE.STREAM_TYPE_SUB });
-	 * // Get remote user's main stream videoTrack
-	 * const remoteMainVideoTrack = trtc.getVideoTrack({ userId: 'test', streamType: TRTC.TYPE.STREAM_TYPE_MAIN });
-	 * // Get remote user's sub stream videoTrack
-	 * const remoteSubVideoTrack = trtc.getVideoTrack({ userId: 'test', streamType: TRTC.TYPE.STREAM_TYPE_SUB });
-   * // Since v5.8.2+, you can get the processed videoTrack by passing processed = true
-   * const processedVideoTrack = trtc.getVideoTrack({ processed: true });
-	*/
-  getVideoTrack(config?: {
-		userId?: string;
-		streamType?: TRTCStreamType;
-		processed?: boolean;
-	}): MediaStreamTrack | null;
-	/**
-	 * Get video snapshot <br>
-	 * Notice: must play the video before it can obtain the snapshot. If there is no playback, an empty string will be returned.
-	 * @param {string} config.userId - Remote user ID
-	 * @param {TRTC.TYPE.STREAM_TYPE_MAIN|TRTC.TYPE.STREAM_TYPE_SUB} config.streamType
-	 * - {@link module:TYPE.STREAM_TYPE_MAIN TRTC.TYPE.STREAM_TYPE_MAIN}: Main stream
-	 * - {@link module:TYPE.STREAM_TYPE_SUB TRTC.TYPE.STREAM_TYPE_SUB}: Sub stream
-	 * @since 5.4.0
-	 * @example
-	 * // get self main stream video frame
-	 * trtc.getVideoSnapshot()
-	 * // get self sub stream video frame
-	 * trtc.getVideoSnapshot({streamType:TRTC.TYPE.STREAM_TYPE_SUB})
-	 * // get remote user main stream video frame
-	 * trtc.getVideoSnapshot({userId: 'remote userId', streamType:TRTC.TYPE.STREAM_TYPE_MAIN})
-	 * @memberof TRTC
-	 */
-  getVideoSnapshot(config?: VideoFrameConfig): string;
-  setCurrentSpeaker(speakerId: string): void;
-  /**
-	 * Send SEI Message <br>
-	 *
-	 * > The header of a video frame has a header block called SEI.
-	 * > The principle of this interface is to use the SEI to embed the custom data you want to send along with the video frame.
-	 * > SEI messages can accompany video frames all the way to the live CDN.
-	 *
-	 * Applicable scenarios: synchronization of lyrics, live answering questions, etc.
-	 *
-	 * When to call: call after {@link TRTC#startLocalVideo trtc.startLocalVideo} or {@link TRTC#startLocalScreen trtc.startLocalScreen} when set 'toSubStream' option to true successfully.
-	 *
-	 * Note:
-	 * 1. Maximum 1KB(Byte) sent in a single call, maximum 30 calls per second, maximum 8KB sent per second.
-	 * 2. Currently only support Chrome 86+, Edge 86+, Opera 72+ browsers.
-	 * 3. Since SEI is sent along with video frames, there is a possibility that video frames may be lost, and therefore SEI may be lost as well. The number of times it can be sent can be increased within the frequency limit, and the business side needs to do message de-duplication on the receiving side.
-	 * 4. SEI cannot be sent without trtc.startLocalVideo(or trtc.startLocalScreen when set 'toSubStream' option to true); SEI cannot be received without startRemoteVideo.
-	 * 5. Only H264 encoder is supported to send SEI.
-	 * 6. SEI sending and receiving is not supported for small streams for the time being.
-	 * @see {@link module:EVENT.SEI_MESSAGE TRTC.EVENT.SEI_MESSAGE}
-	 * @since v5.3.0
-	 * @param {ArrayBuffer} buffer SEI data to be sent
-	 * @param {Object=} options
-	 * @param {Number} options.seiPayloadType Set the SEI payload type. SDK uses the custom payloadType 243 by default, the business side can use this parameter to set the payloadType to the standard 5. When the business side uses the 5 payloadType, you need to follow the specification to make sure that the first 16 bytes of the `buffer` are the business side's customized uuid.
-	 * @param {Boolean} [options.toSubStream=false] Send SEI data to substream. Need call trtc.startLocalScreen first. Since v5.7.0+.
-	 * @example
-	 * // 1. enable SEI
-	 * const trtc = TRTC.create({
-	 *    enableSEI: true
-	 * })
-	 *
-	 * // 2. send SEI
-	 * try {
-	 *  await trtc.enterRoom({
-	 *   userId: 'user_1',
-	 *   roomId: 12345,
-	 * })
-	 *  await trtc.startLocalVideo();
-	 *  const unit8Array = new Uint8Array([1, 2, 3]);
-	 *  trtc.sendSEIMessage(unit8Array.buffer);
-	 * } catch(error) {
-	 *  console.warn(error);
-	 * }
-	 *
-	 * // 3. receive SEI
-	 * trtc.on(TRTC.EVENT.SEI_MESSAGE, event => {
-	 *  console.warn(`sei ${event.data} from ${event.userId}`);
-	 * })
-	 */
-  sendSEIMessage(buffer: ArrayBuffer, options?: {
-		seiPayloadType?: number;
-		toSubStream?: boolean;
-	}): void;
-	/**
-	 * Send Custom Message to all remote users in the room. <br>
-	 *
-	 * Note:
-	 *
-	 * 1. Only {@link module:TYPE.ROLE_ANCHOR TRTC.TYPE.ROLE_ANCHOR} can call sendCustomMessage.
-	 * 2. You should call this api after {@link TRTC#enterRoom TRTC.enterRoom} successfully.
-	 * 3. The custom message will be sent in order and as reliably as possible, but it's possible to loss messages in a very bad network. The receiver will also receive the message in order.
-	 * @since v5.6.0
-	 * @see Listen for the event {@link module:EVENT.CUSTOM_MESSAGE TRTC.EVENT.CUSTOM_MESSAGE} to receive custom message.
-	 * @param {object} message
-	 * @param {number} message.cmdId message Id. Integer, range [1, 10]. You can set different cmdId for different types of messages to reduce the delay of transferring message.
-	 * @param {ArrayBuffer} message.data - message content. <br/>
-	 * - Maximum 1KB(Byte) sent in a single call.
-	 * - Maximum 30 calls per second
-	 * - Maximum 8KB sent per second.
-	 * @example
-	 * // send custom message
-	 * trtc.sendCustomMessage({
-	 *   cmdId: 1,
-	 *   data: new TextEncoder().encode('hello').buffer
-	 * });
-	 *
-	 * // receive custom message
-	 * trtc.on(TRTC.EVENT.CUSTOM_MESSAGE, event => {
-	 *    // event.userId: remote userId.
-	 *    // event.cmdId: message cmdId.
-	 *    // event.seq: message sequence number.
-	 *    // event.data: custom message data, type is ArrayBuffer.
-	 *    console.log(`received custom msg from ${event.userId}, message: ${new TextDecoder().decode(event.data)}`)
-	 * })
-	 */
-  sendCustomMessage(message: CustomMessageData): void;
-  static EVENT: {
-		readonly ERROR: 'error';
-		readonly AUTOPLAY_FAILED: 'autoplay-failed';
-		readonly KICKED_OUT: 'kicked-out';
-		readonly REMOTE_USER_ENTER: 'remote-user-enter';
-		readonly REMOTE_USER_EXIT: 'remote-user-exit';
-		readonly REMOTE_AUDIO_AVAILABLE: 'remote-audio-available';
-		readonly REMOTE_AUDIO_UNAVAILABLE: 'remote-audio-unavailable';
-		readonly REMOTE_VIDEO_AVAILABLE: 'remote-video-available';
-		readonly REMOTE_VIDEO_UNAVAILABLE: 'remote-video-unavailable';
-		readonly AUDIO_VOLUME: 'audio-volume';
-		readonly NETWORK_QUALITY: 'network-quality';
-		readonly CONNECTION_STATE_CHANGED: 'connection-state-changed';
-		readonly AUDIO_PLAY_STATE_CHANGED: 'audio-play-state-changed';
-		readonly VIDEO_PLAY_STATE_CHANGED: 'video-play-state-changed';
-		readonly SCREEN_SHARE_STOPPED: 'screen-share-stopped';
-		readonly DEVICE_CHANGED: 'device-changed';
-		readonly PUBLISH_STATE_CHANGED: 'publish-state-changed';
-		readonly TRACK: 'track';
-		readonly STATISTICS: 'statistics';
-		readonly SEI_MESSAGE: 'sei-message';
-		readonly CUSTOM_MESSAGE: 'custom-message';
-	};
-  static ERROR_CODE: {
-		INVALID_PARAMETER: number;
-		INVALID_OPERATION: number;
-		ENV_NOT_SUPPORTED: number;
-		DEVICE_ERROR: number;
-		SERVER_ERROR: number;
-		OPERATION_FAILED: number;
-		OPERATION_ABORT: number;
-		UNKNOWN_ERROR: number;
-	};
-  static TYPE: {
-		readonly SCENE_LIVE: Scene.LIVE;
-		readonly SCENE_RTC: Scene.RTC;
-		readonly ROLE_ANCHOR: UserRole.ANCHOR;
-		readonly ROLE_AUDIENCE: UserRole.AUDIENCE;
-		readonly STREAM_TYPE_MAIN: TRTCStreamType.Main;
-		readonly STREAM_TYPE_SUB: TRTCStreamType.Sub;
-		readonly AUDIO_PROFILE_STANDARD: 'standard';
-		readonly AUDIO_PROFILE_STANDARD_STEREO: 'standard-stereo';
-		readonly AUDIO_PROFILE_HIGH: 'high';
-		readonly AUDIO_PROFILE_HIGH_STEREO: 'high-stereo';
-		readonly QOS_PREFERENCE_SMOOTH: 'smooth';
-		readonly QOS_PREFERENCE_CLEAR: 'clear';
-	};
-  static frameWorkType: number;
-  /**
-	 * Set the log output level
-	 * <br>
-	 * It is recommended to set the DEBUG level during development and testing, which includes detailed prompt information.
-	 * The default output level is INFO, which includes the log information of the main functions of the SDK.
-	 *
-	 * @param {0-5} [level] Log output level 0: TRACE 1: DEBUG 2: INFO 3: WARN 4: ERROR 5: NONE
-	 * @param {boolean} [enableUploadLog=true] Whether to enable log upload, which is enabled by default. It is not recommended to turn it off, which will affect problem troubleshooting.
-	 * @example
-	 * // Output log levels above DEBUG
-	 * TRTC.setLogLevel(1);
-	 */
-  static setLogLevel(level: LOG_LEVEL, enableUploadLog?: boolean): void;
-  /**
-	 * Check if the TRTC Web SDK is supported by the current browser
-	 *
-	 * - Reference: {@tutorial 05-info-browser}.
-	 * @example
-	 * TRTC.isSupported().then((checkResult) => {
-	 *   if(!checkResult.result) {
-	 *      console.log('checkResult', checkResult.result, 'checkDetail', checkResult.detail);
-	 *      // The SDK is not supported by the current browser, guide the user to use the latest version of Chrome browser.
-	 *   }
-	 * });
-	 *
-	 * @returns {Promise.<object>} Promise returns the detection result
-	 * | Property                                   | Type    | Description                         |
-	 * |--------------------------------------------|---------|-------------------------------------|
-	 * | checkResult.result                         | boolean | Detection result                             |
-	 * | checkResult.detail.isBrowserSupported      | boolean | Whether the current browser is supported by the SDK        |
-	 * | checkResult.detail.isWebRTCSupported       | boolean | Whether the current browser supports WebRTC               |
-	 * | checkResult.detail.isWebCodecsSupported    | boolean | Whether the current browser supports WebCodecs            |
-	 * | checkResult.detail.isMediaDevicesSupported | boolean | Whether the current browser supports obtaining media devices and media streams     |
-	 * | checkResult.detail.isScreenShareSupported | boolean | Whether the current browser supports screen sharing    |
-	 * | checkResult.detail.isSmallStreamSupported | boolean | Whether the current browser supports small streams     |
-	 * | checkResult.detail.isH264EncodeSupported   | boolean | Whether the current browser supports H264 encoding for uplink         |
-	 * | checkResult.detail.isH264DecodeSupported   | boolean | Whether the current browser supports H264 decoding for downlink         |
-	 * | checkResult.detail.isVp8EncodeSupported    | boolean | Whether the current browser supports VP8 encoding for uplink          |
-	 * | checkResult.detail.isVp8DecodeSupported    | boolean | Whether the current browser supports VP8 decoding for downlink          |
-	 */
-  static isSupported(): Promise<any>;
-  /**
-	 * Returns the list of camera devices
-	 * <br>
-	 * **Note**
-	 * - This interface does not support use under the http protocol, please use the https protocol to deploy your website. {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Privacy_and_security Privacy and security}
-	 * - You can call the browser's native interface [getCapabilities](https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo/getCapabilities) to get the maximum resolutions supported by the camera, frame rate, mobile devices to distinguish between front and rear cameras, etc. This interface supports Chrome 67+, Edge 79+, Safari 17+, Opera 54+.
-	 * @param {boolean} [requestPermission=true] `Since v5.6.3`. Whether to request permission to use the camera. If requestPermission is true, calling this method may temporarily open the camera to ensure that the camera list can be normally obtained, and the SDK will automatically stop the camera capture later.
-	 * @example
-	 * const cameraList = await TRTC.getCameraList();
-	 * if (cameraList[0] && cameraList[0].getCapabilities) {
-	 *   const { width, height, frameRate, facingMode } = cameraList[0].getCapabilities();
-	 *   console.log(width.max, height.max, frameRate.max);
-	 *   if (facingMode) {
-	 *     if (facingMode[0] === 'user') {
-	 *       // front camera
-	 *     } else if (facingMode[0] === 'environment') {
-	 *       // rear camera
-	 *     }
-	 *   }
-	 * }
-	 * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
-	 */
-  static getCameraList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
-  /**
-	 * Returns the list of microphone devices
-	 * <br>
-	 * **Note**
-	 * - This interface does not support use under the http protocol, please use the https protocol to deploy your website. {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Privacy_and_security Privacy and security}
-	 * - You can call the browser's native interface [getCapabilities](https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceInfo/getCapabilities) to get information about the microphone's capabilities, e.g. the maximum number of channels supported, etc. This interface supports Chrome 67+, Edge 79+, Safari 17+, Opera 54+.
-	 * @param {boolean} [requestPermission=true] `Since v5.6.3`. Whether to request permission to use the microphone. If requestPermission is true, calling this method may temporarily open the microphone to ensure that the microphone list can be normally obtained, and the SDK will automatically stop the microphone capture later.
-	 * @example
-	 * const microphoneList = await TRTC.getMicrophoneList();
-	 * if (microphoneList[0] && microphoneList[0].getCapabilities) {
-	 *   const { channelCount } = microphoneList[0].getCapabilities();
-	 *   console.log(channelCount.max);
-	 * }
-	 * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
-	 */
-  static getMicrophoneList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
-  /**
-	 * Returns the list of speaker devices. Only support PC browser, not support mobile browser.
-	 * <br>
-	 * @param {boolean} [requestPermission=true] `Since v5.6.3`. Whether to request permission to use the microphone. If requestPermission is true, calling this method may temporarily open the microphone to ensure that the microphone list can be normally obtained, and the SDK will automatically stop the microphone capture later.
-	 * @returns {Promise.<MediaDeviceInfo[]>} Promise returns an array of {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaDeviceInfo|MediaDeviceInfo}
-	 */
-  static getSpeakerList(requestPermission?: boolean): Promise<MediaDeviceInfo[]>;
-  /**
-	 *  Set the current speaker for audio playback
-	 *
-	 * @param {string} speakerId Speaker ID
-	 */
-  static setCurrentSpeaker(speakerId: string): Promise<void>;
-}
-export default TRTC;

+ 0 - 63
node_modules/trtc-sdk-v5/package.json

@@ -1,63 +0,0 @@
-{
-  "_from": "trtc-sdk-v5",
-  "_id": "trtc-sdk-v5@5.8.3",
-  "_inBundle": false,
-  "_integrity": "sha512-MbcFNLp0NIkWxZaNAnIt6VKmb53a0kBsNB3zn1pocXhPGlXrx/zhyzaonM+VydDU24o0fjQlrvOajUWxuIuF0Q==",
-  "_location": "/trtc-sdk-v5",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "tag",
-    "registry": true,
-    "raw": "trtc-sdk-v5",
-    "name": "trtc-sdk-v5",
-    "escapedName": "trtc-sdk-v5",
-    "rawSpec": "",
-    "saveSpec": null,
-    "fetchSpec": "latest"
-  },
-  "_requiredBy": [
-    "#USER",
-    "/"
-  ],
-  "_resolved": "https://registry.npmmirror.com/trtc-sdk-v5/-/trtc-sdk-v5-5.8.3.tgz",
-  "_shasum": "cefd72ee65bb3042a8b1cc18e18938db5a534e41",
-  "_spec": "trtc-sdk-v5",
-  "_where": "/Users/lianghulin/Documents/HBuilderProjects/recruit-video",
-  "author": {
-    "name": "Tencent Cloud Client R&D Center"
-  },
-  "bugs": {
-    "url": "https://github.com/LiteAVSDK/TRTC_Web/issues"
-  },
-  "bundleDependencies": false,
-  "dependencies": {
-    "webrtc-adapter": "^8.2.3"
-  },
-  "deprecated": false,
-  "description": "Tencent Cloud RTC SDK for Web",
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/TRTC.html",
-  "keywords": [
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication"
-  ],
-  "license": "ISC",
-  "main": "trtc.js",
-  "name": "trtc-sdk-v5",
-  "repository": {
-    "type": "git",
-    "url": "git+ssh://git@github.com/LiteAVSDK/TRTC_Web.git"
-  },
-  "types": "index.d.ts",
-  "version": "5.8.3"
-}

File diff ditekan karena terlalu besar
+ 0 - 8
node_modules/trtc-sdk-v5/plugins/ai-denoiser/denoiser-wasm.js


+ 0 - 76
node_modules/trtc-sdk-v5/plugins/cdn-streaming/cdn-streaming.esm.d.ts

@@ -1,76 +0,0 @@
-export declare interface CDNStreamingOptions {
-    target: Target;
-    encoding?: Encoding;
-    mix?: Mix;
-}
-
-export declare interface Target {
-    publishMode: PublishMode;
-    streamId?: string;
-    appId?: number;
-    bizId?: number;
-    url?: string;
-}
-
-export declare interface Encoding {
-    videoWidth?: number;
-    videoHeight?: number;
-    videoBitrate?: number;
-    videoFramerate?: number;
-    videoGOP?: number;
-    audioSampleRate?: number;
-    audioBitrate?: number;
-    audioChannels?: 1 | 2;
-}
-
-export declare interface Mix {
-    backgroundColor?: number;
-    backgroundImage?: string;
-    audioMixUserList?: User[];
-    videoLayoutList?: VideoLayout[];
-}
-
-export declare interface User {
-    userId: string;
-    roomId?: number;
-    strRoomId?: string;
-}
-
-export declare interface VideoLayout {
-    fixedVideoUser: User;
-    fixedVideoStreamType?: TRTCStreamType;
-    fillMode?: 0 | 1 | 2;
-    width?: number;
-    height?: number;
-    locationX?: number;
-    locationY?: number;
-    zOrder?: number;
-}
-
-export declare enum TRTCStreamType {
-    Main = 'main',
-    Sub = 'sub'
-}
-
-export declare enum PublishMode {
-    PublishMainStreamToCDN = 'PublishMainStreamToCDN',
-    PublishSubStreamToCDN = 'PublishSubStreamToCDN',
-    PublishMixStreamToCDN = 'PublishMixStreamToCDN'
-}
-
-declare class CDNStreaming {
-    static TYPE: {
-        PublishMode: {
-            PublishMainStreamToCDN: PublishMode.PublishMainStreamToCDN;
-            PublishSubStreamToCDN: PublishMode.PublishSubStreamToCDN;
-            PublishMixStreamToCDN: PublishMode.PublishMixStreamToCDN;
-        };
-    };
-
-    start(options: CDNStreamingOptions): Promise<void>;
-    update(options: CDNStreamingOptions): Promise<void>;
-    stop(options: CDNStreamingOptions): Promise<void>;
-}
-
-export { CDNStreaming };
-export default CDNStreaming;

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/cdn-streaming/cdn-streaming.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/cdn-streaming/cdn-streaming.iife.js


+ 0 - 31
node_modules/trtc-sdk-v5/plugins/cdn-streaming/package.json

@@ -1,31 +0,0 @@
-{
-  "name": "@rtc-plugin/cdn-streaming",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK 5.x CDN streaming plugin",
-  "main": "./cdn-streaming.esm.js",
-  "author": "longyuqi <longyuqi@tencent.com>",
-  "module": "./cdn-streaming.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-26-advanced-publish-cdn-stream.html",
-  "keywords": [
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication",
-    "cdn",
-    "mix transcode"
-  ],
-  "types": "./cdn-streaming.esm.d.ts"
-}

+ 0 - 27
node_modules/trtc-sdk-v5/plugins/cross-room/cross-room.esm.d.ts

@@ -1,27 +0,0 @@
-export interface StartCrossRoomOption {
-    roomId?: number,
-    strRoomId?: string,
-    userId?: string
-  }
-
-  interface UpdateCrossRoomOptionItem extends StartCrossRoomOption {
-    muteAudio: boolean,
-    muteVideo: boolean,
-    muteSubStream: boolean,
-  }
-
-export interface UpdateCrossRoomOption {
-    updateList: UpdateCrossRoomOptionItem[]
-  }
-
-export interface StopCrossRoomOption {
-    roomId?: number,
-    strRoomId?: string,
-  }
-
-
-export declare class CrossRoom {
-  start(option: StartCrossRoomOption): Promise<void>;
-  update(option: UpdateCrossRoomOption): Promise<void>;
-  stop(option?: StopCrossRoomOption): Promise<void>;
-}

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/cross-room/cross-room.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/cross-room/cross-room.iife.js


+ 0 - 30
node_modules/trtc-sdk-v5/plugins/cross-room/package.json

@@ -1,30 +0,0 @@
-{
-  "name": "@rtc-plugin/cross-room",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK 5.x Cross Room plugin",
-  "main": "./cross-room.esm.js",
-  "author": "rychouwei <rychouwei@tencent.com>",
-  "module": "./cross-room.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-30-advanced-cross-room-link.html",
-  "keywords": [
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication",
-    "cross-room"
-  ],
-  "types": "./cross-room.esm.d.ts"
-}

+ 0 - 10
node_modules/trtc-sdk-v5/plugins/debug/debug.esm.d.ts

@@ -1,10 +0,0 @@
-// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export declare interface DebugOptions {}
-
-declare class Debug {
-  start(): void;
-  stop(): void;
-}
-
-export { Debug };
-export default Debug;

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/debug/debug.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/debug/debug.iife.js


+ 0 - 30
node_modules/trtc-sdk-v5/plugins/debug/package.json

@@ -1,30 +0,0 @@
-{
-  "name": "@rtc-plugin/debug",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK Debug Plugin",
-  "main": "./debug.esm.js",
-  "author": "leochliu <leochliu@tencent.com>",
-  "module": "./debug.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startPlugin",
-  "keywords": [
-    "debug",
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication"
-  ],
-  "types": "./debug.esm.d.ts"
-}

+ 0 - 26
node_modules/trtc-sdk-v5/plugins/device-detector/device-detector.esm.d.ts

@@ -1,26 +0,0 @@
-export interface DeviceDetectorOptions {
-  networkDetect?: {
-    sdkAppId: number,
-    roomId?: number,
-    userId: string,
-    userSig: string,
-    downlinkUserId?: string,
-    downlinkUserSig?: string
-  }
-}
-
-export interface DeviceDetectorResult {
-  camera: { isSuccess: boolean, device: MediaDeviceInfo };
-  microphone: { isSuccess: boolean, device: MediaDeviceInfo };
-  speaker: { isSuccess: boolean, device: MediaDeviceInfo };
-  network: { isSuccess: boolean, result: { quality: number, rtt: number } };
-}
-
-// export { DeviceDetectorOptions, DeviceDetectorResult };
-
-export declare class DeviceDetector {
-  start(options: DeviceDetectorOptions): Promise<DeviceDetectorResult | undefined>;
-  stop():Promise<void>;
-}
-
-export default DeviceDetector;

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/device-detector/device-detector.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/device-detector/device-detector.iife.js


+ 0 - 29
node_modules/trtc-sdk-v5/plugins/device-detector/package.json

@@ -1,29 +0,0 @@
-{
-  "name": "@rtc-plugin/device-detector",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK 5.x device detector plugin",
-  "main": "./device-detector.esm.js",
-  "author": "edwards <edwards@tencent.com>",
-  "module": "./device-detector.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/zh-cn/TRTC.html#startPlugin",
-  "keywords": [
-    "detect",
-    "device-detect",
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone"
-  ],
-  "types": "./device-detector.esm.d.ts"
-}

+ 0 - 13
node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/basic-beauty.esm.d.ts

@@ -1,13 +0,0 @@
-export interface BasicBeautyOptions {
-    beauty?: number;
-    brightness?: number;
-    ruddy?: number;
-  }
-  
-export declare class BasicBeauty {
-    start(options: BasicBeautyOptions): Promise<void>;
-    update(options: BasicBeautyOptions): Promise<void>;
-    stop(): Promise<void>;
-}
-
-export default BasicBeauty;

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/basic-beauty.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/basic-beauty.iife.js


+ 0 - 30
node_modules/trtc-sdk-v5/plugins/video-effect/basic-beauty/package.json

@@ -1,30 +0,0 @@
-{
-  "name": "@rtc-plugin/basic-beauty",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK 5.x basic-beauty plugin",
-  "main": "./basic-beauty.esm.js",
-  "author": "longyuqi <longyuqi@tencent.com>",
-  "module": "./basic-beauty.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-36-advanced-basic-beauty.html",
-  "keywords": [
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication",
-    "blur background"
-  ],
-  "types": "./basic-beauty.esm.d.ts"
-}

+ 0 - 44
node_modules/trtc-sdk-v5/plugins/video-effect/beauty/beauty.esm.d.ts

@@ -1,44 +0,0 @@
-export interface AuthParam {
-    sdkAppId: number;
-    userId: string;
-    userSig: string;
-}
-
-export interface Effect {
-    id: string;
-    intensity?: number;
-    filterIntensity?: number;
-}
-
-export interface BeautyOptions {
-    sdkAppId: number;
-    userId: string;
-    userSig: string;
-    whiten?: number;
-    dermabrasion?: number;
-    lift?: number;
-    shave?: number;
-    eye?: number;
-    chin?: number;
-    effect?: Effect[];
-    onError?: () => {}
-}
-
-
-export interface UpdateBeautyOptions {
-    whiten?: number;
-    dermabrasion?: number;
-    lift?: number;
-    shave?: number;
-    eye?: number;
-    chin?: number;
-    effect?: Effect[];
-}
-
-export declare class Beauty {
-    start(options: BeautyOptions): Promise<void>;
-    update(options: UpdateBeautyOptions): Promise<void>;
-    stop(): Promise<void>;
-}
-
-export default Beauty;

File diff ditekan karena terlalu besar
+ 0 - 208
node_modules/trtc-sdk-v5/plugins/video-effect/beauty/beauty.esm.js


File diff ditekan karena terlalu besar
+ 0 - 208
node_modules/trtc-sdk-v5/plugins/video-effect/beauty/beauty.iife.js


+ 0 - 30
node_modules/trtc-sdk-v5/plugins/video-effect/beauty/package.json

@@ -1,30 +0,0 @@
-{
-  "name": "@rtc-plugin/beauty",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK 5.x beauty plugin",
-  "main": "./beauty.esm.js",
-  "author": "longyuqi <longyuqi@tencent.com>",
-  "module": "./beauty.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-36-advanced-beauty.html",
-  "keywords": [
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication",
-    "blur background"
-  ],
-  "types": "./beauty.esm.d.ts"
-}

+ 0 - 30
node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/package.json

@@ -1,30 +0,0 @@
-{
-  "name": "@rtc-plugin/virtual-background",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK 5.x virtual background plugin",
-  "main": "./virtual-background.esm.js",
-  "author": "longyuqi <longyuqi@tencent.com>",
-  "module": "./virtual-background.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-36-advanced-virtual-background.html",
-  "keywords": [
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication",
-    "blur background"
-  ],
-  "types": "./virtual-background.esm.d.ts"
-}

+ 0 - 31
node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/virtual-background.esm.d.ts

@@ -1,31 +0,0 @@
-export interface AuthParam {
-    sdkAppId: number;
-    userId: string;
-    userSig: string;
-}
-
-export interface VirtualBackgroundOptions {
-    sdkAppId: number;
-    userId: string;
-    userSig: string;
-    type?: 'image' | 'blur';
-    blurLevel?: number;
-    src?: string;
-    onAbort?: (err:any) => void;
-}
-
-
-export interface UpdateVirtualBackgroundOptions {
-    type: 'image' | 'blur';
-    blurLevel?: number;
-    src?: string;
-}
-
-export declare class VirtualBackground {
-    static isSupported(): boolean;
-    start(options: VirtualBackgroundOptions): Promise<void>;
-    update(options: UpdateVirtualBackgroundOptions): Promise<void>;
-    stop(): Promise<void>;
-}
-
-export default VirtualBackground;

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/virtual-background.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/video-effect/virtual-background/virtual-background.iife.js


+ 0 - 30
node_modules/trtc-sdk-v5/plugins/video-effect/watermark/package.json

@@ -1,30 +0,0 @@
-{
-  "name": "@rtc-plugin/watermark",
-  "version": "5.8.3",
-  "description": "TRTC Web SDK 5.x watermark plugin",
-  "main": "./watermark.esm.js",
-  "author": "longyuqi <longyuqi@tencent.com>",
-  "module": "./watermark.esm.js",
-  "repository": {
-    "type": "git",
-    "url": "git@github.com:LiteAVSDK/TRTC_Web.git"
-  },
-  "homepage": "https://web.sdk.qcloud.com/trtc/webrtc/v5/doc/en/tutorial-36-advanced-watermark.html",
-  "keywords": [
-    "webrtc",
-    "TRTC",
-    "rtc",
-    "call",
-    "video call",
-    "audio call",
-    "javascript",
-    "video",
-    "audio",
-    "camera",
-    "microphone",
-    "live streaming",
-    "real-time communication",
-    "blur background"
-  ],
-  "types": "./watermark.esm.d.ts"
-}

+ 0 - 10
node_modules/trtc-sdk-v5/plugins/video-effect/watermark/watermark.esm.d.ts

@@ -1,10 +0,0 @@
-import { WatermarkOptions } from '../src/enums';
-
-export { WatermarkOptions };
-
-export declare class Watermark {
-    start(options: WatermarkOptions): Promise<void>;
-    stop(): Promise<void>;
-}
-
-export default Watermark;

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/video-effect/watermark/watermark.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/plugins/video-effect/watermark/watermark.iife.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/trtc.esm.js


File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/trtc-sdk-v5/trtc.js


+ 0 - 70
node_modules/webrtc-adapter/.eslintrc

@@ -1,70 +0,0 @@
-{
-  "rules": {
-    "array-bracket-spacing": 2,
-    "block-spacing": [2, "never"],
-    "brace-style": [2, "1tbs", {"allowSingleLine": false}],
-    "camelcase": [2, {"properties": "always"}],
-    "curly": 2,
-    "default-case": 2,
-    "dot-notation": 2,
-    "eqeqeq": 2,
-    "id-match": ["error", "^[\x00-\x7F]+$", {
-        "properties": true,
-        "onlyDeclarations": false,
-        "ignoreDestructuring": false
-    }],
-    "indent": [
-        2,
-        2,
-        {"SwitchCase": 1}
-    ],
-    "key-spacing": [2, {"beforeColon": false, "afterColon": true}],
-    "keyword-spacing": 2,
-    "max-len": [2, 80, 2, {"ignoreUrls": true}],
-    "new-cap": [2, {"newIsCapExceptions": [
-        "webkitRTCPeerConnection",
-        "mozRTCPeerConnection"
-    ]}],
-    "no-console": 0,
-    "no-else-return": 2,
-    "no-eval": 2,
-    "no-multi-spaces": 2,
-    "no-multiple-empty-lines": [2, {"max": 2}],
-    "no-shadow": 2,
-    "no-trailing-spaces": 2,
-    "no-unused-expressions": 2,
-    "no-unused-vars": [2, {"args": "none"}],
-    "object-curly-spacing": [2, "never"],
-    "padded-blocks": [2, "never"],
-    "quotes": [
-        2,
-        "single"
-    ],
-    "semi": [
-        2,
-        "always"
-    ],
-    "space-before-blocks": 2,
-    "space-before-function-paren": [2, "never"],
-    "space-unary-ops": 2,
-    "space-infix-ops": 2,
-    "spaced-comment": 2,
-    "valid-typeof": 2
-  },
-  "env": {
-      "browser": true,
-      "es6": true,
-      "node": true
-  },
-  "extends": ["eslint:recommended"],
-  "parserOptions": {
-    "sourceType": "module"
-  },
-  "globals": {
-    "module": true,
-    "require": true,
-    "process": true,
-    "Promise": true,
-    "Map": true
-  }
-}

+ 0 - 65
node_modules/webrtc-adapter/.travis.yml

@@ -1,65 +0,0 @@
-sudo: false
-language: node_js
-dist: trusty
-node_js:
-- "7"
-
-env:
-  - CXX=g++-4.8
-matrix:
-  include:
-    - os: linux
-      sudo: false
-      env: BROWSER=chrome  BVER=stable
-    - os: linux
-      sudo: false
-      env: BROWSER=chrome  BVER=beta
-    - os: linux
-      sudo: false
-      env: BROWSER=chrome  BVER=unstable
-    - os: linux
-      sudo: false
-      env: BROWSER=firefox BVER=stable
-    - os: linux
-      sudo: false
-      env: BROWSER=firefox BVER=beta
-    - os: linux
-      sudo: false
-      env: BROWSER=firefox BVER=unstable
-    - os: osx
-      sudo: required
-      osx_image: xcode9.4
-      env: BROWSER=safari BVER=stable
-    - os: osx
-      sudo: required
-      osx_image: xcode11.2
-      env: BROWSER=safari BVER=unstable
-
-  fast_finish: true
-
-  allow_failures:
-    - os: linux
-      sudo: false
-      env: BROWSER=chrome  BVER=unstable
-    - os: linux
-      sudo: false
-      env: BROWSER=firefox BVER=unstable
-
-before_script:
-  - ./node_modules/travis-multirunner/setup.sh
-  - export DISPLAY=:99.0
-  - if [ -f /etc/init.d/xvfb ]; then sh -e /etc/init.d/xvfb start; fi
-
-after_failure:
-  - for file in *.log; do echo $file; echo "======================"; cat $file; done || true
-
-notifications:
-  email:
-  - 
-
-addons:
-  apt:
-    sources:
-      - ubuntu-toolchain-r-test
-    packages:
-      - g++-4.8

+ 0 - 15
node_modules/webrtc-adapter/CONTRIBUTING.md

@@ -1,15 +0,0 @@
-WebRTC welcomes patches/pulls for features and bug fixes.
-
-For contributors external to Google, follow the instructions given in the [Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual).
-
-In all cases, contributors must sign a contributor license agreement before a contribution can be accepted. Please complete the agreement for an [individual](https://developers.google.com/open-source/cla/individual) or a [corporation](https://developers.google.com/open-source/cla/corporate) as appropriate.
-
-If you plan to add a significant component or large chunk of code, we recommend you bring this up on the [webrtc-discuss group](https://groups.google.com/forum/#!forum/discuss-webrtc) for a design discussion before writing code.
-
-If appropriate, write a unit test which demonstrates that your code functions as expected. Tests are the best way to ensure that future contributors do not break your code accidentally.
-
-To request a change or addition, you must [submit a pull request](https://help.github.com/categories/collaborating/).
-
-WebRTC developers monitor outstanding pull requests. They may request changes to the pull request before accepting. They will also verify that a CLA has been signed.
-
-The [Developer's Guide](https://bit.ly/webrtcdevguide) for this repo has more detailed information about code style, structure and validation.

+ 0 - 71
node_modules/webrtc-adapter/Gruntfile.js

@@ -1,71 +0,0 @@
-'use strict';
-
-module.exports = function(grunt) {
-  grunt.initConfig({
-    pkg: grunt.file.readJSON('package.json'),
-    babel: {
-      options: {
-        presets: ['@babel/preset-env']
-      },
-      dist: {
-        files: [{
-          expand: 'true',
-          cwd: 'src/js',
-          src: ['*.js', '**/*.js'],
-          dest: 'dist/'
-        }]
-      }
-    },
-    browserify: {
-      adapterGlobalObject: {
-        src: ['./dist/adapter_core5.js'],
-        dest: './out/adapter.js',
-        options: {
-          browserifyOptions: {
-            // Exposes shim methods in a global object to the browser.
-            // The tests require this.
-            standalone: 'adapter'
-          }
-        }
-      },
-      // Use this if you do not want adapter to expose anything to the global
-      // scope.
-      adapterAndNoGlobalObject: {
-        src: ['./dist/adapter_core5.js'],
-        dest: './out/adapter_no_global.js'
-      }
-    },
-    eslint: {
-      options: {
-        overrideConfigFile: '.eslintrc'
-      },
-      target: ['src/**/*.js', 'test/*.js', 'test/unit/*.js', 'test/e2e/*.js']
-    },
-    copy: {
-      build: {
-        dest: 'release/',
-        cwd: 'out',
-        src: '**',
-        nonull: true,
-        expand: true
-      }
-    },
-    shell: {
-      downloadBrowser : {
-        command: 'BROWSER=${BROWSER-chrome} BVER=${BVER-stable} ./node_modules/travis-multirunner/setup.sh'
-      },
-    },
-  });
-
-  grunt.loadNpmTasks('grunt-eslint');
-  grunt.loadNpmTasks('grunt-browserify');
-  grunt.loadNpmTasks('grunt-babel');
-  grunt.loadNpmTasks('grunt-contrib-copy');
-  grunt.loadNpmTasks('grunt-shell');
-
-  grunt.registerTask('default', ['eslint', 'build']);
-  grunt.registerTask('lint', ['eslint']);
-  grunt.registerTask('build', ['babel', 'browserify']);
-  grunt.registerTask('copyForPublish', ['copy']);
-  grunt.registerTask('downloadBrowser', ['shell:downloadBrowser'])
-};

+ 0 - 30
node_modules/webrtc-adapter/LICENSE.md

@@ -1,30 +0,0 @@
-Copyright (c) 2014, The WebRTC project authors. All rights reserved.
-Copyright (c) 2018, The adapter.js project authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-  * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-
-  * Neither the name of Google nor the names of its contributors may
-    be used to endorse or promote products derived from this software
-    without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 0 - 79
node_modules/webrtc-adapter/README.md

@@ -1,79 +0,0 @@
-# WebRTC adapter #
-adapter.js is a shim to insulate apps from spec changes and prefix differences in WebRTC. The prefix differences are mostly gone these days but differences in behaviour between browsers remain.
-
-This repository used to be part of the WebRTC organisation on github but moved. We aim to keep the old repository updated with new releases.
-
-## Install ##
-
-#### NPM
-```bash
-npm install webrtc-adapter
-```
-
-#### Bower
-```bash
-bower install webrtc-adapter
-```
-
-## Usage ##
-##### Javascript
-Just import adapter:
-```
-import adapter from 'webrtc-adapter';
-```
-No further action is required. You might want to use adapters browser detection
-which detects which webrtc quirks are required. You can look at
-```
-adapter.browserDetails.browser
-```
-for webrtc engine detection (which will for example detect Opera or the Chromium based Edge as 'chrome') and
-```
-adapter.browserDetails.version
-```
-for the version according to the user-agent string.
-
-##### NPM
-Copy to desired location in your src tree or use a minify/vulcanize tool (node_modules is usually not published with the code).
-See [webrtc/samples repo](https://github.com/webrtc/samples) as an example on how you can do this.
-
-#### Prebuilt releases
-##### Web
-In the [gh-pages branch](https://github.com/webrtcHacks/adapter/tree/gh-pages) prebuilt ready to use files can be downloaded/linked directly.
-Latest version can be found at https://webrtc.github.io/adapter/adapter-latest.js.
-Specific versions can be found at https://webrtc.github.io/adapter/adapter-N.N.N.js, e.g. https://webrtc.github.io/adapter/adapter-1.0.2.js.
-
-##### Bower
-You will find `adapter.js` in `bower_components/webrtc-adapter/`.
-
-##### NPM
-In node_modules/webrtc-adapter/out/ folder you will find 4 files:
-* `adapter.js` - includes all the shims and is visible in the browser under the global `adapter` object (window.adapter).
-* `adapter_no_global.js` - same as `adapter.js` but is not exposed/visible in the browser (you cannot call/interact with the shims in the browser).
-
-Include the file that suits your need in your project.
-
-## Development ##
-Head over to [test/README.md](https://github.com/webrtcHacks/adapter/blob/master/test/README.md) and get started developing.
-
-## Publish a new version ##
-* Go to the adapter repository root directory
-* Make sure your repository is clean, i.e. no untracked files etc. Also check that you are on the master branch and have pulled the latest changes.
-* Depending on the impact of the release, either use `patch`, `minor` or `major` in place of `<version>`. Run `npm version <version> -m 'bump to %s'` and type in your password lots of times (setting up credential caching is probably a good idea).
-* Create and merge the PR if green in the GitHub web ui
-* Go to the releases tab in the GitHub web ui and edit the tag.
-* Add a summary of the recent commits in the tag summary and a link to the diff between the previous and current version in the description, [example](https://github.com/webrtcHacks/adapter/releases/tag/v3.4.1).
-* Go back to your checkout and run `git pull`
-* Run `npm publish` (you need access to the [webrtc-adapter npmjs package](https://www.npmjs.com/package/webrtc-adapter)). For big changes, consider using a [tag version](https://docs.npmjs.com/adding-dist-tags-to-packages) such as `next` and then [change the dist-tag after testing](https://docs.npmjs.com/cli/dist-tag).
-* Done! There should now be a new release published to NPM and the gh-pages branch.
-
-Note: Currently only tested on Linux, not sure about Mac but will definitely not work on Windows.
-
-### Publish a hotfix patch versions
-In some cases it may be necessary to do a patch version while there are significant changes changes on the master branch.
-To make a patch release,
-* checkout the latest git tag using `git checkout tags/vMajor.minor.patch`.
-* checkout a new branch, using a name such as patchrelease-major-minor-patch. 
-* cherry-pick the fixes using `git cherry-pick some-commit-hash`.
-* run `npm version patch`. This will create a new patch version and publish it on github.
-* check out `origin/bumpVersion` branch and publish the new version using `npm publish`.
-* the branch can now safely be deleted. It is not necessary to merge it into the main branch since it only contains cherry-picked commits.

+ 0 - 25
node_modules/webrtc-adapter/bower.json

@@ -1,25 +0,0 @@
-{
-  "name": "webrtc-adapter",
-  "description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences",
-  "license": "BSD-3-Clause",
-  "main": "./release/adapter.js",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/webrtchacks/adapter.git"
-  },
-  "authors": [
-    "The WebRTC project authors (https://www.webrtc.org/)",
-    "The adapter.js project authors (https://github.com/webrtchacks/adapter/)"
-  ],
-  "moduleType": [
-    "node"
-  ],
-  "ignore": [
-    "test/*"
-  ],
-  "keywords": [
-    "WebRTC",
-    "RTCPeerConnection",
-    "getUserMedia"
-  ]
-}

+ 0 - 21
node_modules/webrtc-adapter/dist/adapter_core.js

@@ -1,21 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports["default"] = void 0;
-var _adapter_factory = require("./adapter_factory.js");
-var adapter = (0, _adapter_factory.adapterFactory)({
-  window: typeof window === 'undefined' ? undefined : window
-});
-var _default = adapter;
-exports["default"] = _default;

+ 0 - 16
node_modules/webrtc-adapter/dist/adapter_core5.js

@@ -1,16 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-
-'use strict';
-
-var _adapter_factory = require("./adapter_factory.js");
-var adapter = (0, _adapter_factory.adapterFactory)({
-  window: typeof window === 'undefined' ? undefined : window
-});
-module.exports = adapter; // this is the difference from adapter_core.

+ 0 - 141
node_modules/webrtc-adapter/dist/adapter_factory.js

@@ -1,141 +0,0 @@
-"use strict";
-
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.adapterFactory = adapterFactory;
-var utils = _interopRequireWildcard(require("./utils"));
-var chromeShim = _interopRequireWildcard(require("./chrome/chrome_shim"));
-var firefoxShim = _interopRequireWildcard(require("./firefox/firefox_shim"));
-var safariShim = _interopRequireWildcard(require("./safari/safari_shim"));
-var commonShim = _interopRequireWildcard(require("./common_shim"));
-var sdp = _interopRequireWildcard(require("sdp"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-
-// Browser shims.
-
-// Shimming starts here.
-function adapterFactory() {
-  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
-    window = _ref.window;
-  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
-    shimChrome: true,
-    shimFirefox: true,
-    shimSafari: true
-  };
-  // Utils.
-  var logging = utils.log;
-  var browserDetails = utils.detectBrowser(window);
-  var adapter = {
-    browserDetails: browserDetails,
-    commonShim: commonShim,
-    extractVersion: utils.extractVersion,
-    disableLog: utils.disableLog,
-    disableWarnings: utils.disableWarnings,
-    // Expose sdp as a convenience. For production apps include directly.
-    sdp: sdp
-  };
-
-  // Shim browser if found.
-  switch (browserDetails.browser) {
-    case 'chrome':
-      if (!chromeShim || !chromeShim.shimPeerConnection || !options.shimChrome) {
-        logging('Chrome shim is not included in this adapter release.');
-        return adapter;
-      }
-      if (browserDetails.version === null) {
-        logging('Chrome shim can not determine version, not shimming.');
-        return adapter;
-      }
-      logging('adapter.js shimming chrome.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = chromeShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      chromeShim.shimGetUserMedia(window, browserDetails);
-      chromeShim.shimMediaStream(window, browserDetails);
-      chromeShim.shimPeerConnection(window, browserDetails);
-      chromeShim.shimOnTrack(window, browserDetails);
-      chromeShim.shimAddTrackRemoveTrack(window, browserDetails);
-      chromeShim.shimGetSendersWithDtmf(window, browserDetails);
-      chromeShim.shimGetStats(window, browserDetails);
-      chromeShim.shimSenderReceiverGetStats(window, browserDetails);
-      chromeShim.fixNegotiationNeeded(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    case 'firefox':
-      if (!firefoxShim || !firefoxShim.shimPeerConnection || !options.shimFirefox) {
-        logging('Firefox shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming firefox.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = firefoxShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      firefoxShim.shimGetUserMedia(window, browserDetails);
-      firefoxShim.shimPeerConnection(window, browserDetails);
-      firefoxShim.shimOnTrack(window, browserDetails);
-      firefoxShim.shimRemoveStream(window, browserDetails);
-      firefoxShim.shimSenderGetStats(window, browserDetails);
-      firefoxShim.shimReceiverGetStats(window, browserDetails);
-      firefoxShim.shimRTCDataChannel(window, browserDetails);
-      firefoxShim.shimAddTransceiver(window, browserDetails);
-      firefoxShim.shimGetParameters(window, browserDetails);
-      firefoxShim.shimCreateOffer(window, browserDetails);
-      firefoxShim.shimCreateAnswer(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      break;
-    case 'safari':
-      if (!safariShim || !options.shimSafari) {
-        logging('Safari shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming safari.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = safariShim;
-
-      // Must be called before shimCallbackAPI.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      safariShim.shimRTCIceServerUrls(window, browserDetails);
-      safariShim.shimCreateOfferLegacy(window, browserDetails);
-      safariShim.shimCallbacksAPI(window, browserDetails);
-      safariShim.shimLocalStreamsAPI(window, browserDetails);
-      safariShim.shimRemoteStreamsAPI(window, browserDetails);
-      safariShim.shimTrackEventTransceiver(window, browserDetails);
-      safariShim.shimGetUserMedia(window, browserDetails);
-      safariShim.shimAudioContext(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    default:
-      logging('Unsupported browser!');
-      break;
-  }
-  return adapter;
-}

+ 0 - 698
node_modules/webrtc-adapter/dist/chrome/chrome_shim.js

@@ -1,698 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.fixNegotiationNeeded = fixNegotiationNeeded;
-exports.shimAddTrackRemoveTrack = shimAddTrackRemoveTrack;
-exports.shimAddTrackRemoveTrackWithNative = shimAddTrackRemoveTrackWithNative;
-Object.defineProperty(exports, "shimGetDisplayMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getdisplaymedia.shimGetDisplayMedia;
-  }
-});
-exports.shimGetSendersWithDtmf = shimGetSendersWithDtmf;
-exports.shimGetStats = shimGetStats;
-Object.defineProperty(exports, "shimGetUserMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getusermedia.shimGetUserMedia;
-  }
-});
-exports.shimMediaStream = shimMediaStream;
-exports.shimOnTrack = shimOnTrack;
-exports.shimPeerConnection = shimPeerConnection;
-exports.shimSenderReceiverGetStats = shimSenderReceiverGetStats;
-var utils = _interopRequireWildcard(require("../utils.js"));
-var _getusermedia = require("./getusermedia");
-var _getdisplaymedia = require("./getdisplaymedia");
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimMediaStream(window) {
-  window.MediaStream = window.MediaStream || window.webkitMediaStream;
-}
-function shimOnTrack(window) {
-  if (_typeof(window) === 'object' && window.RTCPeerConnection && !('ontrack' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
-      get: function get() {
-        return this._ontrack;
-      },
-      set: function set(f) {
-        if (this._ontrack) {
-          this.removeEventListener('track', this._ontrack);
-        }
-        this.addEventListener('track', this._ontrack = f);
-      },
-      enumerable: true,
-      configurable: true
-    });
-    var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-      var _this = this;
-      if (!this._ontrackpoly) {
-        this._ontrackpoly = function (e) {
-          // onaddstream does not fire when a track is added to an existing
-          // stream. But stream.onaddtrack is implemented so we use that.
-          e.stream.addEventListener('addtrack', function (te) {
-            var receiver;
-            if (window.RTCPeerConnection.prototype.getReceivers) {
-              receiver = _this.getReceivers().find(function (r) {
-                return r.track && r.track.id === te.track.id;
-              });
-            } else {
-              receiver = {
-                track: te.track
-              };
-            }
-            var event = new Event('track');
-            event.track = te.track;
-            event.receiver = receiver;
-            event.transceiver = {
-              receiver: receiver
-            };
-            event.streams = [e.stream];
-            _this.dispatchEvent(event);
-          });
-          e.stream.getTracks().forEach(function (track) {
-            var receiver;
-            if (window.RTCPeerConnection.prototype.getReceivers) {
-              receiver = _this.getReceivers().find(function (r) {
-                return r.track && r.track.id === track.id;
-              });
-            } else {
-              receiver = {
-                track: track
-              };
-            }
-            var event = new Event('track');
-            event.track = track;
-            event.receiver = receiver;
-            event.transceiver = {
-              receiver: receiver
-            };
-            event.streams = [e.stream];
-            _this.dispatchEvent(event);
-          });
-        };
-        this.addEventListener('addstream', this._ontrackpoly);
-      }
-      return origSetRemoteDescription.apply(this, arguments);
-    };
-  } else {
-    // even if RTCRtpTransceiver is in window, it is only used and
-    // emitted in unified-plan. Unfortunately this means we need
-    // to unconditionally wrap the event.
-    utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-      if (!e.transceiver) {
-        Object.defineProperty(e, 'transceiver', {
-          value: {
-            receiver: e.receiver
-          }
-        });
-      }
-      return e;
-    });
-  }
-}
-function shimGetSendersWithDtmf(window) {
-  // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.
-  if (_typeof(window) === 'object' && window.RTCPeerConnection && !('getSenders' in window.RTCPeerConnection.prototype) && 'createDTMFSender' in window.RTCPeerConnection.prototype) {
-    var shimSenderWithDtmf = function shimSenderWithDtmf(pc, track) {
-      return {
-        track: track,
-        get dtmf() {
-          if (this._dtmf === undefined) {
-            if (track.kind === 'audio') {
-              this._dtmf = pc.createDTMFSender(track);
-            } else {
-              this._dtmf = null;
-            }
-          }
-          return this._dtmf;
-        },
-        _pc: pc
-      };
-    };
-
-    // augment addTrack when getSenders is not available.
-    if (!window.RTCPeerConnection.prototype.getSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        this._senders = this._senders || [];
-        return this._senders.slice(); // return a copy of the internal state.
-      };
-
-      var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-      window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-        var sender = origAddTrack.apply(this, arguments);
-        if (!sender) {
-          sender = shimSenderWithDtmf(this, track);
-          this._senders.push(sender);
-        }
-        return sender;
-      };
-      var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-      window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-        origRemoveTrack.apply(this, arguments);
-        var idx = this._senders.indexOf(sender);
-        if (idx !== -1) {
-          this._senders.splice(idx, 1);
-        }
-      };
-    }
-    var origAddStream = window.RTCPeerConnection.prototype.addStream;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      var _this2 = this;
-      this._senders = this._senders || [];
-      origAddStream.apply(this, [stream]);
-      stream.getTracks().forEach(function (track) {
-        _this2._senders.push(shimSenderWithDtmf(_this2, track));
-      });
-    };
-    var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-    window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-      var _this3 = this;
-      this._senders = this._senders || [];
-      origRemoveStream.apply(this, [stream]);
-      stream.getTracks().forEach(function (track) {
-        var sender = _this3._senders.find(function (s) {
-          return s.track === track;
-        });
-        if (sender) {
-          // remove sender
-          _this3._senders.splice(_this3._senders.indexOf(sender), 1);
-        }
-      });
-    };
-  } else if (_typeof(window) === 'object' && window.RTCPeerConnection && 'getSenders' in window.RTCPeerConnection.prototype && 'createDTMFSender' in window.RTCPeerConnection.prototype && window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {
-    var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      var _this4 = this;
-      var senders = origGetSenders.apply(this, []);
-      senders.forEach(function (sender) {
-        return sender._pc = _this4;
-      });
-      return senders;
-    };
-    Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {
-      get: function get() {
-        if (this._dtmf === undefined) {
-          if (this.track.kind === 'audio') {
-            this._dtmf = this._pc.createDTMFSender(this.track);
-          } else {
-            this._dtmf = null;
-          }
-        }
-        return this._dtmf;
-      }
-    });
-  }
-}
-function shimGetStats(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  var origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    var _this5 = this;
-    var _arguments = Array.prototype.slice.call(arguments),
-      selector = _arguments[0],
-      onSucc = _arguments[1],
-      onErr = _arguments[2];
-
-    // If selector is a function then we are in the old style stats so just
-    // pass back the original getStats format to avoid breaking old users.
-    if (arguments.length > 0 && typeof selector === 'function') {
-      return origGetStats.apply(this, arguments);
-    }
-
-    // When spec-style getStats is supported, return those when called with
-    // either no arguments or the selector argument is null.
-    if (origGetStats.length === 0 && (arguments.length === 0 || typeof selector !== 'function')) {
-      return origGetStats.apply(this, []);
-    }
-    var fixChromeStats_ = function fixChromeStats_(response) {
-      var standardReport = {};
-      var reports = response.result();
-      reports.forEach(function (report) {
-        var standardStats = {
-          id: report.id,
-          timestamp: report.timestamp,
-          type: {
-            localcandidate: 'local-candidate',
-            remotecandidate: 'remote-candidate'
-          }[report.type] || report.type
-        };
-        report.names().forEach(function (name) {
-          standardStats[name] = report.stat(name);
-        });
-        standardReport[standardStats.id] = standardStats;
-      });
-      return standardReport;
-    };
-
-    // shim getStats with maplike support
-    var makeMapStats = function makeMapStats(stats) {
-      return new Map(Object.keys(stats).map(function (key) {
-        return [key, stats[key]];
-      }));
-    };
-    if (arguments.length >= 2) {
-      var successCallbackWrapper_ = function successCallbackWrapper_(response) {
-        onSucc(makeMapStats(fixChromeStats_(response)));
-      };
-      return origGetStats.apply(this, [successCallbackWrapper_, selector]);
-    }
-
-    // promise-support
-    return new Promise(function (resolve, reject) {
-      origGetStats.apply(_this5, [function (response) {
-        resolve(makeMapStats(fixChromeStats_(response)));
-      }, reject]);
-    }).then(onSucc, onErr);
-  };
-}
-function shimSenderReceiverGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender && window.RTCRtpReceiver)) {
-    return;
-  }
-
-  // shim sender stats.
-  if (!('getStats' in window.RTCRtpSender.prototype)) {
-    var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    if (origGetSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        var _this6 = this;
-        var senders = origGetSenders.apply(this, []);
-        senders.forEach(function (sender) {
-          return sender._pc = _this6;
-        });
-        return senders;
-      };
-    }
-    var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-    if (origAddTrack) {
-      window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-        var sender = origAddTrack.apply(this, arguments);
-        sender._pc = this;
-        return sender;
-      };
-    }
-    window.RTCRtpSender.prototype.getStats = function getStats() {
-      var sender = this;
-      return this._pc.getStats().then(function (result) {
-        return (
-          /* Note: this will include stats of all senders that
-           *   send a track with the same id as sender.track as
-           *   it is not possible to identify the RTCRtpSender.
-           */
-          utils.filterStats(result, sender.track, true)
-        );
-      });
-    };
-  }
-
-  // shim receiver stats.
-  if (!('getStats' in window.RTCRtpReceiver.prototype)) {
-    var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-    if (origGetReceivers) {
-      window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
-        var _this7 = this;
-        var receivers = origGetReceivers.apply(this, []);
-        receivers.forEach(function (receiver) {
-          return receiver._pc = _this7;
-        });
-        return receivers;
-      };
-    }
-    utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-      e.receiver._pc = e.srcElement;
-      return e;
-    });
-    window.RTCRtpReceiver.prototype.getStats = function getStats() {
-      var receiver = this;
-      return this._pc.getStats().then(function (result) {
-        return utils.filterStats(result, receiver.track, false);
-      });
-    };
-  }
-  if (!('getStats' in window.RTCRtpSender.prototype && 'getStats' in window.RTCRtpReceiver.prototype)) {
-    return;
-  }
-
-  // shim RTCPeerConnection.getStats(track).
-  var origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    if (arguments.length > 0 && arguments[0] instanceof window.MediaStreamTrack) {
-      var track = arguments[0];
-      var sender;
-      var receiver;
-      var err;
-      this.getSenders().forEach(function (s) {
-        if (s.track === track) {
-          if (sender) {
-            err = true;
-          } else {
-            sender = s;
-          }
-        }
-      });
-      this.getReceivers().forEach(function (r) {
-        if (r.track === track) {
-          if (receiver) {
-            err = true;
-          } else {
-            receiver = r;
-          }
-        }
-        return r.track === track;
-      });
-      if (err || sender && receiver) {
-        return Promise.reject(new DOMException('There are more than one sender or receiver for the track.', 'InvalidAccessError'));
-      } else if (sender) {
-        return sender.getStats();
-      } else if (receiver) {
-        return receiver.getStats();
-      }
-      return Promise.reject(new DOMException('There is no sender or receiver for the track.', 'InvalidAccessError'));
-    }
-    return origGetStats.apply(this, arguments);
-  };
-}
-function shimAddTrackRemoveTrackWithNative(window) {
-  // shim addTrack/removeTrack with native variants in order to make
-  // the interactions with legacy getLocalStreams behave as in other browsers.
-  // Keeps a mapping stream.id => [stream, rtpsenders...]
-  window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-    var _this8 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    return Object.keys(this._shimmedLocalStreams).map(function (streamId) {
-      return _this8._shimmedLocalStreams[streamId][0];
-    });
-  };
-  var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-    if (!stream) {
-      return origAddTrack.apply(this, arguments);
-    }
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    var sender = origAddTrack.apply(this, arguments);
-    if (!this._shimmedLocalStreams[stream.id]) {
-      this._shimmedLocalStreams[stream.id] = [stream, sender];
-    } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) {
-      this._shimmedLocalStreams[stream.id].push(sender);
-    }
-    return sender;
-  };
-  var origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    var _this9 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    stream.getTracks().forEach(function (track) {
-      var alreadyExists = _this9.getSenders().find(function (s) {
-        return s.track === track;
-      });
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.', 'InvalidAccessError');
-      }
-    });
-    var existingSenders = this.getSenders();
-    origAddStream.apply(this, arguments);
-    var newSenders = this.getSenders().filter(function (newSender) {
-      return existingSenders.indexOf(newSender) === -1;
-    });
-    this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders);
-  };
-  var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    delete this._shimmedLocalStreams[stream.id];
-    return origRemoveStream.apply(this, arguments);
-  };
-  var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-  window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-    var _this10 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    if (sender) {
-      Object.keys(this._shimmedLocalStreams).forEach(function (streamId) {
-        var idx = _this10._shimmedLocalStreams[streamId].indexOf(sender);
-        if (idx !== -1) {
-          _this10._shimmedLocalStreams[streamId].splice(idx, 1);
-        }
-        if (_this10._shimmedLocalStreams[streamId].length === 1) {
-          delete _this10._shimmedLocalStreams[streamId];
-        }
-      });
-    }
-    return origRemoveTrack.apply(this, arguments);
-  };
-}
-function shimAddTrackRemoveTrack(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // shim addTrack and removeTrack.
-  if (window.RTCPeerConnection.prototype.addTrack && browserDetails.version >= 65) {
-    return shimAddTrackRemoveTrackWithNative(window);
-  }
-
-  // also shim pc.getLocalStreams when addTrack is shimmed
-  // to return the original streams.
-  var origGetLocalStreams = window.RTCPeerConnection.prototype.getLocalStreams;
-  window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-    var _this11 = this;
-    var nativeStreams = origGetLocalStreams.apply(this);
-    this._reverseStreams = this._reverseStreams || {};
-    return nativeStreams.map(function (stream) {
-      return _this11._reverseStreams[stream.id];
-    });
-  };
-  var origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    var _this12 = this;
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    stream.getTracks().forEach(function (track) {
-      var alreadyExists = _this12.getSenders().find(function (s) {
-        return s.track === track;
-      });
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.', 'InvalidAccessError');
-      }
-    });
-    // Add identity mapping for consistency with addTrack.
-    // Unless this is being used with a stream from addTrack.
-    if (!this._reverseStreams[stream.id]) {
-      var newStream = new window.MediaStream(stream.getTracks());
-      this._streams[stream.id] = newStream;
-      this._reverseStreams[newStream.id] = stream;
-      stream = newStream;
-    }
-    origAddStream.apply(this, [stream]);
-  };
-  var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    origRemoveStream.apply(this, [this._streams[stream.id] || stream]);
-    delete this._reverseStreams[this._streams[stream.id] ? this._streams[stream.id].id : stream.id];
-    delete this._streams[stream.id];
-  };
-  window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-    var _this13 = this;
-    if (this.signalingState === 'closed') {
-      throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
-    }
-    var streams = [].slice.call(arguments, 1);
-    if (streams.length !== 1 || !streams[0].getTracks().find(function (t) {
-      return t === track;
-    })) {
-      // this is not fully correct but all we can manage without
-      // [[associated MediaStreams]] internal slot.
-      throw new DOMException('The adapter.js addTrack polyfill only supports a single ' + ' stream which is associated with the specified track.', 'NotSupportedError');
-    }
-    var alreadyExists = this.getSenders().find(function (s) {
-      return s.track === track;
-    });
-    if (alreadyExists) {
-      throw new DOMException('Track already exists.', 'InvalidAccessError');
-    }
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    var oldStream = this._streams[stream.id];
-    if (oldStream) {
-      // this is using odd Chrome behaviour, use with caution:
-      // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815
-      // Note: we rely on the high-level addTrack/dtmf shim to
-      // create the sender with a dtmf sender.
-      oldStream.addTrack(track);
-
-      // Trigger ONN async.
-      Promise.resolve().then(function () {
-        _this13.dispatchEvent(new Event('negotiationneeded'));
-      });
-    } else {
-      var newStream = new window.MediaStream([track]);
-      this._streams[stream.id] = newStream;
-      this._reverseStreams[newStream.id] = stream;
-      this.addStream(newStream);
-    }
-    return this.getSenders().find(function (s) {
-      return s.track === track;
-    });
-  };
-
-  // replace the internal stream id with the external one and
-  // vice versa.
-  function replaceInternalStreamId(pc, description) {
-    var sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
-      var externalStream = pc._reverseStreams[internalId];
-      var internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(internalStream.id, 'g'), externalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp: sdp
-    });
-  }
-  function replaceExternalStreamId(pc, description) {
-    var sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
-      var externalStream = pc._reverseStreams[internalId];
-      var internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(externalStream.id, 'g'), internalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp: sdp
-    });
-  }
-  ['createOffer', 'createAnswer'].forEach(function (method) {
-    var nativeMethod = window.RTCPeerConnection.prototype[method];
-    var methodObj = _defineProperty({}, method, function () {
-      var _this14 = this;
-      var args = arguments;
-      var isLegacyCall = arguments.length && typeof arguments[0] === 'function';
-      if (isLegacyCall) {
-        return nativeMethod.apply(this, [function (description) {
-          var desc = replaceInternalStreamId(_this14, description);
-          args[0].apply(null, [desc]);
-        }, function (err) {
-          if (args[1]) {
-            args[1].apply(null, err);
-          }
-        }, arguments[2]]);
-      }
-      return nativeMethod.apply(this, arguments).then(function (description) {
-        return replaceInternalStreamId(_this14, description);
-      });
-    });
-    window.RTCPeerConnection.prototype[method] = methodObj[method];
-  });
-  var origSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;
-  window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {
-    if (!arguments.length || !arguments[0].type) {
-      return origSetLocalDescription.apply(this, arguments);
-    }
-    arguments[0] = replaceExternalStreamId(this, arguments[0]);
-    return origSetLocalDescription.apply(this, arguments);
-  };
-
-  // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier
-
-  var origLocalDescription = Object.getOwnPropertyDescriptor(window.RTCPeerConnection.prototype, 'localDescription');
-  Object.defineProperty(window.RTCPeerConnection.prototype, 'localDescription', {
-    get: function get() {
-      var description = origLocalDescription.get.apply(this);
-      if (description.type === '') {
-        return description;
-      }
-      return replaceInternalStreamId(this, description);
-    }
-  });
-  window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-    var _this15 = this;
-    if (this.signalingState === 'closed') {
-      throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
-    }
-    // We can not yet check for sender instanceof RTCRtpSender
-    // since we shim RTPSender. So we check if sender._pc is set.
-    if (!sender._pc) {
-      throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' + 'does not implement interface RTCRtpSender.', 'TypeError');
-    }
-    var isLocal = sender._pc === this;
-    if (!isLocal) {
-      throw new DOMException('Sender was not created by this connection.', 'InvalidAccessError');
-    }
-
-    // Search for the native stream the senders track belongs to.
-    this._streams = this._streams || {};
-    var stream;
-    Object.keys(this._streams).forEach(function (streamid) {
-      var hasTrack = _this15._streams[streamid].getTracks().find(function (track) {
-        return sender.track === track;
-      });
-      if (hasTrack) {
-        stream = _this15._streams[streamid];
-      }
-    });
-    if (stream) {
-      if (stream.getTracks().length === 1) {
-        // if this is the last track of the stream, remove the stream. This
-        // takes care of any shimmed _senders.
-        this.removeStream(this._reverseStreams[stream.id]);
-      } else {
-        // relying on the same odd chrome behaviour as above.
-        stream.removeTrack(sender.track);
-      }
-      this.dispatchEvent(new Event('negotiationneeded'));
-    }
-  };
-}
-function shimPeerConnection(window, browserDetails) {
-  if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.webkitRTCPeerConnection;
-  }
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-
-  // shim implicit creation of RTCSessionDescription/RTCIceCandidate
-  if (browserDetails.version < 53) {
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
-      var nativeMethod = window.RTCPeerConnection.prototype[method];
-      var methodObj = _defineProperty({}, method, function () {
-        arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
-        return nativeMethod.apply(this, arguments);
-      });
-      window.RTCPeerConnection.prototype[method] = methodObj[method];
-    });
-  }
-}
-
-// Attempt to fix ONN in plan-b mode.
-function fixNegotiationNeeded(window, browserDetails) {
-  utils.wrapPeerConnectionEvent(window, 'negotiationneeded', function (e) {
-    var pc = e.target;
-    if (browserDetails.version < 72 || pc.getConfiguration && pc.getConfiguration().sdpSemantics === 'plan-b') {
-      if (pc.signalingState !== 'stable') {
-        return;
-      }
-    }
-    return e;
-  });
-}

+ 0 - 49
node_modules/webrtc-adapter/dist/chrome/getdisplaymedia.js

@@ -1,49 +0,0 @@
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetDisplayMedia = shimGetDisplayMedia;
-function shimGetDisplayMedia(window, getSourceId) {
-  if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!window.navigator.mediaDevices) {
-    return;
-  }
-  // getSourceId is a function that returns a promise resolving with
-  // the sourceId of the screen/window/tab to be shared.
-  if (typeof getSourceId !== 'function') {
-    console.error('shimGetDisplayMedia: getSourceId argument is not ' + 'a function');
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
-    return getSourceId(constraints).then(function (sourceId) {
-      var widthSpecified = constraints.video && constraints.video.width;
-      var heightSpecified = constraints.video && constraints.video.height;
-      var frameRateSpecified = constraints.video && constraints.video.frameRate;
-      constraints.video = {
-        mandatory: {
-          chromeMediaSource: 'desktop',
-          chromeMediaSourceId: sourceId,
-          maxFrameRate: frameRateSpecified || 3
-        }
-      };
-      if (widthSpecified) {
-        constraints.video.mandatory.maxWidth = widthSpecified;
-      }
-      if (heightSpecified) {
-        constraints.video.mandatory.maxHeight = heightSpecified;
-      }
-      return window.navigator.mediaDevices.getUserMedia(constraints);
-    });
-  };
-}

+ 0 - 199
node_modules/webrtc-adapter/dist/chrome/getusermedia.js

@@ -1,199 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetUserMedia = shimGetUserMedia;
-var utils = _interopRequireWildcard(require("../utils.js"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-var logging = utils.log;
-function shimGetUserMedia(window, browserDetails) {
-  var navigator = window && window.navigator;
-  if (!navigator.mediaDevices) {
-    return;
-  }
-  var constraintsToChrome_ = function constraintsToChrome_(c) {
-    if (_typeof(c) !== 'object' || c.mandatory || c.optional) {
-      return c;
-    }
-    var cc = {};
-    Object.keys(c).forEach(function (key) {
-      if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
-        return;
-      }
-      var r = _typeof(c[key]) === 'object' ? c[key] : {
-        ideal: c[key]
-      };
-      if (r.exact !== undefined && typeof r.exact === 'number') {
-        r.min = r.max = r.exact;
-      }
-      var oldname_ = function oldname_(prefix, name) {
-        if (prefix) {
-          return prefix + name.charAt(0).toUpperCase() + name.slice(1);
-        }
-        return name === 'deviceId' ? 'sourceId' : name;
-      };
-      if (r.ideal !== undefined) {
-        cc.optional = cc.optional || [];
-        var oc = {};
-        if (typeof r.ideal === 'number') {
-          oc[oldname_('min', key)] = r.ideal;
-          cc.optional.push(oc);
-          oc = {};
-          oc[oldname_('max', key)] = r.ideal;
-          cc.optional.push(oc);
-        } else {
-          oc[oldname_('', key)] = r.ideal;
-          cc.optional.push(oc);
-        }
-      }
-      if (r.exact !== undefined && typeof r.exact !== 'number') {
-        cc.mandatory = cc.mandatory || {};
-        cc.mandatory[oldname_('', key)] = r.exact;
-      } else {
-        ['min', 'max'].forEach(function (mix) {
-          if (r[mix] !== undefined) {
-            cc.mandatory = cc.mandatory || {};
-            cc.mandatory[oldname_(mix, key)] = r[mix];
-          }
-        });
-      }
-    });
-    if (c.advanced) {
-      cc.optional = (cc.optional || []).concat(c.advanced);
-    }
-    return cc;
-  };
-  var shimConstraints_ = function shimConstraints_(constraints, func) {
-    if (browserDetails.version >= 61) {
-      return func(constraints);
-    }
-    constraints = JSON.parse(JSON.stringify(constraints));
-    if (constraints && _typeof(constraints.audio) === 'object') {
-      var remap = function remap(obj, a, b) {
-        if (a in obj && !(b in obj)) {
-          obj[b] = obj[a];
-          delete obj[a];
-        }
-      };
-      constraints = JSON.parse(JSON.stringify(constraints));
-      remap(constraints.audio, 'autoGainControl', 'googAutoGainControl');
-      remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression');
-      constraints.audio = constraintsToChrome_(constraints.audio);
-    }
-    if (constraints && _typeof(constraints.video) === 'object') {
-      // Shim facingMode for mobile & surface pro.
-      var face = constraints.video.facingMode;
-      face = face && (_typeof(face) === 'object' ? face : {
-        ideal: face
-      });
-      var getSupportedFacingModeLies = browserDetails.version < 66;
-      if (face && (face.exact === 'user' || face.exact === 'environment' || face.ideal === 'user' || face.ideal === 'environment') && !(navigator.mediaDevices.getSupportedConstraints && navigator.mediaDevices.getSupportedConstraints().facingMode && !getSupportedFacingModeLies)) {
-        delete constraints.video.facingMode;
-        var matches;
-        if (face.exact === 'environment' || face.ideal === 'environment') {
-          matches = ['back', 'rear'];
-        } else if (face.exact === 'user' || face.ideal === 'user') {
-          matches = ['front'];
-        }
-        if (matches) {
-          // Look for matches in label, or use last cam for back (typical).
-          return navigator.mediaDevices.enumerateDevices().then(function (devices) {
-            devices = devices.filter(function (d) {
-              return d.kind === 'videoinput';
-            });
-            var dev = devices.find(function (d) {
-              return matches.some(function (match) {
-                return d.label.toLowerCase().includes(match);
-              });
-            });
-            if (!dev && devices.length && matches.includes('back')) {
-              dev = devices[devices.length - 1]; // more likely the back cam
-            }
-
-            if (dev) {
-              constraints.video.deviceId = face.exact ? {
-                exact: dev.deviceId
-              } : {
-                ideal: dev.deviceId
-              };
-            }
-            constraints.video = constraintsToChrome_(constraints.video);
-            logging('chrome: ' + JSON.stringify(constraints));
-            return func(constraints);
-          });
-        }
-      }
-      constraints.video = constraintsToChrome_(constraints.video);
-    }
-    logging('chrome: ' + JSON.stringify(constraints));
-    return func(constraints);
-  };
-  var shimError_ = function shimError_(e) {
-    if (browserDetails.version >= 64) {
-      return e;
-    }
-    return {
-      name: {
-        PermissionDeniedError: 'NotAllowedError',
-        PermissionDismissedError: 'NotAllowedError',
-        InvalidStateError: 'NotAllowedError',
-        DevicesNotFoundError: 'NotFoundError',
-        ConstraintNotSatisfiedError: 'OverconstrainedError',
-        TrackStartError: 'NotReadableError',
-        MediaDeviceFailedDueToShutdown: 'NotAllowedError',
-        MediaDeviceKillSwitchOn: 'NotAllowedError',
-        TabCaptureError: 'AbortError',
-        ScreenCaptureError: 'AbortError',
-        DeviceCaptureError: 'AbortError'
-      }[e.name] || e.name,
-      message: e.message,
-      constraint: e.constraint || e.constraintName,
-      toString: function toString() {
-        return this.name + (this.message && ': ') + this.message;
-      }
-    };
-  };
-  var getUserMedia_ = function getUserMedia_(constraints, onSuccess, onError) {
-    shimConstraints_(constraints, function (c) {
-      navigator.webkitGetUserMedia(c, onSuccess, function (e) {
-        if (onError) {
-          onError(shimError_(e));
-        }
-      });
-    });
-  };
-  navigator.getUserMedia = getUserMedia_.bind(navigator);
-
-  // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia
-  // function which returns a Promise, it does not accept spec-style
-  // constraints.
-  if (navigator.mediaDevices.getUserMedia) {
-    var origGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (cs) {
-      return shimConstraints_(cs, function (c) {
-        return origGetUserMedia(c).then(function (stream) {
-          if (c.audio && !stream.getAudioTracks().length || c.video && !stream.getVideoTracks().length) {
-            stream.getTracks().forEach(function (track) {
-              track.stop();
-            });
-            throw new DOMException('', 'NotFoundError');
-          }
-          return stream;
-        }, function (e) {
-          return Promise.reject(shimError_(e));
-        });
-      });
-    };
-  }
-}

+ 0 - 40
node_modules/webrtc-adapter/dist/chrome/selectaudiooutput.js

@@ -1,40 +0,0 @@
-/*
- *  Copyright (c) 2022 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimSelectAudioOutput = shimSelectAudioOutput;
-function shimSelectAudioOutput(window) {
-  // Polyfillying only makes sense when setSinkId is available
-  // and the function is not already there.
-  if (!('HTMLMediaElement' in window)) {
-    return;
-  }
-  if (!('setSinkId' in window.HTMLMediaElement.prototype)) {
-    return;
-  }
-  if (!(window.navigator && window.navigator.mediaDevices)) {
-    return;
-  }
-  if (!window.navigator.mediaDevices.enumerateDevices) {
-    return;
-  }
-  if (window.navigator.mediaDevices.selectAudioOutput) {
-    return;
-  }
-  window.navigator.mediaDevices.selectAudioOutput = function () {
-    return window.navigator.mediaDevices.enumerateDevices().then(function (devices) {
-      return devices.filter(function (d) {
-        return d.kind === 'audiooutput';
-      });
-    });
-  };
-}

+ 0 - 436
node_modules/webrtc-adapter/dist/common_shim.js

@@ -1,436 +0,0 @@
-/*
- *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.removeExtmapAllowMixed = removeExtmapAllowMixed;
-exports.shimAddIceCandidateNullOrEmpty = shimAddIceCandidateNullOrEmpty;
-exports.shimConnectionState = shimConnectionState;
-exports.shimMaxMessageSize = shimMaxMessageSize;
-exports.shimParameterlessSetLocalDescription = shimParameterlessSetLocalDescription;
-exports.shimRTCIceCandidate = shimRTCIceCandidate;
-exports.shimRTCIceCandidateRelayProtocol = shimRTCIceCandidateRelayProtocol;
-exports.shimSendThrowTypeError = shimSendThrowTypeError;
-var _sdp = _interopRequireDefault(require("sdp"));
-var utils = _interopRequireWildcard(require("./utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimRTCIceCandidate(window) {
-  // foundation is arbitrarily chosen as an indicator for full support for
-  // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
-  if (!window.RTCIceCandidate || window.RTCIceCandidate && 'foundation' in window.RTCIceCandidate.prototype) {
-    return;
-  }
-  var NativeRTCIceCandidate = window.RTCIceCandidate;
-  window.RTCIceCandidate = function RTCIceCandidate(args) {
-    // Remove the a= which shouldn't be part of the candidate string.
-    if (_typeof(args) === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) {
-      args = JSON.parse(JSON.stringify(args));
-      args.candidate = args.candidate.substring(2);
-    }
-    if (args.candidate && args.candidate.length) {
-      // Augment the native candidate with the parsed fields.
-      var nativeCandidate = new NativeRTCIceCandidate(args);
-      var parsedCandidate = _sdp["default"].parseCandidate(args.candidate);
-      for (var key in parsedCandidate) {
-        if (!(key in nativeCandidate)) {
-          Object.defineProperty(nativeCandidate, key, {
-            value: parsedCandidate[key]
-          });
-        }
-      }
-
-      // Override serializer to not serialize the extra attributes.
-      nativeCandidate.toJSON = function toJSON() {
-        return {
-          candidate: nativeCandidate.candidate,
-          sdpMid: nativeCandidate.sdpMid,
-          sdpMLineIndex: nativeCandidate.sdpMLineIndex,
-          usernameFragment: nativeCandidate.usernameFragment
-        };
-      };
-      return nativeCandidate;
-    }
-    return new NativeRTCIceCandidate(args);
-  };
-  window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) {
-    if (e.candidate) {
-      Object.defineProperty(e, 'candidate', {
-        value: new window.RTCIceCandidate(e.candidate),
-        writable: 'false'
-      });
-    }
-    return e;
-  });
-}
-function shimRTCIceCandidateRelayProtocol(window) {
-  if (!window.RTCIceCandidate || window.RTCIceCandidate && 'relayProtocol' in window.RTCIceCandidate.prototype) {
-    return;
-  }
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) {
-    if (e.candidate) {
-      var parsedCandidate = _sdp["default"].parseCandidate(e.candidate.candidate);
-      if (parsedCandidate.type === 'relay') {
-        // This is a libwebrtc-specific mapping of local type preference
-        // to relayProtocol.
-        e.candidate.relayProtocol = {
-          0: 'tls',
-          1: 'tcp',
-          2: 'udp'
-        }[parsedCandidate.priority >> 24];
-      }
-    }
-    return e;
-  });
-}
-function shimMaxMessageSize(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  if (!('sctp' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {
-      get: function get() {
-        return typeof this._sctp === 'undefined' ? null : this._sctp;
-      }
-    });
-  }
-  var sctpInDescription = function sctpInDescription(description) {
-    if (!description || !description.sdp) {
-      return false;
-    }
-    var sections = _sdp["default"].splitSections(description.sdp);
-    sections.shift();
-    return sections.some(function (mediaSection) {
-      var mLine = _sdp["default"].parseMLine(mediaSection);
-      return mLine && mLine.kind === 'application' && mLine.protocol.indexOf('SCTP') !== -1;
-    });
-  };
-  var getRemoteFirefoxVersion = function getRemoteFirefoxVersion(description) {
-    // TODO: Is there a better solution for detecting Firefox?
-    var match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);
-    if (match === null || match.length < 2) {
-      return -1;
-    }
-    var version = parseInt(match[1], 10);
-    // Test for NaN (yes, this is ugly)
-    return version !== version ? -1 : version;
-  };
-  var getCanSendMaxMessageSize = function getCanSendMaxMessageSize(remoteIsFirefox) {
-    // Every implementation we know can send at least 64 KiB.
-    // Note: Although Chrome is technically able to send up to 256 KiB, the
-    //       data does not reach the other peer reliably.
-    //       See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419
-    var canSendMaxMessageSize = 65536;
-    if (browserDetails.browser === 'firefox') {
-      if (browserDetails.version < 57) {
-        if (remoteIsFirefox === -1) {
-          // FF < 57 will send in 16 KiB chunks using the deprecated PPID
-          // fragmentation.
-          canSendMaxMessageSize = 16384;
-        } else {
-          // However, other FF (and RAWRTC) can reassemble PPID-fragmented
-          // messages. Thus, supporting ~2 GiB when sending.
-          canSendMaxMessageSize = 2147483637;
-        }
-      } else if (browserDetails.version < 60) {
-        // Currently, all FF >= 57 will reset the remote maximum message size
-        // to the default value when a data channel is created at a later
-        // stage. :(
-        // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-        canSendMaxMessageSize = browserDetails.version === 57 ? 65535 : 65536;
-      } else {
-        // FF >= 60 supports sending ~2 GiB
-        canSendMaxMessageSize = 2147483637;
-      }
-    }
-    return canSendMaxMessageSize;
-  };
-  var getMaxMessageSize = function getMaxMessageSize(description, remoteIsFirefox) {
-    // Note: 65536 bytes is the default value from the SDP spec. Also,
-    //       every implementation we know supports receiving 65536 bytes.
-    var maxMessageSize = 65536;
-
-    // FF 57 has a slightly incorrect default remote max message size, so
-    // we need to adjust it here to avoid a failure when sending.
-    // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697
-    if (browserDetails.browser === 'firefox' && browserDetails.version === 57) {
-      maxMessageSize = 65535;
-    }
-    var match = _sdp["default"].matchPrefix(description.sdp, 'a=max-message-size:');
-    if (match.length > 0) {
-      maxMessageSize = parseInt(match[0].substring(19), 10);
-    } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) {
-      // If the maximum message size is not present in the remote SDP and
-      // both local and remote are Firefox, the remote peer can receive
-      // ~2 GiB.
-      maxMessageSize = 2147483637;
-    }
-    return maxMessageSize;
-  };
-  var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-    this._sctp = null;
-    // Chrome decided to not expose .sctp in plan-b mode.
-    // As usual, adapter.js has to do an 'ugly worakaround'
-    // to cover up the mess.
-    if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) {
-      var _this$getConfiguratio = this.getConfiguration(),
-        sdpSemantics = _this$getConfiguratio.sdpSemantics;
-      if (sdpSemantics === 'plan-b') {
-        Object.defineProperty(this, 'sctp', {
-          get: function get() {
-            return typeof this._sctp === 'undefined' ? null : this._sctp;
-          },
-          enumerable: true,
-          configurable: true
-        });
-      }
-    }
-    if (sctpInDescription(arguments[0])) {
-      // Check if the remote is FF.
-      var isFirefox = getRemoteFirefoxVersion(arguments[0]);
-
-      // Get the maximum message size the local peer is capable of sending
-      var canSendMMS = getCanSendMaxMessageSize(isFirefox);
-
-      // Get the maximum message size of the remote peer.
-      var remoteMMS = getMaxMessageSize(arguments[0], isFirefox);
-
-      // Determine final maximum message size
-      var maxMessageSize;
-      if (canSendMMS === 0 && remoteMMS === 0) {
-        maxMessageSize = Number.POSITIVE_INFINITY;
-      } else if (canSendMMS === 0 || remoteMMS === 0) {
-        maxMessageSize = Math.max(canSendMMS, remoteMMS);
-      } else {
-        maxMessageSize = Math.min(canSendMMS, remoteMMS);
-      }
-
-      // Create a dummy RTCSctpTransport object and the 'maxMessageSize'
-      // attribute.
-      var sctp = {};
-      Object.defineProperty(sctp, 'maxMessageSize', {
-        get: function get() {
-          return maxMessageSize;
-        }
-      });
-      this._sctp = sctp;
-    }
-    return origSetRemoteDescription.apply(this, arguments);
-  };
-}
-function shimSendThrowTypeError(window) {
-  if (!(window.RTCPeerConnection && 'createDataChannel' in window.RTCPeerConnection.prototype)) {
-    return;
-  }
-
-  // Note: Although Firefox >= 57 has a native implementation, the maximum
-  //       message size can be reset for all data channels at a later stage.
-  //       See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-
-  function wrapDcSend(dc, pc) {
-    var origDataChannelSend = dc.send;
-    dc.send = function send() {
-      var data = arguments[0];
-      var length = data.length || data.size || data.byteLength;
-      if (dc.readyState === 'open' && pc.sctp && length > pc.sctp.maxMessageSize) {
-        throw new TypeError('Message too large (can send a maximum of ' + pc.sctp.maxMessageSize + ' bytes)');
-      }
-      return origDataChannelSend.apply(dc, arguments);
-    };
-  }
-  var origCreateDataChannel = window.RTCPeerConnection.prototype.createDataChannel;
-  window.RTCPeerConnection.prototype.createDataChannel = function createDataChannel() {
-    var dataChannel = origCreateDataChannel.apply(this, arguments);
-    wrapDcSend(dataChannel, this);
-    return dataChannel;
-  };
-  utils.wrapPeerConnectionEvent(window, 'datachannel', function (e) {
-    wrapDcSend(e.channel, e.target);
-    return e;
-  });
-}
-
-/* shims RTCConnectionState by pretending it is the same as iceConnectionState.
- * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12
- * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect
- * since DTLS failures would be hidden. See
- * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827
- * for the Firefox tracking bug.
- */
-function shimConnectionState(window) {
-  if (!window.RTCPeerConnection || 'connectionState' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  var proto = window.RTCPeerConnection.prototype;
-  Object.defineProperty(proto, 'connectionState', {
-    get: function get() {
-      return {
-        completed: 'connected',
-        checking: 'connecting'
-      }[this.iceConnectionState] || this.iceConnectionState;
-    },
-    enumerable: true,
-    configurable: true
-  });
-  Object.defineProperty(proto, 'onconnectionstatechange', {
-    get: function get() {
-      return this._onconnectionstatechange || null;
-    },
-    set: function set(cb) {
-      if (this._onconnectionstatechange) {
-        this.removeEventListener('connectionstatechange', this._onconnectionstatechange);
-        delete this._onconnectionstatechange;
-      }
-      if (cb) {
-        this.addEventListener('connectionstatechange', this._onconnectionstatechange = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-  ['setLocalDescription', 'setRemoteDescription'].forEach(function (method) {
-    var origMethod = proto[method];
-    proto[method] = function () {
-      if (!this._connectionstatechangepoly) {
-        this._connectionstatechangepoly = function (e) {
-          var pc = e.target;
-          if (pc._lastConnectionState !== pc.connectionState) {
-            pc._lastConnectionState = pc.connectionState;
-            var newEvent = new Event('connectionstatechange', e);
-            pc.dispatchEvent(newEvent);
-          }
-          return e;
-        };
-        this.addEventListener('iceconnectionstatechange', this._connectionstatechangepoly);
-      }
-      return origMethod.apply(this, arguments);
-    };
-  });
-}
-function removeExtmapAllowMixed(window, browserDetails) {
-  /* remove a=extmap-allow-mixed for webrtc.org < M71 */
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) {
-    return;
-  }
-  if (browserDetails.browser === 'safari' && browserDetails.version >= 605) {
-    return;
-  }
-  var nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription(desc) {
-    if (desc && desc.sdp && desc.sdp.indexOf('\na=extmap-allow-mixed') !== -1) {
-      var sdp = desc.sdp.split('\n').filter(function (line) {
-        return line.trim() !== 'a=extmap-allow-mixed';
-      }).join('\n');
-      // Safari enforces read-only-ness of RTCSessionDescription fields.
-      if (window.RTCSessionDescription && desc instanceof window.RTCSessionDescription) {
-        arguments[0] = new window.RTCSessionDescription({
-          type: desc.type,
-          sdp: sdp
-        });
-      } else {
-        desc.sdp = sdp;
-      }
-    }
-    return nativeSRD.apply(this, arguments);
-  };
-}
-function shimAddIceCandidateNullOrEmpty(window, browserDetails) {
-  // Support for addIceCandidate(null or undefined)
-  // as well as addIceCandidate({candidate: "", ...})
-  // https://bugs.chromium.org/p/chromium/issues/detail?id=978582
-  // Note: must be called before other polyfills which change the signature.
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate;
-  if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() {
-    if (!arguments[0]) {
-      if (arguments[1]) {
-        arguments[1].apply(null);
-      }
-      return Promise.resolve();
-    }
-    // Firefox 68+ emits and processes {candidate: "", ...}, ignore
-    // in older versions.
-    // Native support for ignoring exists for Chrome M77+.
-    // Safari ignores as well, exact version unknown but works in the same
-    // version that also ignores addIceCandidate(null).
-    if ((browserDetails.browser === 'chrome' && browserDetails.version < 78 || browserDetails.browser === 'firefox' && browserDetails.version < 68 || browserDetails.browser === 'safari') && arguments[0] && arguments[0].candidate === '') {
-      return Promise.resolve();
-    }
-    return nativeAddIceCandidate.apply(this, arguments);
-  };
-}
-
-// Note: Make sure to call this ahead of APIs that modify
-// setLocalDescription.length
-function shimParameterlessSetLocalDescription(window, browserDetails) {
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  var nativeSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;
-  if (!nativeSetLocalDescription || nativeSetLocalDescription.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {
-    var _this = this;
-    var desc = arguments[0] || {};
-    if (_typeof(desc) !== 'object' || desc.type && desc.sdp) {
-      return nativeSetLocalDescription.apply(this, arguments);
-    }
-    // The remaining steps should technically happen when SLD comes off the
-    // RTCPeerConnection's operations chain (not ahead of going on it), but
-    // this is too difficult to shim. Instead, this shim only covers the
-    // common case where the operations chain is empty. This is imperfect, but
-    // should cover many cases. Rationale: Even if we can't reduce the glare
-    // window to zero on imperfect implementations, there's value in tapping
-    // into the perfect negotiation pattern that several browsers support.
-    desc = {
-      type: desc.type,
-      sdp: desc.sdp
-    };
-    if (!desc.type) {
-      switch (this.signalingState) {
-        case 'stable':
-        case 'have-local-offer':
-        case 'have-remote-pranswer':
-          desc.type = 'offer';
-          break;
-        default:
-          desc.type = 'answer';
-          break;
-      }
-    }
-    if (desc.sdp || desc.type !== 'offer' && desc.type !== 'answer') {
-      return nativeSetLocalDescription.apply(this, [desc]);
-    }
-    var func = desc.type === 'offer' ? this.createOffer : this.createAnswer;
-    return func.apply(this).then(function (d) {
-      return nativeSetLocalDescription.apply(_this, [d]);
-    });
-  };
-}

+ 0 - 318
node_modules/webrtc-adapter/dist/firefox/firefox_shim.js

@@ -1,318 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimAddTransceiver = shimAddTransceiver;
-exports.shimCreateAnswer = shimCreateAnswer;
-exports.shimCreateOffer = shimCreateOffer;
-Object.defineProperty(exports, "shimGetDisplayMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getdisplaymedia.shimGetDisplayMedia;
-  }
-});
-exports.shimGetParameters = shimGetParameters;
-Object.defineProperty(exports, "shimGetUserMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getusermedia.shimGetUserMedia;
-  }
-});
-exports.shimOnTrack = shimOnTrack;
-exports.shimPeerConnection = shimPeerConnection;
-exports.shimRTCDataChannel = shimRTCDataChannel;
-exports.shimReceiverGetStats = shimReceiverGetStats;
-exports.shimRemoveStream = shimRemoveStream;
-exports.shimSenderGetStats = shimSenderGetStats;
-var utils = _interopRequireWildcard(require("../utils"));
-var _getusermedia = require("./getusermedia");
-var _getdisplaymedia = require("./getdisplaymedia");
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
-function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
-function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
-function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimOnTrack(window) {
-  if (_typeof(window) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get: function get() {
-        return {
-          receiver: this.receiver
-        };
-      }
-    });
-  }
-}
-function shimPeerConnection(window, browserDetails) {
-  if (_typeof(window) !== 'object' || !(window.RTCPeerConnection || window.mozRTCPeerConnection)) {
-    return; // probably media.peerconnection.enabled=false in about:config
-  }
-
-  if (!window.RTCPeerConnection && window.mozRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.mozRTCPeerConnection;
-  }
-  if (browserDetails.version < 53) {
-    // shim away need for obsolete RTCIceCandidate/RTCSessionDescription.
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
-      var nativeMethod = window.RTCPeerConnection.prototype[method];
-      var methodObj = _defineProperty({}, method, function () {
-        arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
-        return nativeMethod.apply(this, arguments);
-      });
-      window.RTCPeerConnection.prototype[method] = methodObj[method];
-    });
-  }
-  var modernStatsTypes = {
-    inboundrtp: 'inbound-rtp',
-    outboundrtp: 'outbound-rtp',
-    candidatepair: 'candidate-pair',
-    localcandidate: 'local-candidate',
-    remotecandidate: 'remote-candidate'
-  };
-  var nativeGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    var _arguments = Array.prototype.slice.call(arguments),
-      selector = _arguments[0],
-      onSucc = _arguments[1],
-      onErr = _arguments[2];
-    return nativeGetStats.apply(this, [selector || null]).then(function (stats) {
-      if (browserDetails.version < 53 && !onSucc) {
-        // Shim only promise getStats with spec-hyphens in type names
-        // Leave callback version alone; misc old uses of forEach before Map
-        try {
-          stats.forEach(function (stat) {
-            stat.type = modernStatsTypes[stat.type] || stat.type;
-          });
-        } catch (e) {
-          if (e.name !== 'TypeError') {
-            throw e;
-          }
-          // Avoid TypeError: "type" is read-only, in old versions. 34-43ish
-          stats.forEach(function (stat, i) {
-            stats.set(i, Object.assign({}, stat, {
-              type: modernStatsTypes[stat.type] || stat.type
-            }));
-          });
-        }
-      }
-      return stats;
-    }).then(onSucc, onErr);
-  };
-}
-function shimSenderGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpSender.prototype) {
-    return;
-  }
-  var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-  if (origGetSenders) {
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      var _this = this;
-      var senders = origGetSenders.apply(this, []);
-      senders.forEach(function (sender) {
-        return sender._pc = _this;
-      });
-      return senders;
-    };
-  }
-  var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  if (origAddTrack) {
-    window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-      var sender = origAddTrack.apply(this, arguments);
-      sender._pc = this;
-      return sender;
-    };
-  }
-  window.RTCRtpSender.prototype.getStats = function getStats() {
-    return this.track ? this._pc.getStats(this.track) : Promise.resolve(new Map());
-  };
-}
-function shimReceiverGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpReceiver.prototype) {
-    return;
-  }
-  var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-  if (origGetReceivers) {
-    window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
-      var _this2 = this;
-      var receivers = origGetReceivers.apply(this, []);
-      receivers.forEach(function (receiver) {
-        return receiver._pc = _this2;
-      });
-      return receivers;
-    };
-  }
-  utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-    e.receiver._pc = e.srcElement;
-    return e;
-  });
-  window.RTCRtpReceiver.prototype.getStats = function getStats() {
-    return this._pc.getStats(this.track);
-  };
-}
-function shimRemoveStream(window) {
-  if (!window.RTCPeerConnection || 'removeStream' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    var _this3 = this;
-    utils.deprecated('removeStream', 'removeTrack');
-    this.getSenders().forEach(function (sender) {
-      if (sender.track && stream.getTracks().includes(sender.track)) {
-        _this3.removeTrack(sender);
-      }
-    });
-  };
-}
-function shimRTCDataChannel(window) {
-  // rename DataChannel to RTCDataChannel (native fix in FF60):
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1173851
-  if (window.DataChannel && !window.RTCDataChannel) {
-    window.RTCDataChannel = window.DataChannel;
-  }
-}
-function shimAddTransceiver(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origAddTransceiver = window.RTCPeerConnection.prototype.addTransceiver;
-  if (origAddTransceiver) {
-    window.RTCPeerConnection.prototype.addTransceiver = function addTransceiver() {
-      this.setParametersPromises = [];
-      // WebIDL input coercion and validation
-      var sendEncodings = arguments[1] && arguments[1].sendEncodings;
-      if (sendEncodings === undefined) {
-        sendEncodings = [];
-      }
-      sendEncodings = _toConsumableArray(sendEncodings);
-      var shouldPerformCheck = sendEncodings.length > 0;
-      if (shouldPerformCheck) {
-        // If sendEncodings params are provided, validate grammar
-        sendEncodings.forEach(function (encodingParam) {
-          if ('rid' in encodingParam) {
-            var ridRegex = /^[a-z0-9]{0,16}$/i;
-            if (!ridRegex.test(encodingParam.rid)) {
-              throw new TypeError('Invalid RID value provided.');
-            }
-          }
-          if ('scaleResolutionDownBy' in encodingParam) {
-            if (!(parseFloat(encodingParam.scaleResolutionDownBy) >= 1.0)) {
-              throw new RangeError('scale_resolution_down_by must be >= 1.0');
-            }
-          }
-          if ('maxFramerate' in encodingParam) {
-            if (!(parseFloat(encodingParam.maxFramerate) >= 0)) {
-              throw new RangeError('max_framerate must be >= 0.0');
-            }
-          }
-        });
-      }
-      var transceiver = origAddTransceiver.apply(this, arguments);
-      if (shouldPerformCheck) {
-        // Check if the init options were applied. If not we do this in an
-        // asynchronous way and save the promise reference in a global object.
-        // This is an ugly hack, but at the same time is way more robust than
-        // checking the sender parameters before and after the createOffer
-        // Also note that after the createoffer we are not 100% sure that
-        // the params were asynchronously applied so we might miss the
-        // opportunity to recreate offer.
-        var sender = transceiver.sender;
-        var params = sender.getParameters();
-        if (!('encodings' in params) ||
-        // Avoid being fooled by patched getParameters() below.
-        params.encodings.length === 1 && Object.keys(params.encodings[0]).length === 0) {
-          params.encodings = sendEncodings;
-          sender.sendEncodings = sendEncodings;
-          this.setParametersPromises.push(sender.setParameters(params).then(function () {
-            delete sender.sendEncodings;
-          })["catch"](function () {
-            delete sender.sendEncodings;
-          }));
-        }
-      }
-      return transceiver;
-    };
-  }
-}
-function shimGetParameters(window) {
-  if (!(_typeof(window) === 'object' && window.RTCRtpSender)) {
-    return;
-  }
-  var origGetParameters = window.RTCRtpSender.prototype.getParameters;
-  if (origGetParameters) {
-    window.RTCRtpSender.prototype.getParameters = function getParameters() {
-      var params = origGetParameters.apply(this, arguments);
-      if (!('encodings' in params)) {
-        params.encodings = [].concat(this.sendEncodings || [{}]);
-      }
-      return params;
-    };
-  }
-}
-function shimCreateOffer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer = function createOffer() {
-    var _arguments2 = arguments,
-      _this4 = this;
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises).then(function () {
-        return origCreateOffer.apply(_this4, _arguments2);
-      })["finally"](function () {
-        _this4.setParametersPromises = [];
-      });
-    }
-    return origCreateOffer.apply(this, arguments);
-  };
-}
-function shimCreateAnswer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origCreateAnswer = window.RTCPeerConnection.prototype.createAnswer;
-  window.RTCPeerConnection.prototype.createAnswer = function createAnswer() {
-    var _arguments3 = arguments,
-      _this5 = this;
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises).then(function () {
-        return origCreateAnswer.apply(_this5, _arguments3);
-      })["finally"](function () {
-        _this5.setParametersPromises = [];
-      });
-    }
-    return origCreateAnswer.apply(this, arguments);
-  };
-}

+ 0 - 39
node_modules/webrtc-adapter/dist/firefox/getdisplaymedia.js

@@ -1,39 +0,0 @@
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetDisplayMedia = shimGetDisplayMedia;
-function shimGetDisplayMedia(window, preferredMediaSource) {
-  if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!window.navigator.mediaDevices) {
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
-    if (!(constraints && constraints.video)) {
-      var err = new DOMException('getDisplayMedia without video ' + 'constraints is undefined');
-      err.name = 'NotFoundError';
-      // from https://heycam.github.io/webidl/#idl-DOMException-error-names
-      err.code = 8;
-      return Promise.reject(err);
-    }
-    if (constraints.video === true) {
-      constraints.video = {
-        mediaSource: preferredMediaSource
-      };
-    } else {
-      constraints.video.mediaSource = preferredMediaSource;
-    }
-    return window.navigator.mediaDevices.getUserMedia(constraints);
-  };
-}

+ 0 - 64
node_modules/webrtc-adapter/dist/firefox/getusermedia.js

@@ -1,64 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetUserMedia = shimGetUserMedia;
-var utils = _interopRequireWildcard(require("../utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimGetUserMedia(window, browserDetails) {
-  var navigator = window && window.navigator;
-  var MediaStreamTrack = window && window.MediaStreamTrack;
-  navigator.getUserMedia = function (constraints, onSuccess, onError) {
-    // Replace Firefox 44+'s deprecation warning with unprefixed version.
-    utils.deprecated('navigator.getUserMedia', 'navigator.mediaDevices.getUserMedia');
-    navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
-  };
-  if (!(browserDetails.version > 55 && 'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) {
-    var remap = function remap(obj, a, b) {
-      if (a in obj && !(b in obj)) {
-        obj[b] = obj[a];
-        delete obj[a];
-      }
-    };
-    var nativeGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (c) {
-      if (_typeof(c) === 'object' && _typeof(c.audio) === 'object') {
-        c = JSON.parse(JSON.stringify(c));
-        remap(c.audio, 'autoGainControl', 'mozAutoGainControl');
-        remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression');
-      }
-      return nativeGetUserMedia(c);
-    };
-    if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) {
-      var nativeGetSettings = MediaStreamTrack.prototype.getSettings;
-      MediaStreamTrack.prototype.getSettings = function () {
-        var obj = nativeGetSettings.apply(this, arguments);
-        remap(obj, 'mozAutoGainControl', 'autoGainControl');
-        remap(obj, 'mozNoiseSuppression', 'noiseSuppression');
-        return obj;
-      };
-    }
-    if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) {
-      var nativeApplyConstraints = MediaStreamTrack.prototype.applyConstraints;
-      MediaStreamTrack.prototype.applyConstraints = function (c) {
-        if (this.kind === 'audio' && _typeof(c) === 'object') {
-          c = JSON.parse(JSON.stringify(c));
-          remap(c, 'autoGainControl', 'mozAutoGainControl');
-          remap(c, 'noiseSuppression', 'mozNoiseSuppression');
-        }
-        return nativeApplyConstraints.apply(this, [c]);
-      };
-    }
-  }
-}

+ 0 - 346
node_modules/webrtc-adapter/dist/safari/safari_shim.js

@@ -1,346 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimAudioContext = shimAudioContext;
-exports.shimCallbacksAPI = shimCallbacksAPI;
-exports.shimConstraints = shimConstraints;
-exports.shimCreateOfferLegacy = shimCreateOfferLegacy;
-exports.shimGetUserMedia = shimGetUserMedia;
-exports.shimLocalStreamsAPI = shimLocalStreamsAPI;
-exports.shimRTCIceServerUrls = shimRTCIceServerUrls;
-exports.shimRemoteStreamsAPI = shimRemoteStreamsAPI;
-exports.shimTrackEventTransceiver = shimTrackEventTransceiver;
-var utils = _interopRequireWildcard(require("../utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimLocalStreamsAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      return this._localStreams;
-    };
-  }
-  if (!('addStream' in window.RTCPeerConnection.prototype)) {
-    var _addTrack = window.RTCPeerConnection.prototype.addTrack;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      var _this = this;
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      if (!this._localStreams.includes(stream)) {
-        this._localStreams.push(stream);
-      }
-      // Try to emulate Chrome's behaviour of adding in audio-video order.
-      // Safari orders by track id.
-      stream.getAudioTracks().forEach(function (track) {
-        return _addTrack.call(_this, track, stream);
-      });
-      stream.getVideoTracks().forEach(function (track) {
-        return _addTrack.call(_this, track, stream);
-      });
-    };
-    window.RTCPeerConnection.prototype.addTrack = function addTrack(track) {
-      var _this2 = this;
-      for (var _len = arguments.length, streams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-        streams[_key - 1] = arguments[_key];
-      }
-      if (streams) {
-        streams.forEach(function (stream) {
-          if (!_this2._localStreams) {
-            _this2._localStreams = [stream];
-          } else if (!_this2._localStreams.includes(stream)) {
-            _this2._localStreams.push(stream);
-          }
-        });
-      }
-      return _addTrack.apply(this, arguments);
-    };
-  }
-  if (!('removeStream' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-      var _this3 = this;
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      var index = this._localStreams.indexOf(stream);
-      if (index === -1) {
-        return;
-      }
-      this._localStreams.splice(index, 1);
-      var tracks = stream.getTracks();
-      this.getSenders().forEach(function (sender) {
-        if (tracks.includes(sender.track)) {
-          _this3.removeTrack(sender);
-        }
-      });
-    };
-  }
-}
-function shimRemoteStreamsAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getRemoteStreams = function getRemoteStreams() {
-      return this._remoteStreams ? this._remoteStreams : [];
-    };
-  }
-  if (!('onaddstream' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', {
-      get: function get() {
-        return this._onaddstream;
-      },
-      set: function set(f) {
-        var _this4 = this;
-        if (this._onaddstream) {
-          this.removeEventListener('addstream', this._onaddstream);
-          this.removeEventListener('track', this._onaddstreampoly);
-        }
-        this.addEventListener('addstream', this._onaddstream = f);
-        this.addEventListener('track', this._onaddstreampoly = function (e) {
-          e.streams.forEach(function (stream) {
-            if (!_this4._remoteStreams) {
-              _this4._remoteStreams = [];
-            }
-            if (_this4._remoteStreams.includes(stream)) {
-              return;
-            }
-            _this4._remoteStreams.push(stream);
-            var event = new Event('addstream');
-            event.stream = stream;
-            _this4.dispatchEvent(event);
-          });
-        });
-      }
-    });
-    var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-      var pc = this;
-      if (!this._onaddstreampoly) {
-        this.addEventListener('track', this._onaddstreampoly = function (e) {
-          e.streams.forEach(function (stream) {
-            if (!pc._remoteStreams) {
-              pc._remoteStreams = [];
-            }
-            if (pc._remoteStreams.indexOf(stream) >= 0) {
-              return;
-            }
-            pc._remoteStreams.push(stream);
-            var event = new Event('addstream');
-            event.stream = stream;
-            pc.dispatchEvent(event);
-          });
-        });
-      }
-      return origSetRemoteDescription.apply(pc, arguments);
-    };
-  }
-}
-function shimCallbacksAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  var prototype = window.RTCPeerConnection.prototype;
-  var origCreateOffer = prototype.createOffer;
-  var origCreateAnswer = prototype.createAnswer;
-  var setLocalDescription = prototype.setLocalDescription;
-  var setRemoteDescription = prototype.setRemoteDescription;
-  var addIceCandidate = prototype.addIceCandidate;
-  prototype.createOffer = function createOffer(successCallback, failureCallback) {
-    var options = arguments.length >= 2 ? arguments[2] : arguments[0];
-    var promise = origCreateOffer.apply(this, [options]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.createAnswer = function createAnswer(successCallback, failureCallback) {
-    var options = arguments.length >= 2 ? arguments[2] : arguments[0];
-    var promise = origCreateAnswer.apply(this, [options]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  var withCallback = function withCallback(description, successCallback, failureCallback) {
-    var promise = setLocalDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setLocalDescription = withCallback;
-  withCallback = function withCallback(description, successCallback, failureCallback) {
-    var promise = setRemoteDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setRemoteDescription = withCallback;
-  withCallback = function withCallback(candidate, successCallback, failureCallback) {
-    var promise = addIceCandidate.apply(this, [candidate]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.addIceCandidate = withCallback;
-}
-function shimGetUserMedia(window) {
-  var navigator = window && window.navigator;
-  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-    // shim not needed in Safari 12.1
-    var mediaDevices = navigator.mediaDevices;
-    var _getUserMedia = mediaDevices.getUserMedia.bind(mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (constraints) {
-      return _getUserMedia(shimConstraints(constraints));
-    };
-  }
-  if (!navigator.getUserMedia && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-    navigator.getUserMedia = function getUserMedia(constraints, cb, errcb) {
-      navigator.mediaDevices.getUserMedia(constraints).then(cb, errcb);
-    }.bind(navigator);
-  }
-}
-function shimConstraints(constraints) {
-  if (constraints && constraints.video !== undefined) {
-    return Object.assign({}, constraints, {
-      video: utils.compactObject(constraints.video)
-    });
-  }
-  return constraints;
-}
-function shimRTCIceServerUrls(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // migrate from non-spec RTCIceServer.url to RTCIceServer.urls
-  var OrigPeerConnection = window.RTCPeerConnection;
-  window.RTCPeerConnection = function RTCPeerConnection(pcConfig, pcConstraints) {
-    if (pcConfig && pcConfig.iceServers) {
-      var newIceServers = [];
-      for (var i = 0; i < pcConfig.iceServers.length; i++) {
-        var server = pcConfig.iceServers[i];
-        if (server.urls === undefined && server.url) {
-          utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');
-          server = JSON.parse(JSON.stringify(server));
-          server.urls = server.url;
-          delete server.url;
-          newIceServers.push(server);
-        } else {
-          newIceServers.push(pcConfig.iceServers[i]);
-        }
-      }
-      pcConfig.iceServers = newIceServers;
-    }
-    return new OrigPeerConnection(pcConfig, pcConstraints);
-  };
-  window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;
-  // wrap static methods. Currently just generateCertificate.
-  if ('generateCertificate' in OrigPeerConnection) {
-    Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
-      get: function get() {
-        return OrigPeerConnection.generateCertificate;
-      }
-    });
-  }
-}
-function shimTrackEventTransceiver(window) {
-  // Add event.transceiver member over deprecated event.receiver
-  if (_typeof(window) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get: function get() {
-        return {
-          receiver: this.receiver
-        };
-      }
-    });
-  }
-}
-function shimCreateOfferLegacy(window) {
-  var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer = function createOffer(offerOptions) {
-    if (offerOptions) {
-      if (typeof offerOptions.offerToReceiveAudio !== 'undefined') {
-        // support bit values
-        offerOptions.offerToReceiveAudio = !!offerOptions.offerToReceiveAudio;
-      }
-      var audioTransceiver = this.getTransceivers().find(function (transceiver) {
-        return transceiver.receiver.track.kind === 'audio';
-      });
-      if (offerOptions.offerToReceiveAudio === false && audioTransceiver) {
-        if (audioTransceiver.direction === 'sendrecv') {
-          if (audioTransceiver.setDirection) {
-            audioTransceiver.setDirection('sendonly');
-          } else {
-            audioTransceiver.direction = 'sendonly';
-          }
-        } else if (audioTransceiver.direction === 'recvonly') {
-          if (audioTransceiver.setDirection) {
-            audioTransceiver.setDirection('inactive');
-          } else {
-            audioTransceiver.direction = 'inactive';
-          }
-        }
-      } else if (offerOptions.offerToReceiveAudio === true && !audioTransceiver) {
-        this.addTransceiver('audio', {
-          direction: 'recvonly'
-        });
-      }
-      if (typeof offerOptions.offerToReceiveVideo !== 'undefined') {
-        // support bit values
-        offerOptions.offerToReceiveVideo = !!offerOptions.offerToReceiveVideo;
-      }
-      var videoTransceiver = this.getTransceivers().find(function (transceiver) {
-        return transceiver.receiver.track.kind === 'video';
-      });
-      if (offerOptions.offerToReceiveVideo === false && videoTransceiver) {
-        if (videoTransceiver.direction === 'sendrecv') {
-          if (videoTransceiver.setDirection) {
-            videoTransceiver.setDirection('sendonly');
-          } else {
-            videoTransceiver.direction = 'sendonly';
-          }
-        } else if (videoTransceiver.direction === 'recvonly') {
-          if (videoTransceiver.setDirection) {
-            videoTransceiver.setDirection('inactive');
-          } else {
-            videoTransceiver.direction = 'inactive';
-          }
-        }
-      } else if (offerOptions.offerToReceiveVideo === true && !videoTransceiver) {
-        this.addTransceiver('video', {
-          direction: 'recvonly'
-        });
-      }
-    }
-    return origCreateOffer.apply(this, arguments);
-  };
-}
-function shimAudioContext(window) {
-  if (_typeof(window) !== 'object' || window.AudioContext) {
-    return;
-  }
-  window.AudioContext = window.webkitAudioContext;
-}

+ 0 - 260
node_modules/webrtc-adapter/dist/utils.js

@@ -1,260 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.compactObject = compactObject;
-exports.deprecated = deprecated;
-exports.detectBrowser = detectBrowser;
-exports.disableLog = disableLog;
-exports.disableWarnings = disableWarnings;
-exports.extractVersion = extractVersion;
-exports.filterStats = filterStats;
-exports.log = log;
-exports.walkStats = walkStats;
-exports.wrapPeerConnectionEvent = wrapPeerConnectionEvent;
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-var logDisabled_ = true;
-var deprecationWarnings_ = true;
-
-/**
- * Extract browser version out of the provided user agent string.
- *
- * @param {!string} uastring userAgent string.
- * @param {!string} expr Regular expression used as match criteria.
- * @param {!number} pos position in the version string to be returned.
- * @return {!number} browser version.
- */
-function extractVersion(uastring, expr, pos) {
-  var match = uastring.match(expr);
-  return match && match.length >= pos && parseInt(match[pos], 10);
-}
-
-// Wraps the peerconnection event eventNameToWrap in a function
-// which returns the modified event object (or false to prevent
-// the event).
-function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  var proto = window.RTCPeerConnection.prototype;
-  var nativeAddEventListener = proto.addEventListener;
-  proto.addEventListener = function (nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap) {
-      return nativeAddEventListener.apply(this, arguments);
-    }
-    var wrappedCallback = function wrappedCallback(e) {
-      var modifiedEvent = wrapper(e);
-      if (modifiedEvent) {
-        if (cb.handleEvent) {
-          cb.handleEvent(modifiedEvent);
-        } else {
-          cb(modifiedEvent);
-        }
-      }
-    };
-    this._eventMap = this._eventMap || {};
-    if (!this._eventMap[eventNameToWrap]) {
-      this._eventMap[eventNameToWrap] = new Map();
-    }
-    this._eventMap[eventNameToWrap].set(cb, wrappedCallback);
-    return nativeAddEventListener.apply(this, [nativeEventName, wrappedCallback]);
-  };
-  var nativeRemoveEventListener = proto.removeEventListener;
-  proto.removeEventListener = function (nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap || !this._eventMap || !this._eventMap[eventNameToWrap]) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    if (!this._eventMap[eventNameToWrap].has(cb)) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    var unwrappedCb = this._eventMap[eventNameToWrap].get(cb);
-    this._eventMap[eventNameToWrap]["delete"](cb);
-    if (this._eventMap[eventNameToWrap].size === 0) {
-      delete this._eventMap[eventNameToWrap];
-    }
-    if (Object.keys(this._eventMap).length === 0) {
-      delete this._eventMap;
-    }
-    return nativeRemoveEventListener.apply(this, [nativeEventName, unwrappedCb]);
-  };
-  Object.defineProperty(proto, 'on' + eventNameToWrap, {
-    get: function get() {
-      return this['_on' + eventNameToWrap];
-    },
-    set: function set(cb) {
-      if (this['_on' + eventNameToWrap]) {
-        this.removeEventListener(eventNameToWrap, this['_on' + eventNameToWrap]);
-        delete this['_on' + eventNameToWrap];
-      }
-      if (cb) {
-        this.addEventListener(eventNameToWrap, this['_on' + eventNameToWrap] = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-}
-function disableLog(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + _typeof(bool) + '. Please use a boolean.');
-  }
-  logDisabled_ = bool;
-  return bool ? 'adapter.js logging disabled' : 'adapter.js logging enabled';
-}
-
-/**
- * Disable or enable deprecation warnings
- * @param {!boolean} bool set to true to disable warnings.
- */
-function disableWarnings(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + _typeof(bool) + '. Please use a boolean.');
-  }
-  deprecationWarnings_ = !bool;
-  return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');
-}
-function log() {
-  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
-    if (logDisabled_) {
-      return;
-    }
-    if (typeof console !== 'undefined' && typeof console.log === 'function') {
-      console.log.apply(console, arguments);
-    }
-  }
-}
-
-/**
- * Shows a deprecation warning suggesting the modern and spec-compatible API.
- */
-function deprecated(oldMethod, newMethod) {
-  if (!deprecationWarnings_) {
-    return;
-  }
-  console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');
-}
-
-/**
- * Browser detector.
- *
- * @return {object} result containing browser and version
- *     properties.
- */
-function detectBrowser(window) {
-  // Returned result object.
-  var result = {
-    browser: null,
-    version: null
-  };
-
-  // Fail early if it's not a browser
-  if (typeof window === 'undefined' || !window.navigator || !window.navigator.userAgent) {
-    result.browser = 'Not a browser.';
-    return result;
-  }
-  var navigator = window.navigator;
-  if (navigator.mozGetUserMedia) {
-    // Firefox.
-    result.browser = 'firefox';
-    result.version = extractVersion(navigator.userAgent, /Firefox\/(\d+)\./, 1);
-  } else if (navigator.webkitGetUserMedia || window.isSecureContext === false && window.webkitRTCPeerConnection) {
-    // Chrome, Chromium, Webview, Opera.
-    // Version matches Chrome/WebRTC version.
-    // Chrome 74 removed webkitGetUserMedia on http as well so we need the
-    // more complicated fallback to webkitRTCPeerConnection.
-    result.browser = 'chrome';
-    result.version = extractVersion(navigator.userAgent, /Chrom(e|ium)\/(\d+)\./, 2);
-  } else if (window.RTCPeerConnection && navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) {
-    // Safari.
-    result.browser = 'safari';
-    result.version = extractVersion(navigator.userAgent, /AppleWebKit\/(\d+)\./, 1);
-    result.supportsUnifiedPlan = window.RTCRtpTransceiver && 'currentDirection' in window.RTCRtpTransceiver.prototype;
-  } else {
-    // Default fallthrough: not supported.
-    result.browser = 'Not a supported browser.';
-    return result;
-  }
-  return result;
-}
-
-/**
- * Checks if something is an object.
- *
- * @param {*} val The something you want to check.
- * @return true if val is an object, false otherwise.
- */
-function isObject(val) {
-  return Object.prototype.toString.call(val) === '[object Object]';
-}
-
-/**
- * Remove all empty objects and undefined values
- * from a nested object -- an enhanced and vanilla version
- * of Lodash's `compact`.
- */
-function compactObject(data) {
-  if (!isObject(data)) {
-    return data;
-  }
-  return Object.keys(data).reduce(function (accumulator, key) {
-    var isObj = isObject(data[key]);
-    var value = isObj ? compactObject(data[key]) : data[key];
-    var isEmptyObject = isObj && !Object.keys(value).length;
-    if (value === undefined || isEmptyObject) {
-      return accumulator;
-    }
-    return Object.assign(accumulator, _defineProperty({}, key, value));
-  }, {});
-}
-
-/* iterates the stats graph recursively. */
-function walkStats(stats, base, resultSet) {
-  if (!base || resultSet.has(base.id)) {
-    return;
-  }
-  resultSet.set(base.id, base);
-  Object.keys(base).forEach(function (name) {
-    if (name.endsWith('Id')) {
-      walkStats(stats, stats.get(base[name]), resultSet);
-    } else if (name.endsWith('Ids')) {
-      base[name].forEach(function (id) {
-        walkStats(stats, stats.get(id), resultSet);
-      });
-    }
-  });
-}
-
-/* filter getStats for a sender/receiver track. */
-function filterStats(result, track, outbound) {
-  var streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp';
-  var filteredResult = new Map();
-  if (track === null) {
-    return filteredResult;
-  }
-  var trackStats = [];
-  result.forEach(function (value) {
-    if (value.type === 'track' && value.trackIdentifier === track.id) {
-      trackStats.push(value);
-    }
-  });
-  trackStats.forEach(function (trackStat) {
-    result.forEach(function (stats) {
-      if (stats.type === streamStatsType && stats.trackId === trackStat.id) {
-        walkStats(result, stats, filteredResult);
-      }
-    });
-  });
-  return filteredResult;
-}

+ 0 - 59
node_modules/webrtc-adapter/index.d.ts

@@ -1,59 +0,0 @@
-declare module "webrtc-adapter" {
-    interface IBrowserDetails {
-        browser: string;
-        version?: number;
-        supportsUnifiedPlan?: boolean;
-    }
-
-    interface ICommonShim {
-        shimRTCIceCandidate(window: Window): void;
-        shimMaxMessageSize(window: Window): void;
-        shimSendThrowTypeError(window: Window): void;
-        shimConnectionState(window: Window): void;
-        removeAllowExtmapMixed(window: Window): void;
-    }
-
-    interface IChromeShim {
-        shimMediaStream(window: Window): void;
-        shimOnTrack(window: Window): void;
-        shimGetSendersWithDtmf(window: Window): void;
-        shimGetStats(window: Window): void;
-        shimSenderReceiverGetStats(window: Window): void;
-        shimAddTrackRemoveTrackWithNative(window: Window): void;
-        shimAddTrackRemoveTrack(window: Window): void;
-        shimPeerConnection(window: Window): void;
-        fixNegotiationNeeded(window: Window): void;
-    }
-
-    interface IFirefoxShim {
-        shimOnTrack(window: Window): void;
-        shimPeerConnection(window: Window): void;
-        shimSenderGetStats(window: Window): void;
-        shimReceiverGetStats(window: Window): void;
-        shimRemoveStream(window: Window): void;
-        shimRTCDataChannel(window: Window): void;
-    }
-
-    interface ISafariShim {
-        shimLocalStreamsAPI(window: Window): void;
-        shimRemoteStreamsAPI(window: Window): void;
-        shimCallbacksAPI(window: Window): void;
-        shimGetUserMedia(window: Window): void;
-        shimConstraints(constraints: MediaStreamConstraints): void;
-        shimRTCIceServerUrls(window: Window): void;
-        shimTrackEventTransceiver(window: Window): void;
-        shimCreateOfferLegacy(window: Window): void;
-    }
-
-    export interface IAdapter {
-        browserDetails: IBrowserDetails;
-        commonShim: ICommonShim;
-        browserShim: IChromeShim | IFirefoxShim | ISafariShim | undefined;
-        extractVersion(uastring: string, expr: string, pos: number): number;
-        disableLog(disable: boolean): void;
-        disableWarnings(disable: boolean): void;
-    }
-
-    const adapter: IAdapter;
-    export default adapter;
-}

+ 0 - 3364
node_modules/webrtc-adapter/out/adapter.js

@@ -1,3364 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.adapter = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-
-'use strict';
-
-var _adapter_factory = require("./adapter_factory.js");
-var adapter = (0, _adapter_factory.adapterFactory)({
-  window: typeof window === 'undefined' ? undefined : window
-});
-module.exports = adapter; // this is the difference from adapter_core.
-
-},{"./adapter_factory.js":2}],2:[function(require,module,exports){
-"use strict";
-
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.adapterFactory = adapterFactory;
-var utils = _interopRequireWildcard(require("./utils"));
-var chromeShim = _interopRequireWildcard(require("./chrome/chrome_shim"));
-var firefoxShim = _interopRequireWildcard(require("./firefox/firefox_shim"));
-var safariShim = _interopRequireWildcard(require("./safari/safari_shim"));
-var commonShim = _interopRequireWildcard(require("./common_shim"));
-var sdp = _interopRequireWildcard(require("sdp"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-
-// Browser shims.
-
-// Shimming starts here.
-function adapterFactory() {
-  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
-    window = _ref.window;
-  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
-    shimChrome: true,
-    shimFirefox: true,
-    shimSafari: true
-  };
-  // Utils.
-  var logging = utils.log;
-  var browserDetails = utils.detectBrowser(window);
-  var adapter = {
-    browserDetails: browserDetails,
-    commonShim: commonShim,
-    extractVersion: utils.extractVersion,
-    disableLog: utils.disableLog,
-    disableWarnings: utils.disableWarnings,
-    // Expose sdp as a convenience. For production apps include directly.
-    sdp: sdp
-  };
-
-  // Shim browser if found.
-  switch (browserDetails.browser) {
-    case 'chrome':
-      if (!chromeShim || !chromeShim.shimPeerConnection || !options.shimChrome) {
-        logging('Chrome shim is not included in this adapter release.');
-        return adapter;
-      }
-      if (browserDetails.version === null) {
-        logging('Chrome shim can not determine version, not shimming.');
-        return adapter;
-      }
-      logging('adapter.js shimming chrome.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = chromeShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      chromeShim.shimGetUserMedia(window, browserDetails);
-      chromeShim.shimMediaStream(window, browserDetails);
-      chromeShim.shimPeerConnection(window, browserDetails);
-      chromeShim.shimOnTrack(window, browserDetails);
-      chromeShim.shimAddTrackRemoveTrack(window, browserDetails);
-      chromeShim.shimGetSendersWithDtmf(window, browserDetails);
-      chromeShim.shimGetStats(window, browserDetails);
-      chromeShim.shimSenderReceiverGetStats(window, browserDetails);
-      chromeShim.fixNegotiationNeeded(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    case 'firefox':
-      if (!firefoxShim || !firefoxShim.shimPeerConnection || !options.shimFirefox) {
-        logging('Firefox shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming firefox.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = firefoxShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      firefoxShim.shimGetUserMedia(window, browserDetails);
-      firefoxShim.shimPeerConnection(window, browserDetails);
-      firefoxShim.shimOnTrack(window, browserDetails);
-      firefoxShim.shimRemoveStream(window, browserDetails);
-      firefoxShim.shimSenderGetStats(window, browserDetails);
-      firefoxShim.shimReceiverGetStats(window, browserDetails);
-      firefoxShim.shimRTCDataChannel(window, browserDetails);
-      firefoxShim.shimAddTransceiver(window, browserDetails);
-      firefoxShim.shimGetParameters(window, browserDetails);
-      firefoxShim.shimCreateOffer(window, browserDetails);
-      firefoxShim.shimCreateAnswer(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      break;
-    case 'safari':
-      if (!safariShim || !options.shimSafari) {
-        logging('Safari shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming safari.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = safariShim;
-
-      // Must be called before shimCallbackAPI.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      safariShim.shimRTCIceServerUrls(window, browserDetails);
-      safariShim.shimCreateOfferLegacy(window, browserDetails);
-      safariShim.shimCallbacksAPI(window, browserDetails);
-      safariShim.shimLocalStreamsAPI(window, browserDetails);
-      safariShim.shimRemoteStreamsAPI(window, browserDetails);
-      safariShim.shimTrackEventTransceiver(window, browserDetails);
-      safariShim.shimGetUserMedia(window, browserDetails);
-      safariShim.shimAudioContext(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    default:
-      logging('Unsupported browser!');
-      break;
-  }
-  return adapter;
-}
-
-},{"./chrome/chrome_shim":3,"./common_shim":6,"./firefox/firefox_shim":7,"./safari/safari_shim":10,"./utils":11,"sdp":12}],3:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.fixNegotiationNeeded = fixNegotiationNeeded;
-exports.shimAddTrackRemoveTrack = shimAddTrackRemoveTrack;
-exports.shimAddTrackRemoveTrackWithNative = shimAddTrackRemoveTrackWithNative;
-Object.defineProperty(exports, "shimGetDisplayMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getdisplaymedia.shimGetDisplayMedia;
-  }
-});
-exports.shimGetSendersWithDtmf = shimGetSendersWithDtmf;
-exports.shimGetStats = shimGetStats;
-Object.defineProperty(exports, "shimGetUserMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getusermedia.shimGetUserMedia;
-  }
-});
-exports.shimMediaStream = shimMediaStream;
-exports.shimOnTrack = shimOnTrack;
-exports.shimPeerConnection = shimPeerConnection;
-exports.shimSenderReceiverGetStats = shimSenderReceiverGetStats;
-var utils = _interopRequireWildcard(require("../utils.js"));
-var _getusermedia = require("./getusermedia");
-var _getdisplaymedia = require("./getdisplaymedia");
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimMediaStream(window) {
-  window.MediaStream = window.MediaStream || window.webkitMediaStream;
-}
-function shimOnTrack(window) {
-  if (_typeof(window) === 'object' && window.RTCPeerConnection && !('ontrack' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
-      get: function get() {
-        return this._ontrack;
-      },
-      set: function set(f) {
-        if (this._ontrack) {
-          this.removeEventListener('track', this._ontrack);
-        }
-        this.addEventListener('track', this._ontrack = f);
-      },
-      enumerable: true,
-      configurable: true
-    });
-    var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-      var _this = this;
-      if (!this._ontrackpoly) {
-        this._ontrackpoly = function (e) {
-          // onaddstream does not fire when a track is added to an existing
-          // stream. But stream.onaddtrack is implemented so we use that.
-          e.stream.addEventListener('addtrack', function (te) {
-            var receiver;
-            if (window.RTCPeerConnection.prototype.getReceivers) {
-              receiver = _this.getReceivers().find(function (r) {
-                return r.track && r.track.id === te.track.id;
-              });
-            } else {
-              receiver = {
-                track: te.track
-              };
-            }
-            var event = new Event('track');
-            event.track = te.track;
-            event.receiver = receiver;
-            event.transceiver = {
-              receiver: receiver
-            };
-            event.streams = [e.stream];
-            _this.dispatchEvent(event);
-          });
-          e.stream.getTracks().forEach(function (track) {
-            var receiver;
-            if (window.RTCPeerConnection.prototype.getReceivers) {
-              receiver = _this.getReceivers().find(function (r) {
-                return r.track && r.track.id === track.id;
-              });
-            } else {
-              receiver = {
-                track: track
-              };
-            }
-            var event = new Event('track');
-            event.track = track;
-            event.receiver = receiver;
-            event.transceiver = {
-              receiver: receiver
-            };
-            event.streams = [e.stream];
-            _this.dispatchEvent(event);
-          });
-        };
-        this.addEventListener('addstream', this._ontrackpoly);
-      }
-      return origSetRemoteDescription.apply(this, arguments);
-    };
-  } else {
-    // even if RTCRtpTransceiver is in window, it is only used and
-    // emitted in unified-plan. Unfortunately this means we need
-    // to unconditionally wrap the event.
-    utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-      if (!e.transceiver) {
-        Object.defineProperty(e, 'transceiver', {
-          value: {
-            receiver: e.receiver
-          }
-        });
-      }
-      return e;
-    });
-  }
-}
-function shimGetSendersWithDtmf(window) {
-  // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.
-  if (_typeof(window) === 'object' && window.RTCPeerConnection && !('getSenders' in window.RTCPeerConnection.prototype) && 'createDTMFSender' in window.RTCPeerConnection.prototype) {
-    var shimSenderWithDtmf = function shimSenderWithDtmf(pc, track) {
-      return {
-        track: track,
-        get dtmf() {
-          if (this._dtmf === undefined) {
-            if (track.kind === 'audio') {
-              this._dtmf = pc.createDTMFSender(track);
-            } else {
-              this._dtmf = null;
-            }
-          }
-          return this._dtmf;
-        },
-        _pc: pc
-      };
-    };
-
-    // augment addTrack when getSenders is not available.
-    if (!window.RTCPeerConnection.prototype.getSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        this._senders = this._senders || [];
-        return this._senders.slice(); // return a copy of the internal state.
-      };
-
-      var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-      window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-        var sender = origAddTrack.apply(this, arguments);
-        if (!sender) {
-          sender = shimSenderWithDtmf(this, track);
-          this._senders.push(sender);
-        }
-        return sender;
-      };
-      var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-      window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-        origRemoveTrack.apply(this, arguments);
-        var idx = this._senders.indexOf(sender);
-        if (idx !== -1) {
-          this._senders.splice(idx, 1);
-        }
-      };
-    }
-    var origAddStream = window.RTCPeerConnection.prototype.addStream;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      var _this2 = this;
-      this._senders = this._senders || [];
-      origAddStream.apply(this, [stream]);
-      stream.getTracks().forEach(function (track) {
-        _this2._senders.push(shimSenderWithDtmf(_this2, track));
-      });
-    };
-    var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-    window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-      var _this3 = this;
-      this._senders = this._senders || [];
-      origRemoveStream.apply(this, [stream]);
-      stream.getTracks().forEach(function (track) {
-        var sender = _this3._senders.find(function (s) {
-          return s.track === track;
-        });
-        if (sender) {
-          // remove sender
-          _this3._senders.splice(_this3._senders.indexOf(sender), 1);
-        }
-      });
-    };
-  } else if (_typeof(window) === 'object' && window.RTCPeerConnection && 'getSenders' in window.RTCPeerConnection.prototype && 'createDTMFSender' in window.RTCPeerConnection.prototype && window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {
-    var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      var _this4 = this;
-      var senders = origGetSenders.apply(this, []);
-      senders.forEach(function (sender) {
-        return sender._pc = _this4;
-      });
-      return senders;
-    };
-    Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {
-      get: function get() {
-        if (this._dtmf === undefined) {
-          if (this.track.kind === 'audio') {
-            this._dtmf = this._pc.createDTMFSender(this.track);
-          } else {
-            this._dtmf = null;
-          }
-        }
-        return this._dtmf;
-      }
-    });
-  }
-}
-function shimGetStats(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  var origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    var _this5 = this;
-    var _arguments = Array.prototype.slice.call(arguments),
-      selector = _arguments[0],
-      onSucc = _arguments[1],
-      onErr = _arguments[2];
-
-    // If selector is a function then we are in the old style stats so just
-    // pass back the original getStats format to avoid breaking old users.
-    if (arguments.length > 0 && typeof selector === 'function') {
-      return origGetStats.apply(this, arguments);
-    }
-
-    // When spec-style getStats is supported, return those when called with
-    // either no arguments or the selector argument is null.
-    if (origGetStats.length === 0 && (arguments.length === 0 || typeof selector !== 'function')) {
-      return origGetStats.apply(this, []);
-    }
-    var fixChromeStats_ = function fixChromeStats_(response) {
-      var standardReport = {};
-      var reports = response.result();
-      reports.forEach(function (report) {
-        var standardStats = {
-          id: report.id,
-          timestamp: report.timestamp,
-          type: {
-            localcandidate: 'local-candidate',
-            remotecandidate: 'remote-candidate'
-          }[report.type] || report.type
-        };
-        report.names().forEach(function (name) {
-          standardStats[name] = report.stat(name);
-        });
-        standardReport[standardStats.id] = standardStats;
-      });
-      return standardReport;
-    };
-
-    // shim getStats with maplike support
-    var makeMapStats = function makeMapStats(stats) {
-      return new Map(Object.keys(stats).map(function (key) {
-        return [key, stats[key]];
-      }));
-    };
-    if (arguments.length >= 2) {
-      var successCallbackWrapper_ = function successCallbackWrapper_(response) {
-        onSucc(makeMapStats(fixChromeStats_(response)));
-      };
-      return origGetStats.apply(this, [successCallbackWrapper_, selector]);
-    }
-
-    // promise-support
-    return new Promise(function (resolve, reject) {
-      origGetStats.apply(_this5, [function (response) {
-        resolve(makeMapStats(fixChromeStats_(response)));
-      }, reject]);
-    }).then(onSucc, onErr);
-  };
-}
-function shimSenderReceiverGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender && window.RTCRtpReceiver)) {
-    return;
-  }
-
-  // shim sender stats.
-  if (!('getStats' in window.RTCRtpSender.prototype)) {
-    var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    if (origGetSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        var _this6 = this;
-        var senders = origGetSenders.apply(this, []);
-        senders.forEach(function (sender) {
-          return sender._pc = _this6;
-        });
-        return senders;
-      };
-    }
-    var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-    if (origAddTrack) {
-      window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-        var sender = origAddTrack.apply(this, arguments);
-        sender._pc = this;
-        return sender;
-      };
-    }
-    window.RTCRtpSender.prototype.getStats = function getStats() {
-      var sender = this;
-      return this._pc.getStats().then(function (result) {
-        return (
-          /* Note: this will include stats of all senders that
-           *   send a track with the same id as sender.track as
-           *   it is not possible to identify the RTCRtpSender.
-           */
-          utils.filterStats(result, sender.track, true)
-        );
-      });
-    };
-  }
-
-  // shim receiver stats.
-  if (!('getStats' in window.RTCRtpReceiver.prototype)) {
-    var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-    if (origGetReceivers) {
-      window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
-        var _this7 = this;
-        var receivers = origGetReceivers.apply(this, []);
-        receivers.forEach(function (receiver) {
-          return receiver._pc = _this7;
-        });
-        return receivers;
-      };
-    }
-    utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-      e.receiver._pc = e.srcElement;
-      return e;
-    });
-    window.RTCRtpReceiver.prototype.getStats = function getStats() {
-      var receiver = this;
-      return this._pc.getStats().then(function (result) {
-        return utils.filterStats(result, receiver.track, false);
-      });
-    };
-  }
-  if (!('getStats' in window.RTCRtpSender.prototype && 'getStats' in window.RTCRtpReceiver.prototype)) {
-    return;
-  }
-
-  // shim RTCPeerConnection.getStats(track).
-  var origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    if (arguments.length > 0 && arguments[0] instanceof window.MediaStreamTrack) {
-      var track = arguments[0];
-      var sender;
-      var receiver;
-      var err;
-      this.getSenders().forEach(function (s) {
-        if (s.track === track) {
-          if (sender) {
-            err = true;
-          } else {
-            sender = s;
-          }
-        }
-      });
-      this.getReceivers().forEach(function (r) {
-        if (r.track === track) {
-          if (receiver) {
-            err = true;
-          } else {
-            receiver = r;
-          }
-        }
-        return r.track === track;
-      });
-      if (err || sender && receiver) {
-        return Promise.reject(new DOMException('There are more than one sender or receiver for the track.', 'InvalidAccessError'));
-      } else if (sender) {
-        return sender.getStats();
-      } else if (receiver) {
-        return receiver.getStats();
-      }
-      return Promise.reject(new DOMException('There is no sender or receiver for the track.', 'InvalidAccessError'));
-    }
-    return origGetStats.apply(this, arguments);
-  };
-}
-function shimAddTrackRemoveTrackWithNative(window) {
-  // shim addTrack/removeTrack with native variants in order to make
-  // the interactions with legacy getLocalStreams behave as in other browsers.
-  // Keeps a mapping stream.id => [stream, rtpsenders...]
-  window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-    var _this8 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    return Object.keys(this._shimmedLocalStreams).map(function (streamId) {
-      return _this8._shimmedLocalStreams[streamId][0];
-    });
-  };
-  var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-    if (!stream) {
-      return origAddTrack.apply(this, arguments);
-    }
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    var sender = origAddTrack.apply(this, arguments);
-    if (!this._shimmedLocalStreams[stream.id]) {
-      this._shimmedLocalStreams[stream.id] = [stream, sender];
-    } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) {
-      this._shimmedLocalStreams[stream.id].push(sender);
-    }
-    return sender;
-  };
-  var origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    var _this9 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    stream.getTracks().forEach(function (track) {
-      var alreadyExists = _this9.getSenders().find(function (s) {
-        return s.track === track;
-      });
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.', 'InvalidAccessError');
-      }
-    });
-    var existingSenders = this.getSenders();
-    origAddStream.apply(this, arguments);
-    var newSenders = this.getSenders().filter(function (newSender) {
-      return existingSenders.indexOf(newSender) === -1;
-    });
-    this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders);
-  };
-  var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    delete this._shimmedLocalStreams[stream.id];
-    return origRemoveStream.apply(this, arguments);
-  };
-  var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-  window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-    var _this10 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    if (sender) {
-      Object.keys(this._shimmedLocalStreams).forEach(function (streamId) {
-        var idx = _this10._shimmedLocalStreams[streamId].indexOf(sender);
-        if (idx !== -1) {
-          _this10._shimmedLocalStreams[streamId].splice(idx, 1);
-        }
-        if (_this10._shimmedLocalStreams[streamId].length === 1) {
-          delete _this10._shimmedLocalStreams[streamId];
-        }
-      });
-    }
-    return origRemoveTrack.apply(this, arguments);
-  };
-}
-function shimAddTrackRemoveTrack(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // shim addTrack and removeTrack.
-  if (window.RTCPeerConnection.prototype.addTrack && browserDetails.version >= 65) {
-    return shimAddTrackRemoveTrackWithNative(window);
-  }
-
-  // also shim pc.getLocalStreams when addTrack is shimmed
-  // to return the original streams.
-  var origGetLocalStreams = window.RTCPeerConnection.prototype.getLocalStreams;
-  window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-    var _this11 = this;
-    var nativeStreams = origGetLocalStreams.apply(this);
-    this._reverseStreams = this._reverseStreams || {};
-    return nativeStreams.map(function (stream) {
-      return _this11._reverseStreams[stream.id];
-    });
-  };
-  var origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    var _this12 = this;
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    stream.getTracks().forEach(function (track) {
-      var alreadyExists = _this12.getSenders().find(function (s) {
-        return s.track === track;
-      });
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.', 'InvalidAccessError');
-      }
-    });
-    // Add identity mapping for consistency with addTrack.
-    // Unless this is being used with a stream from addTrack.
-    if (!this._reverseStreams[stream.id]) {
-      var newStream = new window.MediaStream(stream.getTracks());
-      this._streams[stream.id] = newStream;
-      this._reverseStreams[newStream.id] = stream;
-      stream = newStream;
-    }
-    origAddStream.apply(this, [stream]);
-  };
-  var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    origRemoveStream.apply(this, [this._streams[stream.id] || stream]);
-    delete this._reverseStreams[this._streams[stream.id] ? this._streams[stream.id].id : stream.id];
-    delete this._streams[stream.id];
-  };
-  window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-    var _this13 = this;
-    if (this.signalingState === 'closed') {
-      throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
-    }
-    var streams = [].slice.call(arguments, 1);
-    if (streams.length !== 1 || !streams[0].getTracks().find(function (t) {
-      return t === track;
-    })) {
-      // this is not fully correct but all we can manage without
-      // [[associated MediaStreams]] internal slot.
-      throw new DOMException('The adapter.js addTrack polyfill only supports a single ' + ' stream which is associated with the specified track.', 'NotSupportedError');
-    }
-    var alreadyExists = this.getSenders().find(function (s) {
-      return s.track === track;
-    });
-    if (alreadyExists) {
-      throw new DOMException('Track already exists.', 'InvalidAccessError');
-    }
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    var oldStream = this._streams[stream.id];
-    if (oldStream) {
-      // this is using odd Chrome behaviour, use with caution:
-      // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815
-      // Note: we rely on the high-level addTrack/dtmf shim to
-      // create the sender with a dtmf sender.
-      oldStream.addTrack(track);
-
-      // Trigger ONN async.
-      Promise.resolve().then(function () {
-        _this13.dispatchEvent(new Event('negotiationneeded'));
-      });
-    } else {
-      var newStream = new window.MediaStream([track]);
-      this._streams[stream.id] = newStream;
-      this._reverseStreams[newStream.id] = stream;
-      this.addStream(newStream);
-    }
-    return this.getSenders().find(function (s) {
-      return s.track === track;
-    });
-  };
-
-  // replace the internal stream id with the external one and
-  // vice versa.
-  function replaceInternalStreamId(pc, description) {
-    var sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
-      var externalStream = pc._reverseStreams[internalId];
-      var internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(internalStream.id, 'g'), externalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp: sdp
-    });
-  }
-  function replaceExternalStreamId(pc, description) {
-    var sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
-      var externalStream = pc._reverseStreams[internalId];
-      var internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(externalStream.id, 'g'), internalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp: sdp
-    });
-  }
-  ['createOffer', 'createAnswer'].forEach(function (method) {
-    var nativeMethod = window.RTCPeerConnection.prototype[method];
-    var methodObj = _defineProperty({}, method, function () {
-      var _this14 = this;
-      var args = arguments;
-      var isLegacyCall = arguments.length && typeof arguments[0] === 'function';
-      if (isLegacyCall) {
-        return nativeMethod.apply(this, [function (description) {
-          var desc = replaceInternalStreamId(_this14, description);
-          args[0].apply(null, [desc]);
-        }, function (err) {
-          if (args[1]) {
-            args[1].apply(null, err);
-          }
-        }, arguments[2]]);
-      }
-      return nativeMethod.apply(this, arguments).then(function (description) {
-        return replaceInternalStreamId(_this14, description);
-      });
-    });
-    window.RTCPeerConnection.prototype[method] = methodObj[method];
-  });
-  var origSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;
-  window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {
-    if (!arguments.length || !arguments[0].type) {
-      return origSetLocalDescription.apply(this, arguments);
-    }
-    arguments[0] = replaceExternalStreamId(this, arguments[0]);
-    return origSetLocalDescription.apply(this, arguments);
-  };
-
-  // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier
-
-  var origLocalDescription = Object.getOwnPropertyDescriptor(window.RTCPeerConnection.prototype, 'localDescription');
-  Object.defineProperty(window.RTCPeerConnection.prototype, 'localDescription', {
-    get: function get() {
-      var description = origLocalDescription.get.apply(this);
-      if (description.type === '') {
-        return description;
-      }
-      return replaceInternalStreamId(this, description);
-    }
-  });
-  window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-    var _this15 = this;
-    if (this.signalingState === 'closed') {
-      throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
-    }
-    // We can not yet check for sender instanceof RTCRtpSender
-    // since we shim RTPSender. So we check if sender._pc is set.
-    if (!sender._pc) {
-      throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' + 'does not implement interface RTCRtpSender.', 'TypeError');
-    }
-    var isLocal = sender._pc === this;
-    if (!isLocal) {
-      throw new DOMException('Sender was not created by this connection.', 'InvalidAccessError');
-    }
-
-    // Search for the native stream the senders track belongs to.
-    this._streams = this._streams || {};
-    var stream;
-    Object.keys(this._streams).forEach(function (streamid) {
-      var hasTrack = _this15._streams[streamid].getTracks().find(function (track) {
-        return sender.track === track;
-      });
-      if (hasTrack) {
-        stream = _this15._streams[streamid];
-      }
-    });
-    if (stream) {
-      if (stream.getTracks().length === 1) {
-        // if this is the last track of the stream, remove the stream. This
-        // takes care of any shimmed _senders.
-        this.removeStream(this._reverseStreams[stream.id]);
-      } else {
-        // relying on the same odd chrome behaviour as above.
-        stream.removeTrack(sender.track);
-      }
-      this.dispatchEvent(new Event('negotiationneeded'));
-    }
-  };
-}
-function shimPeerConnection(window, browserDetails) {
-  if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.webkitRTCPeerConnection;
-  }
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-
-  // shim implicit creation of RTCSessionDescription/RTCIceCandidate
-  if (browserDetails.version < 53) {
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
-      var nativeMethod = window.RTCPeerConnection.prototype[method];
-      var methodObj = _defineProperty({}, method, function () {
-        arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
-        return nativeMethod.apply(this, arguments);
-      });
-      window.RTCPeerConnection.prototype[method] = methodObj[method];
-    });
-  }
-}
-
-// Attempt to fix ONN in plan-b mode.
-function fixNegotiationNeeded(window, browserDetails) {
-  utils.wrapPeerConnectionEvent(window, 'negotiationneeded', function (e) {
-    var pc = e.target;
-    if (browserDetails.version < 72 || pc.getConfiguration && pc.getConfiguration().sdpSemantics === 'plan-b') {
-      if (pc.signalingState !== 'stable') {
-        return;
-      }
-    }
-    return e;
-  });
-}
-
-},{"../utils.js":11,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(require,module,exports){
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetDisplayMedia = shimGetDisplayMedia;
-function shimGetDisplayMedia(window, getSourceId) {
-  if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!window.navigator.mediaDevices) {
-    return;
-  }
-  // getSourceId is a function that returns a promise resolving with
-  // the sourceId of the screen/window/tab to be shared.
-  if (typeof getSourceId !== 'function') {
-    console.error('shimGetDisplayMedia: getSourceId argument is not ' + 'a function');
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
-    return getSourceId(constraints).then(function (sourceId) {
-      var widthSpecified = constraints.video && constraints.video.width;
-      var heightSpecified = constraints.video && constraints.video.height;
-      var frameRateSpecified = constraints.video && constraints.video.frameRate;
-      constraints.video = {
-        mandatory: {
-          chromeMediaSource: 'desktop',
-          chromeMediaSourceId: sourceId,
-          maxFrameRate: frameRateSpecified || 3
-        }
-      };
-      if (widthSpecified) {
-        constraints.video.mandatory.maxWidth = widthSpecified;
-      }
-      if (heightSpecified) {
-        constraints.video.mandatory.maxHeight = heightSpecified;
-      }
-      return window.navigator.mediaDevices.getUserMedia(constraints);
-    });
-  };
-}
-
-},{}],5:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetUserMedia = shimGetUserMedia;
-var utils = _interopRequireWildcard(require("../utils.js"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-var logging = utils.log;
-function shimGetUserMedia(window, browserDetails) {
-  var navigator = window && window.navigator;
-  if (!navigator.mediaDevices) {
-    return;
-  }
-  var constraintsToChrome_ = function constraintsToChrome_(c) {
-    if (_typeof(c) !== 'object' || c.mandatory || c.optional) {
-      return c;
-    }
-    var cc = {};
-    Object.keys(c).forEach(function (key) {
-      if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
-        return;
-      }
-      var r = _typeof(c[key]) === 'object' ? c[key] : {
-        ideal: c[key]
-      };
-      if (r.exact !== undefined && typeof r.exact === 'number') {
-        r.min = r.max = r.exact;
-      }
-      var oldname_ = function oldname_(prefix, name) {
-        if (prefix) {
-          return prefix + name.charAt(0).toUpperCase() + name.slice(1);
-        }
-        return name === 'deviceId' ? 'sourceId' : name;
-      };
-      if (r.ideal !== undefined) {
-        cc.optional = cc.optional || [];
-        var oc = {};
-        if (typeof r.ideal === 'number') {
-          oc[oldname_('min', key)] = r.ideal;
-          cc.optional.push(oc);
-          oc = {};
-          oc[oldname_('max', key)] = r.ideal;
-          cc.optional.push(oc);
-        } else {
-          oc[oldname_('', key)] = r.ideal;
-          cc.optional.push(oc);
-        }
-      }
-      if (r.exact !== undefined && typeof r.exact !== 'number') {
-        cc.mandatory = cc.mandatory || {};
-        cc.mandatory[oldname_('', key)] = r.exact;
-      } else {
-        ['min', 'max'].forEach(function (mix) {
-          if (r[mix] !== undefined) {
-            cc.mandatory = cc.mandatory || {};
-            cc.mandatory[oldname_(mix, key)] = r[mix];
-          }
-        });
-      }
-    });
-    if (c.advanced) {
-      cc.optional = (cc.optional || []).concat(c.advanced);
-    }
-    return cc;
-  };
-  var shimConstraints_ = function shimConstraints_(constraints, func) {
-    if (browserDetails.version >= 61) {
-      return func(constraints);
-    }
-    constraints = JSON.parse(JSON.stringify(constraints));
-    if (constraints && _typeof(constraints.audio) === 'object') {
-      var remap = function remap(obj, a, b) {
-        if (a in obj && !(b in obj)) {
-          obj[b] = obj[a];
-          delete obj[a];
-        }
-      };
-      constraints = JSON.parse(JSON.stringify(constraints));
-      remap(constraints.audio, 'autoGainControl', 'googAutoGainControl');
-      remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression');
-      constraints.audio = constraintsToChrome_(constraints.audio);
-    }
-    if (constraints && _typeof(constraints.video) === 'object') {
-      // Shim facingMode for mobile & surface pro.
-      var face = constraints.video.facingMode;
-      face = face && (_typeof(face) === 'object' ? face : {
-        ideal: face
-      });
-      var getSupportedFacingModeLies = browserDetails.version < 66;
-      if (face && (face.exact === 'user' || face.exact === 'environment' || face.ideal === 'user' || face.ideal === 'environment') && !(navigator.mediaDevices.getSupportedConstraints && navigator.mediaDevices.getSupportedConstraints().facingMode && !getSupportedFacingModeLies)) {
-        delete constraints.video.facingMode;
-        var matches;
-        if (face.exact === 'environment' || face.ideal === 'environment') {
-          matches = ['back', 'rear'];
-        } else if (face.exact === 'user' || face.ideal === 'user') {
-          matches = ['front'];
-        }
-        if (matches) {
-          // Look for matches in label, or use last cam for back (typical).
-          return navigator.mediaDevices.enumerateDevices().then(function (devices) {
-            devices = devices.filter(function (d) {
-              return d.kind === 'videoinput';
-            });
-            var dev = devices.find(function (d) {
-              return matches.some(function (match) {
-                return d.label.toLowerCase().includes(match);
-              });
-            });
-            if (!dev && devices.length && matches.includes('back')) {
-              dev = devices[devices.length - 1]; // more likely the back cam
-            }
-
-            if (dev) {
-              constraints.video.deviceId = face.exact ? {
-                exact: dev.deviceId
-              } : {
-                ideal: dev.deviceId
-              };
-            }
-            constraints.video = constraintsToChrome_(constraints.video);
-            logging('chrome: ' + JSON.stringify(constraints));
-            return func(constraints);
-          });
-        }
-      }
-      constraints.video = constraintsToChrome_(constraints.video);
-    }
-    logging('chrome: ' + JSON.stringify(constraints));
-    return func(constraints);
-  };
-  var shimError_ = function shimError_(e) {
-    if (browserDetails.version >= 64) {
-      return e;
-    }
-    return {
-      name: {
-        PermissionDeniedError: 'NotAllowedError',
-        PermissionDismissedError: 'NotAllowedError',
-        InvalidStateError: 'NotAllowedError',
-        DevicesNotFoundError: 'NotFoundError',
-        ConstraintNotSatisfiedError: 'OverconstrainedError',
-        TrackStartError: 'NotReadableError',
-        MediaDeviceFailedDueToShutdown: 'NotAllowedError',
-        MediaDeviceKillSwitchOn: 'NotAllowedError',
-        TabCaptureError: 'AbortError',
-        ScreenCaptureError: 'AbortError',
-        DeviceCaptureError: 'AbortError'
-      }[e.name] || e.name,
-      message: e.message,
-      constraint: e.constraint || e.constraintName,
-      toString: function toString() {
-        return this.name + (this.message && ': ') + this.message;
-      }
-    };
-  };
-  var getUserMedia_ = function getUserMedia_(constraints, onSuccess, onError) {
-    shimConstraints_(constraints, function (c) {
-      navigator.webkitGetUserMedia(c, onSuccess, function (e) {
-        if (onError) {
-          onError(shimError_(e));
-        }
-      });
-    });
-  };
-  navigator.getUserMedia = getUserMedia_.bind(navigator);
-
-  // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia
-  // function which returns a Promise, it does not accept spec-style
-  // constraints.
-  if (navigator.mediaDevices.getUserMedia) {
-    var origGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (cs) {
-      return shimConstraints_(cs, function (c) {
-        return origGetUserMedia(c).then(function (stream) {
-          if (c.audio && !stream.getAudioTracks().length || c.video && !stream.getVideoTracks().length) {
-            stream.getTracks().forEach(function (track) {
-              track.stop();
-            });
-            throw new DOMException('', 'NotFoundError');
-          }
-          return stream;
-        }, function (e) {
-          return Promise.reject(shimError_(e));
-        });
-      });
-    };
-  }
-}
-
-},{"../utils.js":11}],6:[function(require,module,exports){
-/*
- *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.removeExtmapAllowMixed = removeExtmapAllowMixed;
-exports.shimAddIceCandidateNullOrEmpty = shimAddIceCandidateNullOrEmpty;
-exports.shimConnectionState = shimConnectionState;
-exports.shimMaxMessageSize = shimMaxMessageSize;
-exports.shimParameterlessSetLocalDescription = shimParameterlessSetLocalDescription;
-exports.shimRTCIceCandidate = shimRTCIceCandidate;
-exports.shimRTCIceCandidateRelayProtocol = shimRTCIceCandidateRelayProtocol;
-exports.shimSendThrowTypeError = shimSendThrowTypeError;
-var _sdp = _interopRequireDefault(require("sdp"));
-var utils = _interopRequireWildcard(require("./utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimRTCIceCandidate(window) {
-  // foundation is arbitrarily chosen as an indicator for full support for
-  // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
-  if (!window.RTCIceCandidate || window.RTCIceCandidate && 'foundation' in window.RTCIceCandidate.prototype) {
-    return;
-  }
-  var NativeRTCIceCandidate = window.RTCIceCandidate;
-  window.RTCIceCandidate = function RTCIceCandidate(args) {
-    // Remove the a= which shouldn't be part of the candidate string.
-    if (_typeof(args) === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) {
-      args = JSON.parse(JSON.stringify(args));
-      args.candidate = args.candidate.substring(2);
-    }
-    if (args.candidate && args.candidate.length) {
-      // Augment the native candidate with the parsed fields.
-      var nativeCandidate = new NativeRTCIceCandidate(args);
-      var parsedCandidate = _sdp["default"].parseCandidate(args.candidate);
-      for (var key in parsedCandidate) {
-        if (!(key in nativeCandidate)) {
-          Object.defineProperty(nativeCandidate, key, {
-            value: parsedCandidate[key]
-          });
-        }
-      }
-
-      // Override serializer to not serialize the extra attributes.
-      nativeCandidate.toJSON = function toJSON() {
-        return {
-          candidate: nativeCandidate.candidate,
-          sdpMid: nativeCandidate.sdpMid,
-          sdpMLineIndex: nativeCandidate.sdpMLineIndex,
-          usernameFragment: nativeCandidate.usernameFragment
-        };
-      };
-      return nativeCandidate;
-    }
-    return new NativeRTCIceCandidate(args);
-  };
-  window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) {
-    if (e.candidate) {
-      Object.defineProperty(e, 'candidate', {
-        value: new window.RTCIceCandidate(e.candidate),
-        writable: 'false'
-      });
-    }
-    return e;
-  });
-}
-function shimRTCIceCandidateRelayProtocol(window) {
-  if (!window.RTCIceCandidate || window.RTCIceCandidate && 'relayProtocol' in window.RTCIceCandidate.prototype) {
-    return;
-  }
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) {
-    if (e.candidate) {
-      var parsedCandidate = _sdp["default"].parseCandidate(e.candidate.candidate);
-      if (parsedCandidate.type === 'relay') {
-        // This is a libwebrtc-specific mapping of local type preference
-        // to relayProtocol.
-        e.candidate.relayProtocol = {
-          0: 'tls',
-          1: 'tcp',
-          2: 'udp'
-        }[parsedCandidate.priority >> 24];
-      }
-    }
-    return e;
-  });
-}
-function shimMaxMessageSize(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  if (!('sctp' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {
-      get: function get() {
-        return typeof this._sctp === 'undefined' ? null : this._sctp;
-      }
-    });
-  }
-  var sctpInDescription = function sctpInDescription(description) {
-    if (!description || !description.sdp) {
-      return false;
-    }
-    var sections = _sdp["default"].splitSections(description.sdp);
-    sections.shift();
-    return sections.some(function (mediaSection) {
-      var mLine = _sdp["default"].parseMLine(mediaSection);
-      return mLine && mLine.kind === 'application' && mLine.protocol.indexOf('SCTP') !== -1;
-    });
-  };
-  var getRemoteFirefoxVersion = function getRemoteFirefoxVersion(description) {
-    // TODO: Is there a better solution for detecting Firefox?
-    var match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);
-    if (match === null || match.length < 2) {
-      return -1;
-    }
-    var version = parseInt(match[1], 10);
-    // Test for NaN (yes, this is ugly)
-    return version !== version ? -1 : version;
-  };
-  var getCanSendMaxMessageSize = function getCanSendMaxMessageSize(remoteIsFirefox) {
-    // Every implementation we know can send at least 64 KiB.
-    // Note: Although Chrome is technically able to send up to 256 KiB, the
-    //       data does not reach the other peer reliably.
-    //       See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419
-    var canSendMaxMessageSize = 65536;
-    if (browserDetails.browser === 'firefox') {
-      if (browserDetails.version < 57) {
-        if (remoteIsFirefox === -1) {
-          // FF < 57 will send in 16 KiB chunks using the deprecated PPID
-          // fragmentation.
-          canSendMaxMessageSize = 16384;
-        } else {
-          // However, other FF (and RAWRTC) can reassemble PPID-fragmented
-          // messages. Thus, supporting ~2 GiB when sending.
-          canSendMaxMessageSize = 2147483637;
-        }
-      } else if (browserDetails.version < 60) {
-        // Currently, all FF >= 57 will reset the remote maximum message size
-        // to the default value when a data channel is created at a later
-        // stage. :(
-        // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-        canSendMaxMessageSize = browserDetails.version === 57 ? 65535 : 65536;
-      } else {
-        // FF >= 60 supports sending ~2 GiB
-        canSendMaxMessageSize = 2147483637;
-      }
-    }
-    return canSendMaxMessageSize;
-  };
-  var getMaxMessageSize = function getMaxMessageSize(description, remoteIsFirefox) {
-    // Note: 65536 bytes is the default value from the SDP spec. Also,
-    //       every implementation we know supports receiving 65536 bytes.
-    var maxMessageSize = 65536;
-
-    // FF 57 has a slightly incorrect default remote max message size, so
-    // we need to adjust it here to avoid a failure when sending.
-    // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697
-    if (browserDetails.browser === 'firefox' && browserDetails.version === 57) {
-      maxMessageSize = 65535;
-    }
-    var match = _sdp["default"].matchPrefix(description.sdp, 'a=max-message-size:');
-    if (match.length > 0) {
-      maxMessageSize = parseInt(match[0].substring(19), 10);
-    } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) {
-      // If the maximum message size is not present in the remote SDP and
-      // both local and remote are Firefox, the remote peer can receive
-      // ~2 GiB.
-      maxMessageSize = 2147483637;
-    }
-    return maxMessageSize;
-  };
-  var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-    this._sctp = null;
-    // Chrome decided to not expose .sctp in plan-b mode.
-    // As usual, adapter.js has to do an 'ugly worakaround'
-    // to cover up the mess.
-    if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) {
-      var _this$getConfiguratio = this.getConfiguration(),
-        sdpSemantics = _this$getConfiguratio.sdpSemantics;
-      if (sdpSemantics === 'plan-b') {
-        Object.defineProperty(this, 'sctp', {
-          get: function get() {
-            return typeof this._sctp === 'undefined' ? null : this._sctp;
-          },
-          enumerable: true,
-          configurable: true
-        });
-      }
-    }
-    if (sctpInDescription(arguments[0])) {
-      // Check if the remote is FF.
-      var isFirefox = getRemoteFirefoxVersion(arguments[0]);
-
-      // Get the maximum message size the local peer is capable of sending
-      var canSendMMS = getCanSendMaxMessageSize(isFirefox);
-
-      // Get the maximum message size of the remote peer.
-      var remoteMMS = getMaxMessageSize(arguments[0], isFirefox);
-
-      // Determine final maximum message size
-      var maxMessageSize;
-      if (canSendMMS === 0 && remoteMMS === 0) {
-        maxMessageSize = Number.POSITIVE_INFINITY;
-      } else if (canSendMMS === 0 || remoteMMS === 0) {
-        maxMessageSize = Math.max(canSendMMS, remoteMMS);
-      } else {
-        maxMessageSize = Math.min(canSendMMS, remoteMMS);
-      }
-
-      // Create a dummy RTCSctpTransport object and the 'maxMessageSize'
-      // attribute.
-      var sctp = {};
-      Object.defineProperty(sctp, 'maxMessageSize', {
-        get: function get() {
-          return maxMessageSize;
-        }
-      });
-      this._sctp = sctp;
-    }
-    return origSetRemoteDescription.apply(this, arguments);
-  };
-}
-function shimSendThrowTypeError(window) {
-  if (!(window.RTCPeerConnection && 'createDataChannel' in window.RTCPeerConnection.prototype)) {
-    return;
-  }
-
-  // Note: Although Firefox >= 57 has a native implementation, the maximum
-  //       message size can be reset for all data channels at a later stage.
-  //       See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-
-  function wrapDcSend(dc, pc) {
-    var origDataChannelSend = dc.send;
-    dc.send = function send() {
-      var data = arguments[0];
-      var length = data.length || data.size || data.byteLength;
-      if (dc.readyState === 'open' && pc.sctp && length > pc.sctp.maxMessageSize) {
-        throw new TypeError('Message too large (can send a maximum of ' + pc.sctp.maxMessageSize + ' bytes)');
-      }
-      return origDataChannelSend.apply(dc, arguments);
-    };
-  }
-  var origCreateDataChannel = window.RTCPeerConnection.prototype.createDataChannel;
-  window.RTCPeerConnection.prototype.createDataChannel = function createDataChannel() {
-    var dataChannel = origCreateDataChannel.apply(this, arguments);
-    wrapDcSend(dataChannel, this);
-    return dataChannel;
-  };
-  utils.wrapPeerConnectionEvent(window, 'datachannel', function (e) {
-    wrapDcSend(e.channel, e.target);
-    return e;
-  });
-}
-
-/* shims RTCConnectionState by pretending it is the same as iceConnectionState.
- * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12
- * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect
- * since DTLS failures would be hidden. See
- * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827
- * for the Firefox tracking bug.
- */
-function shimConnectionState(window) {
-  if (!window.RTCPeerConnection || 'connectionState' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  var proto = window.RTCPeerConnection.prototype;
-  Object.defineProperty(proto, 'connectionState', {
-    get: function get() {
-      return {
-        completed: 'connected',
-        checking: 'connecting'
-      }[this.iceConnectionState] || this.iceConnectionState;
-    },
-    enumerable: true,
-    configurable: true
-  });
-  Object.defineProperty(proto, 'onconnectionstatechange', {
-    get: function get() {
-      return this._onconnectionstatechange || null;
-    },
-    set: function set(cb) {
-      if (this._onconnectionstatechange) {
-        this.removeEventListener('connectionstatechange', this._onconnectionstatechange);
-        delete this._onconnectionstatechange;
-      }
-      if (cb) {
-        this.addEventListener('connectionstatechange', this._onconnectionstatechange = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-  ['setLocalDescription', 'setRemoteDescription'].forEach(function (method) {
-    var origMethod = proto[method];
-    proto[method] = function () {
-      if (!this._connectionstatechangepoly) {
-        this._connectionstatechangepoly = function (e) {
-          var pc = e.target;
-          if (pc._lastConnectionState !== pc.connectionState) {
-            pc._lastConnectionState = pc.connectionState;
-            var newEvent = new Event('connectionstatechange', e);
-            pc.dispatchEvent(newEvent);
-          }
-          return e;
-        };
-        this.addEventListener('iceconnectionstatechange', this._connectionstatechangepoly);
-      }
-      return origMethod.apply(this, arguments);
-    };
-  });
-}
-function removeExtmapAllowMixed(window, browserDetails) {
-  /* remove a=extmap-allow-mixed for webrtc.org < M71 */
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) {
-    return;
-  }
-  if (browserDetails.browser === 'safari' && browserDetails.version >= 605) {
-    return;
-  }
-  var nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription(desc) {
-    if (desc && desc.sdp && desc.sdp.indexOf('\na=extmap-allow-mixed') !== -1) {
-      var sdp = desc.sdp.split('\n').filter(function (line) {
-        return line.trim() !== 'a=extmap-allow-mixed';
-      }).join('\n');
-      // Safari enforces read-only-ness of RTCSessionDescription fields.
-      if (window.RTCSessionDescription && desc instanceof window.RTCSessionDescription) {
-        arguments[0] = new window.RTCSessionDescription({
-          type: desc.type,
-          sdp: sdp
-        });
-      } else {
-        desc.sdp = sdp;
-      }
-    }
-    return nativeSRD.apply(this, arguments);
-  };
-}
-function shimAddIceCandidateNullOrEmpty(window, browserDetails) {
-  // Support for addIceCandidate(null or undefined)
-  // as well as addIceCandidate({candidate: "", ...})
-  // https://bugs.chromium.org/p/chromium/issues/detail?id=978582
-  // Note: must be called before other polyfills which change the signature.
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate;
-  if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() {
-    if (!arguments[0]) {
-      if (arguments[1]) {
-        arguments[1].apply(null);
-      }
-      return Promise.resolve();
-    }
-    // Firefox 68+ emits and processes {candidate: "", ...}, ignore
-    // in older versions.
-    // Native support for ignoring exists for Chrome M77+.
-    // Safari ignores as well, exact version unknown but works in the same
-    // version that also ignores addIceCandidate(null).
-    if ((browserDetails.browser === 'chrome' && browserDetails.version < 78 || browserDetails.browser === 'firefox' && browserDetails.version < 68 || browserDetails.browser === 'safari') && arguments[0] && arguments[0].candidate === '') {
-      return Promise.resolve();
-    }
-    return nativeAddIceCandidate.apply(this, arguments);
-  };
-}
-
-// Note: Make sure to call this ahead of APIs that modify
-// setLocalDescription.length
-function shimParameterlessSetLocalDescription(window, browserDetails) {
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  var nativeSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;
-  if (!nativeSetLocalDescription || nativeSetLocalDescription.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {
-    var _this = this;
-    var desc = arguments[0] || {};
-    if (_typeof(desc) !== 'object' || desc.type && desc.sdp) {
-      return nativeSetLocalDescription.apply(this, arguments);
-    }
-    // The remaining steps should technically happen when SLD comes off the
-    // RTCPeerConnection's operations chain (not ahead of going on it), but
-    // this is too difficult to shim. Instead, this shim only covers the
-    // common case where the operations chain is empty. This is imperfect, but
-    // should cover many cases. Rationale: Even if we can't reduce the glare
-    // window to zero on imperfect implementations, there's value in tapping
-    // into the perfect negotiation pattern that several browsers support.
-    desc = {
-      type: desc.type,
-      sdp: desc.sdp
-    };
-    if (!desc.type) {
-      switch (this.signalingState) {
-        case 'stable':
-        case 'have-local-offer':
-        case 'have-remote-pranswer':
-          desc.type = 'offer';
-          break;
-        default:
-          desc.type = 'answer';
-          break;
-      }
-    }
-    if (desc.sdp || desc.type !== 'offer' && desc.type !== 'answer') {
-      return nativeSetLocalDescription.apply(this, [desc]);
-    }
-    var func = desc.type === 'offer' ? this.createOffer : this.createAnswer;
-    return func.apply(this).then(function (d) {
-      return nativeSetLocalDescription.apply(_this, [d]);
-    });
-  };
-}
-
-},{"./utils":11,"sdp":12}],7:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimAddTransceiver = shimAddTransceiver;
-exports.shimCreateAnswer = shimCreateAnswer;
-exports.shimCreateOffer = shimCreateOffer;
-Object.defineProperty(exports, "shimGetDisplayMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getdisplaymedia.shimGetDisplayMedia;
-  }
-});
-exports.shimGetParameters = shimGetParameters;
-Object.defineProperty(exports, "shimGetUserMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getusermedia.shimGetUserMedia;
-  }
-});
-exports.shimOnTrack = shimOnTrack;
-exports.shimPeerConnection = shimPeerConnection;
-exports.shimRTCDataChannel = shimRTCDataChannel;
-exports.shimReceiverGetStats = shimReceiverGetStats;
-exports.shimRemoveStream = shimRemoveStream;
-exports.shimSenderGetStats = shimSenderGetStats;
-var utils = _interopRequireWildcard(require("../utils"));
-var _getusermedia = require("./getusermedia");
-var _getdisplaymedia = require("./getdisplaymedia");
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
-function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
-function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
-function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimOnTrack(window) {
-  if (_typeof(window) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get: function get() {
-        return {
-          receiver: this.receiver
-        };
-      }
-    });
-  }
-}
-function shimPeerConnection(window, browserDetails) {
-  if (_typeof(window) !== 'object' || !(window.RTCPeerConnection || window.mozRTCPeerConnection)) {
-    return; // probably media.peerconnection.enabled=false in about:config
-  }
-
-  if (!window.RTCPeerConnection && window.mozRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.mozRTCPeerConnection;
-  }
-  if (browserDetails.version < 53) {
-    // shim away need for obsolete RTCIceCandidate/RTCSessionDescription.
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
-      var nativeMethod = window.RTCPeerConnection.prototype[method];
-      var methodObj = _defineProperty({}, method, function () {
-        arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
-        return nativeMethod.apply(this, arguments);
-      });
-      window.RTCPeerConnection.prototype[method] = methodObj[method];
-    });
-  }
-  var modernStatsTypes = {
-    inboundrtp: 'inbound-rtp',
-    outboundrtp: 'outbound-rtp',
-    candidatepair: 'candidate-pair',
-    localcandidate: 'local-candidate',
-    remotecandidate: 'remote-candidate'
-  };
-  var nativeGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    var _arguments = Array.prototype.slice.call(arguments),
-      selector = _arguments[0],
-      onSucc = _arguments[1],
-      onErr = _arguments[2];
-    return nativeGetStats.apply(this, [selector || null]).then(function (stats) {
-      if (browserDetails.version < 53 && !onSucc) {
-        // Shim only promise getStats with spec-hyphens in type names
-        // Leave callback version alone; misc old uses of forEach before Map
-        try {
-          stats.forEach(function (stat) {
-            stat.type = modernStatsTypes[stat.type] || stat.type;
-          });
-        } catch (e) {
-          if (e.name !== 'TypeError') {
-            throw e;
-          }
-          // Avoid TypeError: "type" is read-only, in old versions. 34-43ish
-          stats.forEach(function (stat, i) {
-            stats.set(i, Object.assign({}, stat, {
-              type: modernStatsTypes[stat.type] || stat.type
-            }));
-          });
-        }
-      }
-      return stats;
-    }).then(onSucc, onErr);
-  };
-}
-function shimSenderGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpSender.prototype) {
-    return;
-  }
-  var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-  if (origGetSenders) {
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      var _this = this;
-      var senders = origGetSenders.apply(this, []);
-      senders.forEach(function (sender) {
-        return sender._pc = _this;
-      });
-      return senders;
-    };
-  }
-  var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  if (origAddTrack) {
-    window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-      var sender = origAddTrack.apply(this, arguments);
-      sender._pc = this;
-      return sender;
-    };
-  }
-  window.RTCRtpSender.prototype.getStats = function getStats() {
-    return this.track ? this._pc.getStats(this.track) : Promise.resolve(new Map());
-  };
-}
-function shimReceiverGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpReceiver.prototype) {
-    return;
-  }
-  var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-  if (origGetReceivers) {
-    window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
-      var _this2 = this;
-      var receivers = origGetReceivers.apply(this, []);
-      receivers.forEach(function (receiver) {
-        return receiver._pc = _this2;
-      });
-      return receivers;
-    };
-  }
-  utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-    e.receiver._pc = e.srcElement;
-    return e;
-  });
-  window.RTCRtpReceiver.prototype.getStats = function getStats() {
-    return this._pc.getStats(this.track);
-  };
-}
-function shimRemoveStream(window) {
-  if (!window.RTCPeerConnection || 'removeStream' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    var _this3 = this;
-    utils.deprecated('removeStream', 'removeTrack');
-    this.getSenders().forEach(function (sender) {
-      if (sender.track && stream.getTracks().includes(sender.track)) {
-        _this3.removeTrack(sender);
-      }
-    });
-  };
-}
-function shimRTCDataChannel(window) {
-  // rename DataChannel to RTCDataChannel (native fix in FF60):
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1173851
-  if (window.DataChannel && !window.RTCDataChannel) {
-    window.RTCDataChannel = window.DataChannel;
-  }
-}
-function shimAddTransceiver(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origAddTransceiver = window.RTCPeerConnection.prototype.addTransceiver;
-  if (origAddTransceiver) {
-    window.RTCPeerConnection.prototype.addTransceiver = function addTransceiver() {
-      this.setParametersPromises = [];
-      // WebIDL input coercion and validation
-      var sendEncodings = arguments[1] && arguments[1].sendEncodings;
-      if (sendEncodings === undefined) {
-        sendEncodings = [];
-      }
-      sendEncodings = _toConsumableArray(sendEncodings);
-      var shouldPerformCheck = sendEncodings.length > 0;
-      if (shouldPerformCheck) {
-        // If sendEncodings params are provided, validate grammar
-        sendEncodings.forEach(function (encodingParam) {
-          if ('rid' in encodingParam) {
-            var ridRegex = /^[a-z0-9]{0,16}$/i;
-            if (!ridRegex.test(encodingParam.rid)) {
-              throw new TypeError('Invalid RID value provided.');
-            }
-          }
-          if ('scaleResolutionDownBy' in encodingParam) {
-            if (!(parseFloat(encodingParam.scaleResolutionDownBy) >= 1.0)) {
-              throw new RangeError('scale_resolution_down_by must be >= 1.0');
-            }
-          }
-          if ('maxFramerate' in encodingParam) {
-            if (!(parseFloat(encodingParam.maxFramerate) >= 0)) {
-              throw new RangeError('max_framerate must be >= 0.0');
-            }
-          }
-        });
-      }
-      var transceiver = origAddTransceiver.apply(this, arguments);
-      if (shouldPerformCheck) {
-        // Check if the init options were applied. If not we do this in an
-        // asynchronous way and save the promise reference in a global object.
-        // This is an ugly hack, but at the same time is way more robust than
-        // checking the sender parameters before and after the createOffer
-        // Also note that after the createoffer we are not 100% sure that
-        // the params were asynchronously applied so we might miss the
-        // opportunity to recreate offer.
-        var sender = transceiver.sender;
-        var params = sender.getParameters();
-        if (!('encodings' in params) ||
-        // Avoid being fooled by patched getParameters() below.
-        params.encodings.length === 1 && Object.keys(params.encodings[0]).length === 0) {
-          params.encodings = sendEncodings;
-          sender.sendEncodings = sendEncodings;
-          this.setParametersPromises.push(sender.setParameters(params).then(function () {
-            delete sender.sendEncodings;
-          })["catch"](function () {
-            delete sender.sendEncodings;
-          }));
-        }
-      }
-      return transceiver;
-    };
-  }
-}
-function shimGetParameters(window) {
-  if (!(_typeof(window) === 'object' && window.RTCRtpSender)) {
-    return;
-  }
-  var origGetParameters = window.RTCRtpSender.prototype.getParameters;
-  if (origGetParameters) {
-    window.RTCRtpSender.prototype.getParameters = function getParameters() {
-      var params = origGetParameters.apply(this, arguments);
-      if (!('encodings' in params)) {
-        params.encodings = [].concat(this.sendEncodings || [{}]);
-      }
-      return params;
-    };
-  }
-}
-function shimCreateOffer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer = function createOffer() {
-    var _arguments2 = arguments,
-      _this4 = this;
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises).then(function () {
-        return origCreateOffer.apply(_this4, _arguments2);
-      })["finally"](function () {
-        _this4.setParametersPromises = [];
-      });
-    }
-    return origCreateOffer.apply(this, arguments);
-  };
-}
-function shimCreateAnswer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origCreateAnswer = window.RTCPeerConnection.prototype.createAnswer;
-  window.RTCPeerConnection.prototype.createAnswer = function createAnswer() {
-    var _arguments3 = arguments,
-      _this5 = this;
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises).then(function () {
-        return origCreateAnswer.apply(_this5, _arguments3);
-      })["finally"](function () {
-        _this5.setParametersPromises = [];
-      });
-    }
-    return origCreateAnswer.apply(this, arguments);
-  };
-}
-
-},{"../utils":11,"./getdisplaymedia":8,"./getusermedia":9}],8:[function(require,module,exports){
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetDisplayMedia = shimGetDisplayMedia;
-function shimGetDisplayMedia(window, preferredMediaSource) {
-  if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!window.navigator.mediaDevices) {
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
-    if (!(constraints && constraints.video)) {
-      var err = new DOMException('getDisplayMedia without video ' + 'constraints is undefined');
-      err.name = 'NotFoundError';
-      // from https://heycam.github.io/webidl/#idl-DOMException-error-names
-      err.code = 8;
-      return Promise.reject(err);
-    }
-    if (constraints.video === true) {
-      constraints.video = {
-        mediaSource: preferredMediaSource
-      };
-    } else {
-      constraints.video.mediaSource = preferredMediaSource;
-    }
-    return window.navigator.mediaDevices.getUserMedia(constraints);
-  };
-}
-
-},{}],9:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetUserMedia = shimGetUserMedia;
-var utils = _interopRequireWildcard(require("../utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimGetUserMedia(window, browserDetails) {
-  var navigator = window && window.navigator;
-  var MediaStreamTrack = window && window.MediaStreamTrack;
-  navigator.getUserMedia = function (constraints, onSuccess, onError) {
-    // Replace Firefox 44+'s deprecation warning with unprefixed version.
-    utils.deprecated('navigator.getUserMedia', 'navigator.mediaDevices.getUserMedia');
-    navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
-  };
-  if (!(browserDetails.version > 55 && 'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) {
-    var remap = function remap(obj, a, b) {
-      if (a in obj && !(b in obj)) {
-        obj[b] = obj[a];
-        delete obj[a];
-      }
-    };
-    var nativeGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (c) {
-      if (_typeof(c) === 'object' && _typeof(c.audio) === 'object') {
-        c = JSON.parse(JSON.stringify(c));
-        remap(c.audio, 'autoGainControl', 'mozAutoGainControl');
-        remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression');
-      }
-      return nativeGetUserMedia(c);
-    };
-    if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) {
-      var nativeGetSettings = MediaStreamTrack.prototype.getSettings;
-      MediaStreamTrack.prototype.getSettings = function () {
-        var obj = nativeGetSettings.apply(this, arguments);
-        remap(obj, 'mozAutoGainControl', 'autoGainControl');
-        remap(obj, 'mozNoiseSuppression', 'noiseSuppression');
-        return obj;
-      };
-    }
-    if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) {
-      var nativeApplyConstraints = MediaStreamTrack.prototype.applyConstraints;
-      MediaStreamTrack.prototype.applyConstraints = function (c) {
-        if (this.kind === 'audio' && _typeof(c) === 'object') {
-          c = JSON.parse(JSON.stringify(c));
-          remap(c, 'autoGainControl', 'mozAutoGainControl');
-          remap(c, 'noiseSuppression', 'mozNoiseSuppression');
-        }
-        return nativeApplyConstraints.apply(this, [c]);
-      };
-    }
-  }
-}
-
-},{"../utils":11}],10:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimAudioContext = shimAudioContext;
-exports.shimCallbacksAPI = shimCallbacksAPI;
-exports.shimConstraints = shimConstraints;
-exports.shimCreateOfferLegacy = shimCreateOfferLegacy;
-exports.shimGetUserMedia = shimGetUserMedia;
-exports.shimLocalStreamsAPI = shimLocalStreamsAPI;
-exports.shimRTCIceServerUrls = shimRTCIceServerUrls;
-exports.shimRemoteStreamsAPI = shimRemoteStreamsAPI;
-exports.shimTrackEventTransceiver = shimTrackEventTransceiver;
-var utils = _interopRequireWildcard(require("../utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimLocalStreamsAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      return this._localStreams;
-    };
-  }
-  if (!('addStream' in window.RTCPeerConnection.prototype)) {
-    var _addTrack = window.RTCPeerConnection.prototype.addTrack;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      var _this = this;
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      if (!this._localStreams.includes(stream)) {
-        this._localStreams.push(stream);
-      }
-      // Try to emulate Chrome's behaviour of adding in audio-video order.
-      // Safari orders by track id.
-      stream.getAudioTracks().forEach(function (track) {
-        return _addTrack.call(_this, track, stream);
-      });
-      stream.getVideoTracks().forEach(function (track) {
-        return _addTrack.call(_this, track, stream);
-      });
-    };
-    window.RTCPeerConnection.prototype.addTrack = function addTrack(track) {
-      var _this2 = this;
-      for (var _len = arguments.length, streams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-        streams[_key - 1] = arguments[_key];
-      }
-      if (streams) {
-        streams.forEach(function (stream) {
-          if (!_this2._localStreams) {
-            _this2._localStreams = [stream];
-          } else if (!_this2._localStreams.includes(stream)) {
-            _this2._localStreams.push(stream);
-          }
-        });
-      }
-      return _addTrack.apply(this, arguments);
-    };
-  }
-  if (!('removeStream' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-      var _this3 = this;
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      var index = this._localStreams.indexOf(stream);
-      if (index === -1) {
-        return;
-      }
-      this._localStreams.splice(index, 1);
-      var tracks = stream.getTracks();
-      this.getSenders().forEach(function (sender) {
-        if (tracks.includes(sender.track)) {
-          _this3.removeTrack(sender);
-        }
-      });
-    };
-  }
-}
-function shimRemoteStreamsAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getRemoteStreams = function getRemoteStreams() {
-      return this._remoteStreams ? this._remoteStreams : [];
-    };
-  }
-  if (!('onaddstream' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', {
-      get: function get() {
-        return this._onaddstream;
-      },
-      set: function set(f) {
-        var _this4 = this;
-        if (this._onaddstream) {
-          this.removeEventListener('addstream', this._onaddstream);
-          this.removeEventListener('track', this._onaddstreampoly);
-        }
-        this.addEventListener('addstream', this._onaddstream = f);
-        this.addEventListener('track', this._onaddstreampoly = function (e) {
-          e.streams.forEach(function (stream) {
-            if (!_this4._remoteStreams) {
-              _this4._remoteStreams = [];
-            }
-            if (_this4._remoteStreams.includes(stream)) {
-              return;
-            }
-            _this4._remoteStreams.push(stream);
-            var event = new Event('addstream');
-            event.stream = stream;
-            _this4.dispatchEvent(event);
-          });
-        });
-      }
-    });
-    var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-      var pc = this;
-      if (!this._onaddstreampoly) {
-        this.addEventListener('track', this._onaddstreampoly = function (e) {
-          e.streams.forEach(function (stream) {
-            if (!pc._remoteStreams) {
-              pc._remoteStreams = [];
-            }
-            if (pc._remoteStreams.indexOf(stream) >= 0) {
-              return;
-            }
-            pc._remoteStreams.push(stream);
-            var event = new Event('addstream');
-            event.stream = stream;
-            pc.dispatchEvent(event);
-          });
-        });
-      }
-      return origSetRemoteDescription.apply(pc, arguments);
-    };
-  }
-}
-function shimCallbacksAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  var prototype = window.RTCPeerConnection.prototype;
-  var origCreateOffer = prototype.createOffer;
-  var origCreateAnswer = prototype.createAnswer;
-  var setLocalDescription = prototype.setLocalDescription;
-  var setRemoteDescription = prototype.setRemoteDescription;
-  var addIceCandidate = prototype.addIceCandidate;
-  prototype.createOffer = function createOffer(successCallback, failureCallback) {
-    var options = arguments.length >= 2 ? arguments[2] : arguments[0];
-    var promise = origCreateOffer.apply(this, [options]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.createAnswer = function createAnswer(successCallback, failureCallback) {
-    var options = arguments.length >= 2 ? arguments[2] : arguments[0];
-    var promise = origCreateAnswer.apply(this, [options]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  var withCallback = function withCallback(description, successCallback, failureCallback) {
-    var promise = setLocalDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setLocalDescription = withCallback;
-  withCallback = function withCallback(description, successCallback, failureCallback) {
-    var promise = setRemoteDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setRemoteDescription = withCallback;
-  withCallback = function withCallback(candidate, successCallback, failureCallback) {
-    var promise = addIceCandidate.apply(this, [candidate]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.addIceCandidate = withCallback;
-}
-function shimGetUserMedia(window) {
-  var navigator = window && window.navigator;
-  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-    // shim not needed in Safari 12.1
-    var mediaDevices = navigator.mediaDevices;
-    var _getUserMedia = mediaDevices.getUserMedia.bind(mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (constraints) {
-      return _getUserMedia(shimConstraints(constraints));
-    };
-  }
-  if (!navigator.getUserMedia && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-    navigator.getUserMedia = function getUserMedia(constraints, cb, errcb) {
-      navigator.mediaDevices.getUserMedia(constraints).then(cb, errcb);
-    }.bind(navigator);
-  }
-}
-function shimConstraints(constraints) {
-  if (constraints && constraints.video !== undefined) {
-    return Object.assign({}, constraints, {
-      video: utils.compactObject(constraints.video)
-    });
-  }
-  return constraints;
-}
-function shimRTCIceServerUrls(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // migrate from non-spec RTCIceServer.url to RTCIceServer.urls
-  var OrigPeerConnection = window.RTCPeerConnection;
-  window.RTCPeerConnection = function RTCPeerConnection(pcConfig, pcConstraints) {
-    if (pcConfig && pcConfig.iceServers) {
-      var newIceServers = [];
-      for (var i = 0; i < pcConfig.iceServers.length; i++) {
-        var server = pcConfig.iceServers[i];
-        if (server.urls === undefined && server.url) {
-          utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');
-          server = JSON.parse(JSON.stringify(server));
-          server.urls = server.url;
-          delete server.url;
-          newIceServers.push(server);
-        } else {
-          newIceServers.push(pcConfig.iceServers[i]);
-        }
-      }
-      pcConfig.iceServers = newIceServers;
-    }
-    return new OrigPeerConnection(pcConfig, pcConstraints);
-  };
-  window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;
-  // wrap static methods. Currently just generateCertificate.
-  if ('generateCertificate' in OrigPeerConnection) {
-    Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
-      get: function get() {
-        return OrigPeerConnection.generateCertificate;
-      }
-    });
-  }
-}
-function shimTrackEventTransceiver(window) {
-  // Add event.transceiver member over deprecated event.receiver
-  if (_typeof(window) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get: function get() {
-        return {
-          receiver: this.receiver
-        };
-      }
-    });
-  }
-}
-function shimCreateOfferLegacy(window) {
-  var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer = function createOffer(offerOptions) {
-    if (offerOptions) {
-      if (typeof offerOptions.offerToReceiveAudio !== 'undefined') {
-        // support bit values
-        offerOptions.offerToReceiveAudio = !!offerOptions.offerToReceiveAudio;
-      }
-      var audioTransceiver = this.getTransceivers().find(function (transceiver) {
-        return transceiver.receiver.track.kind === 'audio';
-      });
-      if (offerOptions.offerToReceiveAudio === false && audioTransceiver) {
-        if (audioTransceiver.direction === 'sendrecv') {
-          if (audioTransceiver.setDirection) {
-            audioTransceiver.setDirection('sendonly');
-          } else {
-            audioTransceiver.direction = 'sendonly';
-          }
-        } else if (audioTransceiver.direction === 'recvonly') {
-          if (audioTransceiver.setDirection) {
-            audioTransceiver.setDirection('inactive');
-          } else {
-            audioTransceiver.direction = 'inactive';
-          }
-        }
-      } else if (offerOptions.offerToReceiveAudio === true && !audioTransceiver) {
-        this.addTransceiver('audio', {
-          direction: 'recvonly'
-        });
-      }
-      if (typeof offerOptions.offerToReceiveVideo !== 'undefined') {
-        // support bit values
-        offerOptions.offerToReceiveVideo = !!offerOptions.offerToReceiveVideo;
-      }
-      var videoTransceiver = this.getTransceivers().find(function (transceiver) {
-        return transceiver.receiver.track.kind === 'video';
-      });
-      if (offerOptions.offerToReceiveVideo === false && videoTransceiver) {
-        if (videoTransceiver.direction === 'sendrecv') {
-          if (videoTransceiver.setDirection) {
-            videoTransceiver.setDirection('sendonly');
-          } else {
-            videoTransceiver.direction = 'sendonly';
-          }
-        } else if (videoTransceiver.direction === 'recvonly') {
-          if (videoTransceiver.setDirection) {
-            videoTransceiver.setDirection('inactive');
-          } else {
-            videoTransceiver.direction = 'inactive';
-          }
-        }
-      } else if (offerOptions.offerToReceiveVideo === true && !videoTransceiver) {
-        this.addTransceiver('video', {
-          direction: 'recvonly'
-        });
-      }
-    }
-    return origCreateOffer.apply(this, arguments);
-  };
-}
-function shimAudioContext(window) {
-  if (_typeof(window) !== 'object' || window.AudioContext) {
-    return;
-  }
-  window.AudioContext = window.webkitAudioContext;
-}
-
-},{"../utils":11}],11:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.compactObject = compactObject;
-exports.deprecated = deprecated;
-exports.detectBrowser = detectBrowser;
-exports.disableLog = disableLog;
-exports.disableWarnings = disableWarnings;
-exports.extractVersion = extractVersion;
-exports.filterStats = filterStats;
-exports.log = log;
-exports.walkStats = walkStats;
-exports.wrapPeerConnectionEvent = wrapPeerConnectionEvent;
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-var logDisabled_ = true;
-var deprecationWarnings_ = true;
-
-/**
- * Extract browser version out of the provided user agent string.
- *
- * @param {!string} uastring userAgent string.
- * @param {!string} expr Regular expression used as match criteria.
- * @param {!number} pos position in the version string to be returned.
- * @return {!number} browser version.
- */
-function extractVersion(uastring, expr, pos) {
-  var match = uastring.match(expr);
-  return match && match.length >= pos && parseInt(match[pos], 10);
-}
-
-// Wraps the peerconnection event eventNameToWrap in a function
-// which returns the modified event object (or false to prevent
-// the event).
-function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  var proto = window.RTCPeerConnection.prototype;
-  var nativeAddEventListener = proto.addEventListener;
-  proto.addEventListener = function (nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap) {
-      return nativeAddEventListener.apply(this, arguments);
-    }
-    var wrappedCallback = function wrappedCallback(e) {
-      var modifiedEvent = wrapper(e);
-      if (modifiedEvent) {
-        if (cb.handleEvent) {
-          cb.handleEvent(modifiedEvent);
-        } else {
-          cb(modifiedEvent);
-        }
-      }
-    };
-    this._eventMap = this._eventMap || {};
-    if (!this._eventMap[eventNameToWrap]) {
-      this._eventMap[eventNameToWrap] = new Map();
-    }
-    this._eventMap[eventNameToWrap].set(cb, wrappedCallback);
-    return nativeAddEventListener.apply(this, [nativeEventName, wrappedCallback]);
-  };
-  var nativeRemoveEventListener = proto.removeEventListener;
-  proto.removeEventListener = function (nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap || !this._eventMap || !this._eventMap[eventNameToWrap]) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    if (!this._eventMap[eventNameToWrap].has(cb)) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    var unwrappedCb = this._eventMap[eventNameToWrap].get(cb);
-    this._eventMap[eventNameToWrap]["delete"](cb);
-    if (this._eventMap[eventNameToWrap].size === 0) {
-      delete this._eventMap[eventNameToWrap];
-    }
-    if (Object.keys(this._eventMap).length === 0) {
-      delete this._eventMap;
-    }
-    return nativeRemoveEventListener.apply(this, [nativeEventName, unwrappedCb]);
-  };
-  Object.defineProperty(proto, 'on' + eventNameToWrap, {
-    get: function get() {
-      return this['_on' + eventNameToWrap];
-    },
-    set: function set(cb) {
-      if (this['_on' + eventNameToWrap]) {
-        this.removeEventListener(eventNameToWrap, this['_on' + eventNameToWrap]);
-        delete this['_on' + eventNameToWrap];
-      }
-      if (cb) {
-        this.addEventListener(eventNameToWrap, this['_on' + eventNameToWrap] = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-}
-function disableLog(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + _typeof(bool) + '. Please use a boolean.');
-  }
-  logDisabled_ = bool;
-  return bool ? 'adapter.js logging disabled' : 'adapter.js logging enabled';
-}
-
-/**
- * Disable or enable deprecation warnings
- * @param {!boolean} bool set to true to disable warnings.
- */
-function disableWarnings(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + _typeof(bool) + '. Please use a boolean.');
-  }
-  deprecationWarnings_ = !bool;
-  return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');
-}
-function log() {
-  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
-    if (logDisabled_) {
-      return;
-    }
-    if (typeof console !== 'undefined' && typeof console.log === 'function') {
-      console.log.apply(console, arguments);
-    }
-  }
-}
-
-/**
- * Shows a deprecation warning suggesting the modern and spec-compatible API.
- */
-function deprecated(oldMethod, newMethod) {
-  if (!deprecationWarnings_) {
-    return;
-  }
-  console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');
-}
-
-/**
- * Browser detector.
- *
- * @return {object} result containing browser and version
- *     properties.
- */
-function detectBrowser(window) {
-  // Returned result object.
-  var result = {
-    browser: null,
-    version: null
-  };
-
-  // Fail early if it's not a browser
-  if (typeof window === 'undefined' || !window.navigator || !window.navigator.userAgent) {
-    result.browser = 'Not a browser.';
-    return result;
-  }
-  var navigator = window.navigator;
-  if (navigator.mozGetUserMedia) {
-    // Firefox.
-    result.browser = 'firefox';
-    result.version = extractVersion(navigator.userAgent, /Firefox\/(\d+)\./, 1);
-  } else if (navigator.webkitGetUserMedia || window.isSecureContext === false && window.webkitRTCPeerConnection) {
-    // Chrome, Chromium, Webview, Opera.
-    // Version matches Chrome/WebRTC version.
-    // Chrome 74 removed webkitGetUserMedia on http as well so we need the
-    // more complicated fallback to webkitRTCPeerConnection.
-    result.browser = 'chrome';
-    result.version = extractVersion(navigator.userAgent, /Chrom(e|ium)\/(\d+)\./, 2);
-  } else if (window.RTCPeerConnection && navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) {
-    // Safari.
-    result.browser = 'safari';
-    result.version = extractVersion(navigator.userAgent, /AppleWebKit\/(\d+)\./, 1);
-    result.supportsUnifiedPlan = window.RTCRtpTransceiver && 'currentDirection' in window.RTCRtpTransceiver.prototype;
-  } else {
-    // Default fallthrough: not supported.
-    result.browser = 'Not a supported browser.';
-    return result;
-  }
-  return result;
-}
-
-/**
- * Checks if something is an object.
- *
- * @param {*} val The something you want to check.
- * @return true if val is an object, false otherwise.
- */
-function isObject(val) {
-  return Object.prototype.toString.call(val) === '[object Object]';
-}
-
-/**
- * Remove all empty objects and undefined values
- * from a nested object -- an enhanced and vanilla version
- * of Lodash's `compact`.
- */
-function compactObject(data) {
-  if (!isObject(data)) {
-    return data;
-  }
-  return Object.keys(data).reduce(function (accumulator, key) {
-    var isObj = isObject(data[key]);
-    var value = isObj ? compactObject(data[key]) : data[key];
-    var isEmptyObject = isObj && !Object.keys(value).length;
-    if (value === undefined || isEmptyObject) {
-      return accumulator;
-    }
-    return Object.assign(accumulator, _defineProperty({}, key, value));
-  }, {});
-}
-
-/* iterates the stats graph recursively. */
-function walkStats(stats, base, resultSet) {
-  if (!base || resultSet.has(base.id)) {
-    return;
-  }
-  resultSet.set(base.id, base);
-  Object.keys(base).forEach(function (name) {
-    if (name.endsWith('Id')) {
-      walkStats(stats, stats.get(base[name]), resultSet);
-    } else if (name.endsWith('Ids')) {
-      base[name].forEach(function (id) {
-        walkStats(stats, stats.get(id), resultSet);
-      });
-    }
-  });
-}
-
-/* filter getStats for a sender/receiver track. */
-function filterStats(result, track, outbound) {
-  var streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp';
-  var filteredResult = new Map();
-  if (track === null) {
-    return filteredResult;
-  }
-  var trackStats = [];
-  result.forEach(function (value) {
-    if (value.type === 'track' && value.trackIdentifier === track.id) {
-      trackStats.push(value);
-    }
-  });
-  trackStats.forEach(function (trackStat) {
-    result.forEach(function (stats) {
-      if (stats.type === streamStatsType && stats.trackId === trackStat.id) {
-        walkStats(result, stats, filteredResult);
-      }
-    });
-  });
-  return filteredResult;
-}
-
-},{}],12:[function(require,module,exports){
-/* eslint-env node */
-'use strict';
-
-// SDP helpers.
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var SDPUtils = {};
-
-// Generate an alphanumeric identifier for cname or mids.
-// TODO: use UUIDs instead? https://gist.github.com/jed/982883
-SDPUtils.generateIdentifier = function () {
-  return Math.random().toString(36).substring(2, 12);
-};
-
-// The RTCP CNAME used by all peerconnections from the same JS.
-SDPUtils.localCName = SDPUtils.generateIdentifier();
-
-// Splits SDP into lines, dealing with both CRLF and LF.
-SDPUtils.splitLines = function (blob) {
-  return blob.trim().split('\n').map(function (line) {
-    return line.trim();
-  });
-};
-// Splits SDP into sessionpart and mediasections. Ensures CRLF.
-SDPUtils.splitSections = function (blob) {
-  var parts = blob.split('\nm=');
-  return parts.map(function (part, index) {
-    return (index > 0 ? 'm=' + part : part).trim() + '\r\n';
-  });
-};
-
-// Returns the session description.
-SDPUtils.getDescription = function (blob) {
-  var sections = SDPUtils.splitSections(blob);
-  return sections && sections[0];
-};
-
-// Returns the individual media sections.
-SDPUtils.getMediaSections = function (blob) {
-  var sections = SDPUtils.splitSections(blob);
-  sections.shift();
-  return sections;
-};
-
-// Returns lines that start with a certain prefix.
-SDPUtils.matchPrefix = function (blob, prefix) {
-  return SDPUtils.splitLines(blob).filter(function (line) {
-    return line.indexOf(prefix) === 0;
-  });
-};
-
-// Parses an ICE candidate line. Sample input:
-// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8
-// rport 55996"
-// Input can be prefixed with a=.
-SDPUtils.parseCandidate = function (line) {
-  var parts = void 0;
-  // Parse both variants.
-  if (line.indexOf('a=candidate:') === 0) {
-    parts = line.substring(12).split(' ');
-  } else {
-    parts = line.substring(10).split(' ');
-  }
-
-  var candidate = {
-    foundation: parts[0],
-    component: { 1: 'rtp', 2: 'rtcp' }[parts[1]] || parts[1],
-    protocol: parts[2].toLowerCase(),
-    priority: parseInt(parts[3], 10),
-    ip: parts[4],
-    address: parts[4], // address is an alias for ip.
-    port: parseInt(parts[5], 10),
-    // skip parts[6] == 'typ'
-    type: parts[7]
-  };
-
-  for (var i = 8; i < parts.length; i += 2) {
-    switch (parts[i]) {
-      case 'raddr':
-        candidate.relatedAddress = parts[i + 1];
-        break;
-      case 'rport':
-        candidate.relatedPort = parseInt(parts[i + 1], 10);
-        break;
-      case 'tcptype':
-        candidate.tcpType = parts[i + 1];
-        break;
-      case 'ufrag':
-        candidate.ufrag = parts[i + 1]; // for backward compatibility.
-        candidate.usernameFragment = parts[i + 1];
-        break;
-      default:
-        // extension handling, in particular ufrag. Don't overwrite.
-        if (candidate[parts[i]] === undefined) {
-          candidate[parts[i]] = parts[i + 1];
-        }
-        break;
-    }
-  }
-  return candidate;
-};
-
-// Translates a candidate object into SDP candidate attribute.
-// This does not include the a= prefix!
-SDPUtils.writeCandidate = function (candidate) {
-  var sdp = [];
-  sdp.push(candidate.foundation);
-
-  var component = candidate.component;
-  if (component === 'rtp') {
-    sdp.push(1);
-  } else if (component === 'rtcp') {
-    sdp.push(2);
-  } else {
-    sdp.push(component);
-  }
-  sdp.push(candidate.protocol.toUpperCase());
-  sdp.push(candidate.priority);
-  sdp.push(candidate.address || candidate.ip);
-  sdp.push(candidate.port);
-
-  var type = candidate.type;
-  sdp.push('typ');
-  sdp.push(type);
-  if (type !== 'host' && candidate.relatedAddress && candidate.relatedPort) {
-    sdp.push('raddr');
-    sdp.push(candidate.relatedAddress);
-    sdp.push('rport');
-    sdp.push(candidate.relatedPort);
-  }
-  if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {
-    sdp.push('tcptype');
-    sdp.push(candidate.tcpType);
-  }
-  if (candidate.usernameFragment || candidate.ufrag) {
-    sdp.push('ufrag');
-    sdp.push(candidate.usernameFragment || candidate.ufrag);
-  }
-  return 'candidate:' + sdp.join(' ');
-};
-
-// Parses an ice-options line, returns an array of option tags.
-// Sample input:
-// a=ice-options:foo bar
-SDPUtils.parseIceOptions = function (line) {
-  return line.substring(14).split(' ');
-};
-
-// Parses a rtpmap line, returns RTCRtpCoddecParameters. Sample input:
-// a=rtpmap:111 opus/48000/2
-SDPUtils.parseRtpMap = function (line) {
-  var parts = line.substring(9).split(' ');
-  var parsed = {
-    payloadType: parseInt(parts.shift(), 10) // was: id
-  };
-
-  parts = parts[0].split('/');
-
-  parsed.name = parts[0];
-  parsed.clockRate = parseInt(parts[1], 10); // was: clockrate
-  parsed.channels = parts.length === 3 ? parseInt(parts[2], 10) : 1;
-  // legacy alias, got renamed back to channels in ORTC.
-  parsed.numChannels = parsed.channels;
-  return parsed;
-};
-
-// Generates a rtpmap line from RTCRtpCodecCapability or
-// RTCRtpCodecParameters.
-SDPUtils.writeRtpMap = function (codec) {
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  var channels = codec.channels || codec.numChannels || 1;
-  return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate + (channels !== 1 ? '/' + channels : '') + '\r\n';
-};
-
-// Parses a extmap line (headerextension from RFC 5285). Sample input:
-// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
-// a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset
-SDPUtils.parseExtmap = function (line) {
-  var parts = line.substring(9).split(' ');
-  return {
-    id: parseInt(parts[0], 10),
-    direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv',
-    uri: parts[1],
-    attributes: parts.slice(2).join(' ')
-  };
-};
-
-// Generates an extmap line from RTCRtpHeaderExtensionParameters or
-// RTCRtpHeaderExtension.
-SDPUtils.writeExtmap = function (headerExtension) {
-  return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) + (headerExtension.direction && headerExtension.direction !== 'sendrecv' ? '/' + headerExtension.direction : '') + ' ' + headerExtension.uri + (headerExtension.attributes ? ' ' + headerExtension.attributes : '') + '\r\n';
-};
-
-// Parses a fmtp line, returns dictionary. Sample input:
-// a=fmtp:96 vbr=on;cng=on
-// Also deals with vbr=on; cng=on
-SDPUtils.parseFmtp = function (line) {
-  var parsed = {};
-  var kv = void 0;
-  var parts = line.substring(line.indexOf(' ') + 1).split(';');
-  for (var j = 0; j < parts.length; j++) {
-    kv = parts[j].trim().split('=');
-    parsed[kv[0].trim()] = kv[1];
-  }
-  return parsed;
-};
-
-// Generates a fmtp line from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeFmtp = function (codec) {
-  var line = '';
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.parameters && Object.keys(codec.parameters).length) {
-    var params = [];
-    Object.keys(codec.parameters).forEach(function (param) {
-      if (codec.parameters[param] !== undefined) {
-        params.push(param + '=' + codec.parameters[param]);
-      } else {
-        params.push(param);
-      }
-    });
-    line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n';
-  }
-  return line;
-};
-
-// Parses a rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:
-// a=rtcp-fb:98 nack rpsi
-SDPUtils.parseRtcpFb = function (line) {
-  var parts = line.substring(line.indexOf(' ') + 1).split(' ');
-  return {
-    type: parts.shift(),
-    parameter: parts.join(' ')
-  };
-};
-
-// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeRtcpFb = function (codec) {
-  var lines = '';
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.rtcpFeedback && codec.rtcpFeedback.length) {
-    // FIXME: special handling for trr-int?
-    codec.rtcpFeedback.forEach(function (fb) {
-      lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') + '\r\n';
-    });
-  }
-  return lines;
-};
-
-// Parses a RFC 5576 ssrc media attribute. Sample input:
-// a=ssrc:3735928559 cname:something
-SDPUtils.parseSsrcMedia = function (line) {
-  var sp = line.indexOf(' ');
-  var parts = {
-    ssrc: parseInt(line.substring(7, sp), 10)
-  };
-  var colon = line.indexOf(':', sp);
-  if (colon > -1) {
-    parts.attribute = line.substring(sp + 1, colon);
-    parts.value = line.substring(colon + 1);
-  } else {
-    parts.attribute = line.substring(sp + 1);
-  }
-  return parts;
-};
-
-// Parse a ssrc-group line (see RFC 5576). Sample input:
-// a=ssrc-group:semantics 12 34
-SDPUtils.parseSsrcGroup = function (line) {
-  var parts = line.substring(13).split(' ');
-  return {
-    semantics: parts.shift(),
-    ssrcs: parts.map(function (ssrc) {
-      return parseInt(ssrc, 10);
-    })
-  };
-};
-
-// Extracts the MID (RFC 5888) from a media section.
-// Returns the MID or undefined if no mid line was found.
-SDPUtils.getMid = function (mediaSection) {
-  var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];
-  if (mid) {
-    return mid.substring(6);
-  }
-};
-
-// Parses a fingerprint line for DTLS-SRTP.
-SDPUtils.parseFingerprint = function (line) {
-  var parts = line.substring(14).split(' ');
-  return {
-    algorithm: parts[0].toLowerCase(), // algorithm is case-sensitive in Edge.
-    value: parts[1].toUpperCase() // the definition is upper-case in RFC 4572.
-  };
-};
-
-// Extracts DTLS parameters from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the fingerprint line as input. See also getIceParameters.
-SDPUtils.getDtlsParameters = function (mediaSection, sessionpart) {
-  var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=fingerprint:');
-  // Note: a=setup line is ignored since we use the 'auto' role in Edge.
-  return {
-    role: 'auto',
-    fingerprints: lines.map(SDPUtils.parseFingerprint)
-  };
-};
-
-// Serializes DTLS parameters to SDP.
-SDPUtils.writeDtlsParameters = function (params, setupType) {
-  var sdp = 'a=setup:' + setupType + '\r\n';
-  params.fingerprints.forEach(function (fp) {
-    sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n';
-  });
-  return sdp;
-};
-
-// Parses a=crypto lines into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#dictionary-rtcsrtpsdesparameters-members
-SDPUtils.parseCryptoLine = function (line) {
-  var parts = line.substring(9).split(' ');
-  return {
-    tag: parseInt(parts[0], 10),
-    cryptoSuite: parts[1],
-    keyParams: parts[2],
-    sessionParams: parts.slice(3)
-  };
-};
-
-SDPUtils.writeCryptoLine = function (parameters) {
-  return 'a=crypto:' + parameters.tag + ' ' + parameters.cryptoSuite + ' ' + (_typeof(parameters.keyParams) === 'object' ? SDPUtils.writeCryptoKeyParams(parameters.keyParams) : parameters.keyParams) + (parameters.sessionParams ? ' ' + parameters.sessionParams.join(' ') : '') + '\r\n';
-};
-
-// Parses the crypto key parameters into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#rtcsrtpkeyparam*
-SDPUtils.parseCryptoKeyParams = function (keyParams) {
-  if (keyParams.indexOf('inline:') !== 0) {
-    return null;
-  }
-  var parts = keyParams.substring(7).split('|');
-  return {
-    keyMethod: 'inline',
-    keySalt: parts[0],
-    lifeTime: parts[1],
-    mkiValue: parts[2] ? parts[2].split(':')[0] : undefined,
-    mkiLength: parts[2] ? parts[2].split(':')[1] : undefined
-  };
-};
-
-SDPUtils.writeCryptoKeyParams = function (keyParams) {
-  return keyParams.keyMethod + ':' + keyParams.keySalt + (keyParams.lifeTime ? '|' + keyParams.lifeTime : '') + (keyParams.mkiValue && keyParams.mkiLength ? '|' + keyParams.mkiValue + ':' + keyParams.mkiLength : '');
-};
-
-// Extracts all SDES parameters.
-SDPUtils.getCryptoParameters = function (mediaSection, sessionpart) {
-  var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=crypto:');
-  return lines.map(SDPUtils.parseCryptoLine);
-};
-
-// Parses ICE information from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the ice-ufrag and ice-pwd lines as input.
-SDPUtils.getIceParameters = function (mediaSection, sessionpart) {
-  var ufrag = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-ufrag:')[0];
-  var pwd = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-pwd:')[0];
-  if (!(ufrag && pwd)) {
-    return null;
-  }
-  return {
-    usernameFragment: ufrag.substring(12),
-    password: pwd.substring(10)
-  };
-};
-
-// Serializes ICE parameters to SDP.
-SDPUtils.writeIceParameters = function (params) {
-  var sdp = 'a=ice-ufrag:' + params.usernameFragment + '\r\n' + 'a=ice-pwd:' + params.password + '\r\n';
-  if (params.iceLite) {
-    sdp += 'a=ice-lite\r\n';
-  }
-  return sdp;
-};
-
-// Parses the SDP media section and returns RTCRtpParameters.
-SDPUtils.parseRtpParameters = function (mediaSection) {
-  var description = {
-    codecs: [],
-    headerExtensions: [],
-    fecMechanisms: [],
-    rtcp: []
-  };
-  var lines = SDPUtils.splitLines(mediaSection);
-  var mline = lines[0].split(' ');
-  description.profile = mline[2];
-  for (var i = 3; i < mline.length; i++) {
-    // find all codecs from mline[3..]
-    var pt = mline[i];
-    var rtpmapline = SDPUtils.matchPrefix(mediaSection, 'a=rtpmap:' + pt + ' ')[0];
-    if (rtpmapline) {
-      var codec = SDPUtils.parseRtpMap(rtpmapline);
-      var fmtps = SDPUtils.matchPrefix(mediaSection, 'a=fmtp:' + pt + ' ');
-      // Only the first a=fmtp:<pt> is considered.
-      codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};
-      codec.rtcpFeedback = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:' + pt + ' ').map(SDPUtils.parseRtcpFb);
-      description.codecs.push(codec);
-      // parse FEC mechanisms from rtpmap lines.
-      switch (codec.name.toUpperCase()) {
-        case 'RED':
-        case 'ULPFEC':
-          description.fecMechanisms.push(codec.name.toUpperCase());
-          break;
-        default:
-          // only RED and ULPFEC are recognized as FEC mechanisms.
-          break;
-      }
-    }
-  }
-  SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function (line) {
-    description.headerExtensions.push(SDPUtils.parseExtmap(line));
-  });
-  var wildcardRtcpFb = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:* ').map(SDPUtils.parseRtcpFb);
-  description.codecs.forEach(function (codec) {
-    wildcardRtcpFb.forEach(function (fb) {
-      var duplicate = codec.rtcpFeedback.find(function (existingFeedback) {
-        return existingFeedback.type === fb.type && existingFeedback.parameter === fb.parameter;
-      });
-      if (!duplicate) {
-        codec.rtcpFeedback.push(fb);
-      }
-    });
-  });
-  // FIXME: parse rtcp.
-  return description;
-};
-
-// Generates parts of the SDP media section describing the capabilities /
-// parameters.
-SDPUtils.writeRtpDescription = function (kind, caps) {
-  var sdp = '';
-
-  // Build the mline.
-  sdp += 'm=' + kind + ' ';
-  sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.
-  sdp += ' ' + (caps.profile || 'UDP/TLS/RTP/SAVPF') + ' ';
-  sdp += caps.codecs.map(function (codec) {
-    if (codec.preferredPayloadType !== undefined) {
-      return codec.preferredPayloadType;
-    }
-    return codec.payloadType;
-  }).join(' ') + '\r\n';
-
-  sdp += 'c=IN IP4 0.0.0.0\r\n';
-  sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n';
-
-  // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.
-  caps.codecs.forEach(function (codec) {
-    sdp += SDPUtils.writeRtpMap(codec);
-    sdp += SDPUtils.writeFmtp(codec);
-    sdp += SDPUtils.writeRtcpFb(codec);
-  });
-  var maxptime = 0;
-  caps.codecs.forEach(function (codec) {
-    if (codec.maxptime > maxptime) {
-      maxptime = codec.maxptime;
-    }
-  });
-  if (maxptime > 0) {
-    sdp += 'a=maxptime:' + maxptime + '\r\n';
-  }
-
-  if (caps.headerExtensions) {
-    caps.headerExtensions.forEach(function (extension) {
-      sdp += SDPUtils.writeExtmap(extension);
-    });
-  }
-  // FIXME: write fecMechanisms.
-  return sdp;
-};
-
-// Parses the SDP media section and returns an array of
-// RTCRtpEncodingParameters.
-SDPUtils.parseRtpEncodingParameters = function (mediaSection) {
-  var encodingParameters = [];
-  var description = SDPUtils.parseRtpParameters(mediaSection);
-  var hasRed = description.fecMechanisms.indexOf('RED') !== -1;
-  var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1;
-
-  // filter a=ssrc:... cname:, ignore PlanB-msid
-  var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (parts) {
-    return parts.attribute === 'cname';
-  });
-  var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc;
-  var secondarySsrc = void 0;
-
-  var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID').map(function (line) {
-    var parts = line.substring(17).split(' ');
-    return parts.map(function (part) {
-      return parseInt(part, 10);
-    });
-  });
-  if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) {
-    secondarySsrc = flows[0][1];
-  }
-
-  description.codecs.forEach(function (codec) {
-    if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) {
-      var encParam = {
-        ssrc: primarySsrc,
-        codecPayloadType: parseInt(codec.parameters.apt, 10)
-      };
-      if (primarySsrc && secondarySsrc) {
-        encParam.rtx = { ssrc: secondarySsrc };
-      }
-      encodingParameters.push(encParam);
-      if (hasRed) {
-        encParam = JSON.parse(JSON.stringify(encParam));
-        encParam.fec = {
-          ssrc: primarySsrc,
-          mechanism: hasUlpfec ? 'red+ulpfec' : 'red'
-        };
-        encodingParameters.push(encParam);
-      }
-    }
-  });
-  if (encodingParameters.length === 0 && primarySsrc) {
-    encodingParameters.push({
-      ssrc: primarySsrc
-    });
-  }
-
-  // we support both b=AS and b=TIAS but interpret AS as TIAS.
-  var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b=');
-  if (bandwidth.length) {
-    if (bandwidth[0].indexOf('b=TIAS:') === 0) {
-      bandwidth = parseInt(bandwidth[0].substring(7), 10);
-    } else if (bandwidth[0].indexOf('b=AS:') === 0) {
-      // use formula from JSEP to convert b=AS to TIAS value.
-      bandwidth = parseInt(bandwidth[0].substring(5), 10) * 1000 * 0.95 - 50 * 40 * 8;
-    } else {
-      bandwidth = undefined;
-    }
-    encodingParameters.forEach(function (params) {
-      params.maxBitrate = bandwidth;
-    });
-  }
-  return encodingParameters;
-};
-
-// parses http://draft.ortc.org/#rtcrtcpparameters*
-SDPUtils.parseRtcpParameters = function (mediaSection) {
-  var rtcpParameters = {};
-
-  // Gets the first SSRC. Note that with RTX there might be multiple
-  // SSRCs.
-  var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (obj) {
-    return obj.attribute === 'cname';
-  })[0];
-  if (remoteSsrc) {
-    rtcpParameters.cname = remoteSsrc.value;
-    rtcpParameters.ssrc = remoteSsrc.ssrc;
-  }
-
-  // Edge uses the compound attribute instead of reducedSize
-  // compound is !reducedSize
-  var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize');
-  rtcpParameters.reducedSize = rsize.length > 0;
-  rtcpParameters.compound = rsize.length === 0;
-
-  // parses the rtcp-mux attrіbute.
-  // Note that Edge does not support unmuxed RTCP.
-  var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux');
-  rtcpParameters.mux = mux.length > 0;
-
-  return rtcpParameters;
-};
-
-SDPUtils.writeRtcpParameters = function (rtcpParameters) {
-  var sdp = '';
-  if (rtcpParameters.reducedSize) {
-    sdp += 'a=rtcp-rsize\r\n';
-  }
-  if (rtcpParameters.mux) {
-    sdp += 'a=rtcp-mux\r\n';
-  }
-  if (rtcpParameters.ssrc !== undefined && rtcpParameters.cname) {
-    sdp += 'a=ssrc:' + rtcpParameters.ssrc + ' cname:' + rtcpParameters.cname + '\r\n';
-  }
-  return sdp;
-};
-
-// parses either a=msid: or a=ssrc:... msid lines and returns
-// the id of the MediaStream and MediaStreamTrack.
-SDPUtils.parseMsid = function (mediaSection) {
-  var parts = void 0;
-  var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:');
-  if (spec.length === 1) {
-    parts = spec[0].substring(7).split(' ');
-    return { stream: parts[0], track: parts[1] };
-  }
-  var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (msidParts) {
-    return msidParts.attribute === 'msid';
-  });
-  if (planB.length > 0) {
-    parts = planB[0].value.split(' ');
-    return { stream: parts[0], track: parts[1] };
-  }
-};
-
-// SCTP
-// parses draft-ietf-mmusic-sctp-sdp-26 first and falls back
-// to draft-ietf-mmusic-sctp-sdp-05
-SDPUtils.parseSctpDescription = function (mediaSection) {
-  var mline = SDPUtils.parseMLine(mediaSection);
-  var maxSizeLine = SDPUtils.matchPrefix(mediaSection, 'a=max-message-size:');
-  var maxMessageSize = void 0;
-  if (maxSizeLine.length > 0) {
-    maxMessageSize = parseInt(maxSizeLine[0].substring(19), 10);
-  }
-  if (isNaN(maxMessageSize)) {
-    maxMessageSize = 65536;
-  }
-  var sctpPort = SDPUtils.matchPrefix(mediaSection, 'a=sctp-port:');
-  if (sctpPort.length > 0) {
-    return {
-      port: parseInt(sctpPort[0].substring(12), 10),
-      protocol: mline.fmt,
-      maxMessageSize: maxMessageSize
-    };
-  }
-  var sctpMapLines = SDPUtils.matchPrefix(mediaSection, 'a=sctpmap:');
-  if (sctpMapLines.length > 0) {
-    var parts = sctpMapLines[0].substring(10).split(' ');
-    return {
-      port: parseInt(parts[0], 10),
-      protocol: parts[1],
-      maxMessageSize: maxMessageSize
-    };
-  }
-};
-
-// SCTP
-// outputs the draft-ietf-mmusic-sctp-sdp-26 version that all browsers
-// support by now receiving in this format, unless we originally parsed
-// as the draft-ietf-mmusic-sctp-sdp-05 format (indicated by the m-line
-// protocol of DTLS/SCTP -- without UDP/ or TCP/)
-SDPUtils.writeSctpDescription = function (media, sctp) {
-  var output = [];
-  if (media.protocol !== 'DTLS/SCTP') {
-    output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.protocol + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctp-port:' + sctp.port + '\r\n'];
-  } else {
-    output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.port + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctpmap:' + sctp.port + ' ' + sctp.protocol + ' 65535\r\n'];
-  }
-  if (sctp.maxMessageSize !== undefined) {
-    output.push('a=max-message-size:' + sctp.maxMessageSize + '\r\n');
-  }
-  return output.join('');
-};
-
-// Generate a session ID for SDP.
-// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1
-// recommends using a cryptographically random +ve 64-bit value
-// but right now this should be acceptable and within the right range
-SDPUtils.generateSessionId = function () {
-  return Math.random().toString().substr(2, 22);
-};
-
-// Write boiler plate for start of SDP
-// sessId argument is optional - if not supplied it will
-// be generated randomly
-// sessVersion is optional and defaults to 2
-// sessUser is optional and defaults to 'thisisadapterortc'
-SDPUtils.writeSessionBoilerplate = function (sessId, sessVer, sessUser) {
-  var sessionId = void 0;
-  var version = sessVer !== undefined ? sessVer : 2;
-  if (sessId) {
-    sessionId = sessId;
-  } else {
-    sessionId = SDPUtils.generateSessionId();
-  }
-  var user = sessUser || 'thisisadapterortc';
-  // FIXME: sess-id should be an NTP timestamp.
-  return 'v=0\r\n' + 'o=' + user + ' ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\r\n' + 's=-\r\n' + 't=0 0\r\n';
-};
-
-// Gets the direction from the mediaSection or the sessionpart.
-SDPUtils.getDirection = function (mediaSection, sessionpart) {
-  // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.
-  var lines = SDPUtils.splitLines(mediaSection);
-  for (var i = 0; i < lines.length; i++) {
-    switch (lines[i]) {
-      case 'a=sendrecv':
-      case 'a=sendonly':
-      case 'a=recvonly':
-      case 'a=inactive':
-        return lines[i].substring(2);
-      default:
-      // FIXME: What should happen here?
-    }
-  }
-  if (sessionpart) {
-    return SDPUtils.getDirection(sessionpart);
-  }
-  return 'sendrecv';
-};
-
-SDPUtils.getKind = function (mediaSection) {
-  var lines = SDPUtils.splitLines(mediaSection);
-  var mline = lines[0].split(' ');
-  return mline[0].substring(2);
-};
-
-SDPUtils.isRejected = function (mediaSection) {
-  return mediaSection.split(' ', 2)[1] === '0';
-};
-
-SDPUtils.parseMLine = function (mediaSection) {
-  var lines = SDPUtils.splitLines(mediaSection);
-  var parts = lines[0].substring(2).split(' ');
-  return {
-    kind: parts[0],
-    port: parseInt(parts[1], 10),
-    protocol: parts[2],
-    fmt: parts.slice(3).join(' ')
-  };
-};
-
-SDPUtils.parseOLine = function (mediaSection) {
-  var line = SDPUtils.matchPrefix(mediaSection, 'o=')[0];
-  var parts = line.substring(2).split(' ');
-  return {
-    username: parts[0],
-    sessionId: parts[1],
-    sessionVersion: parseInt(parts[2], 10),
-    netType: parts[3],
-    addressType: parts[4],
-    address: parts[5]
-  };
-};
-
-// a very naive interpretation of a valid SDP.
-SDPUtils.isValidSDP = function (blob) {
-  if (typeof blob !== 'string' || blob.length === 0) {
-    return false;
-  }
-  var lines = SDPUtils.splitLines(blob);
-  for (var i = 0; i < lines.length; i++) {
-    if (lines[i].length < 2 || lines[i].charAt(1) !== '=') {
-      return false;
-    }
-    // TODO: check the modifier a bit more.
-  }
-  return true;
-};
-
-// Expose public methods.
-if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object') {
-  module.exports = SDPUtils;
-}
-},{}]},{},[1])(1)
-});

+ 0 - 3363
node_modules/webrtc-adapter/out/adapter_no_global.js

@@ -1,3363 +0,0 @@
-(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-
-'use strict';
-
-var _adapter_factory = require("./adapter_factory.js");
-var adapter = (0, _adapter_factory.adapterFactory)({
-  window: typeof window === 'undefined' ? undefined : window
-});
-module.exports = adapter; // this is the difference from adapter_core.
-
-},{"./adapter_factory.js":2}],2:[function(require,module,exports){
-"use strict";
-
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.adapterFactory = adapterFactory;
-var utils = _interopRequireWildcard(require("./utils"));
-var chromeShim = _interopRequireWildcard(require("./chrome/chrome_shim"));
-var firefoxShim = _interopRequireWildcard(require("./firefox/firefox_shim"));
-var safariShim = _interopRequireWildcard(require("./safari/safari_shim"));
-var commonShim = _interopRequireWildcard(require("./common_shim"));
-var sdp = _interopRequireWildcard(require("sdp"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-
-// Browser shims.
-
-// Shimming starts here.
-function adapterFactory() {
-  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
-    window = _ref.window;
-  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
-    shimChrome: true,
-    shimFirefox: true,
-    shimSafari: true
-  };
-  // Utils.
-  var logging = utils.log;
-  var browserDetails = utils.detectBrowser(window);
-  var adapter = {
-    browserDetails: browserDetails,
-    commonShim: commonShim,
-    extractVersion: utils.extractVersion,
-    disableLog: utils.disableLog,
-    disableWarnings: utils.disableWarnings,
-    // Expose sdp as a convenience. For production apps include directly.
-    sdp: sdp
-  };
-
-  // Shim browser if found.
-  switch (browserDetails.browser) {
-    case 'chrome':
-      if (!chromeShim || !chromeShim.shimPeerConnection || !options.shimChrome) {
-        logging('Chrome shim is not included in this adapter release.');
-        return adapter;
-      }
-      if (browserDetails.version === null) {
-        logging('Chrome shim can not determine version, not shimming.');
-        return adapter;
-      }
-      logging('adapter.js shimming chrome.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = chromeShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      chromeShim.shimGetUserMedia(window, browserDetails);
-      chromeShim.shimMediaStream(window, browserDetails);
-      chromeShim.shimPeerConnection(window, browserDetails);
-      chromeShim.shimOnTrack(window, browserDetails);
-      chromeShim.shimAddTrackRemoveTrack(window, browserDetails);
-      chromeShim.shimGetSendersWithDtmf(window, browserDetails);
-      chromeShim.shimGetStats(window, browserDetails);
-      chromeShim.shimSenderReceiverGetStats(window, browserDetails);
-      chromeShim.fixNegotiationNeeded(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    case 'firefox':
-      if (!firefoxShim || !firefoxShim.shimPeerConnection || !options.shimFirefox) {
-        logging('Firefox shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming firefox.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = firefoxShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      firefoxShim.shimGetUserMedia(window, browserDetails);
-      firefoxShim.shimPeerConnection(window, browserDetails);
-      firefoxShim.shimOnTrack(window, browserDetails);
-      firefoxShim.shimRemoveStream(window, browserDetails);
-      firefoxShim.shimSenderGetStats(window, browserDetails);
-      firefoxShim.shimReceiverGetStats(window, browserDetails);
-      firefoxShim.shimRTCDataChannel(window, browserDetails);
-      firefoxShim.shimAddTransceiver(window, browserDetails);
-      firefoxShim.shimGetParameters(window, browserDetails);
-      firefoxShim.shimCreateOffer(window, browserDetails);
-      firefoxShim.shimCreateAnswer(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      break;
-    case 'safari':
-      if (!safariShim || !options.shimSafari) {
-        logging('Safari shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming safari.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = safariShim;
-
-      // Must be called before shimCallbackAPI.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-      safariShim.shimRTCIceServerUrls(window, browserDetails);
-      safariShim.shimCreateOfferLegacy(window, browserDetails);
-      safariShim.shimCallbacksAPI(window, browserDetails);
-      safariShim.shimLocalStreamsAPI(window, browserDetails);
-      safariShim.shimRemoteStreamsAPI(window, browserDetails);
-      safariShim.shimTrackEventTransceiver(window, browserDetails);
-      safariShim.shimGetUserMedia(window, browserDetails);
-      safariShim.shimAudioContext(window, browserDetails);
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    default:
-      logging('Unsupported browser!');
-      break;
-  }
-  return adapter;
-}
-
-},{"./chrome/chrome_shim":3,"./common_shim":6,"./firefox/firefox_shim":7,"./safari/safari_shim":10,"./utils":11,"sdp":12}],3:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.fixNegotiationNeeded = fixNegotiationNeeded;
-exports.shimAddTrackRemoveTrack = shimAddTrackRemoveTrack;
-exports.shimAddTrackRemoveTrackWithNative = shimAddTrackRemoveTrackWithNative;
-Object.defineProperty(exports, "shimGetDisplayMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getdisplaymedia.shimGetDisplayMedia;
-  }
-});
-exports.shimGetSendersWithDtmf = shimGetSendersWithDtmf;
-exports.shimGetStats = shimGetStats;
-Object.defineProperty(exports, "shimGetUserMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getusermedia.shimGetUserMedia;
-  }
-});
-exports.shimMediaStream = shimMediaStream;
-exports.shimOnTrack = shimOnTrack;
-exports.shimPeerConnection = shimPeerConnection;
-exports.shimSenderReceiverGetStats = shimSenderReceiverGetStats;
-var utils = _interopRequireWildcard(require("../utils.js"));
-var _getusermedia = require("./getusermedia");
-var _getdisplaymedia = require("./getdisplaymedia");
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimMediaStream(window) {
-  window.MediaStream = window.MediaStream || window.webkitMediaStream;
-}
-function shimOnTrack(window) {
-  if (_typeof(window) === 'object' && window.RTCPeerConnection && !('ontrack' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
-      get: function get() {
-        return this._ontrack;
-      },
-      set: function set(f) {
-        if (this._ontrack) {
-          this.removeEventListener('track', this._ontrack);
-        }
-        this.addEventListener('track', this._ontrack = f);
-      },
-      enumerable: true,
-      configurable: true
-    });
-    var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-      var _this = this;
-      if (!this._ontrackpoly) {
-        this._ontrackpoly = function (e) {
-          // onaddstream does not fire when a track is added to an existing
-          // stream. But stream.onaddtrack is implemented so we use that.
-          e.stream.addEventListener('addtrack', function (te) {
-            var receiver;
-            if (window.RTCPeerConnection.prototype.getReceivers) {
-              receiver = _this.getReceivers().find(function (r) {
-                return r.track && r.track.id === te.track.id;
-              });
-            } else {
-              receiver = {
-                track: te.track
-              };
-            }
-            var event = new Event('track');
-            event.track = te.track;
-            event.receiver = receiver;
-            event.transceiver = {
-              receiver: receiver
-            };
-            event.streams = [e.stream];
-            _this.dispatchEvent(event);
-          });
-          e.stream.getTracks().forEach(function (track) {
-            var receiver;
-            if (window.RTCPeerConnection.prototype.getReceivers) {
-              receiver = _this.getReceivers().find(function (r) {
-                return r.track && r.track.id === track.id;
-              });
-            } else {
-              receiver = {
-                track: track
-              };
-            }
-            var event = new Event('track');
-            event.track = track;
-            event.receiver = receiver;
-            event.transceiver = {
-              receiver: receiver
-            };
-            event.streams = [e.stream];
-            _this.dispatchEvent(event);
-          });
-        };
-        this.addEventListener('addstream', this._ontrackpoly);
-      }
-      return origSetRemoteDescription.apply(this, arguments);
-    };
-  } else {
-    // even if RTCRtpTransceiver is in window, it is only used and
-    // emitted in unified-plan. Unfortunately this means we need
-    // to unconditionally wrap the event.
-    utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-      if (!e.transceiver) {
-        Object.defineProperty(e, 'transceiver', {
-          value: {
-            receiver: e.receiver
-          }
-        });
-      }
-      return e;
-    });
-  }
-}
-function shimGetSendersWithDtmf(window) {
-  // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.
-  if (_typeof(window) === 'object' && window.RTCPeerConnection && !('getSenders' in window.RTCPeerConnection.prototype) && 'createDTMFSender' in window.RTCPeerConnection.prototype) {
-    var shimSenderWithDtmf = function shimSenderWithDtmf(pc, track) {
-      return {
-        track: track,
-        get dtmf() {
-          if (this._dtmf === undefined) {
-            if (track.kind === 'audio') {
-              this._dtmf = pc.createDTMFSender(track);
-            } else {
-              this._dtmf = null;
-            }
-          }
-          return this._dtmf;
-        },
-        _pc: pc
-      };
-    };
-
-    // augment addTrack when getSenders is not available.
-    if (!window.RTCPeerConnection.prototype.getSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        this._senders = this._senders || [];
-        return this._senders.slice(); // return a copy of the internal state.
-      };
-
-      var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-      window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-        var sender = origAddTrack.apply(this, arguments);
-        if (!sender) {
-          sender = shimSenderWithDtmf(this, track);
-          this._senders.push(sender);
-        }
-        return sender;
-      };
-      var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-      window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-        origRemoveTrack.apply(this, arguments);
-        var idx = this._senders.indexOf(sender);
-        if (idx !== -1) {
-          this._senders.splice(idx, 1);
-        }
-      };
-    }
-    var origAddStream = window.RTCPeerConnection.prototype.addStream;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      var _this2 = this;
-      this._senders = this._senders || [];
-      origAddStream.apply(this, [stream]);
-      stream.getTracks().forEach(function (track) {
-        _this2._senders.push(shimSenderWithDtmf(_this2, track));
-      });
-    };
-    var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-    window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-      var _this3 = this;
-      this._senders = this._senders || [];
-      origRemoveStream.apply(this, [stream]);
-      stream.getTracks().forEach(function (track) {
-        var sender = _this3._senders.find(function (s) {
-          return s.track === track;
-        });
-        if (sender) {
-          // remove sender
-          _this3._senders.splice(_this3._senders.indexOf(sender), 1);
-        }
-      });
-    };
-  } else if (_typeof(window) === 'object' && window.RTCPeerConnection && 'getSenders' in window.RTCPeerConnection.prototype && 'createDTMFSender' in window.RTCPeerConnection.prototype && window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {
-    var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      var _this4 = this;
-      var senders = origGetSenders.apply(this, []);
-      senders.forEach(function (sender) {
-        return sender._pc = _this4;
-      });
-      return senders;
-    };
-    Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {
-      get: function get() {
-        if (this._dtmf === undefined) {
-          if (this.track.kind === 'audio') {
-            this._dtmf = this._pc.createDTMFSender(this.track);
-          } else {
-            this._dtmf = null;
-          }
-        }
-        return this._dtmf;
-      }
-    });
-  }
-}
-function shimGetStats(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  var origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    var _this5 = this;
-    var _arguments = Array.prototype.slice.call(arguments),
-      selector = _arguments[0],
-      onSucc = _arguments[1],
-      onErr = _arguments[2];
-
-    // If selector is a function then we are in the old style stats so just
-    // pass back the original getStats format to avoid breaking old users.
-    if (arguments.length > 0 && typeof selector === 'function') {
-      return origGetStats.apply(this, arguments);
-    }
-
-    // When spec-style getStats is supported, return those when called with
-    // either no arguments or the selector argument is null.
-    if (origGetStats.length === 0 && (arguments.length === 0 || typeof selector !== 'function')) {
-      return origGetStats.apply(this, []);
-    }
-    var fixChromeStats_ = function fixChromeStats_(response) {
-      var standardReport = {};
-      var reports = response.result();
-      reports.forEach(function (report) {
-        var standardStats = {
-          id: report.id,
-          timestamp: report.timestamp,
-          type: {
-            localcandidate: 'local-candidate',
-            remotecandidate: 'remote-candidate'
-          }[report.type] || report.type
-        };
-        report.names().forEach(function (name) {
-          standardStats[name] = report.stat(name);
-        });
-        standardReport[standardStats.id] = standardStats;
-      });
-      return standardReport;
-    };
-
-    // shim getStats with maplike support
-    var makeMapStats = function makeMapStats(stats) {
-      return new Map(Object.keys(stats).map(function (key) {
-        return [key, stats[key]];
-      }));
-    };
-    if (arguments.length >= 2) {
-      var successCallbackWrapper_ = function successCallbackWrapper_(response) {
-        onSucc(makeMapStats(fixChromeStats_(response)));
-      };
-      return origGetStats.apply(this, [successCallbackWrapper_, selector]);
-    }
-
-    // promise-support
-    return new Promise(function (resolve, reject) {
-      origGetStats.apply(_this5, [function (response) {
-        resolve(makeMapStats(fixChromeStats_(response)));
-      }, reject]);
-    }).then(onSucc, onErr);
-  };
-}
-function shimSenderReceiverGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender && window.RTCRtpReceiver)) {
-    return;
-  }
-
-  // shim sender stats.
-  if (!('getStats' in window.RTCRtpSender.prototype)) {
-    var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    if (origGetSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        var _this6 = this;
-        var senders = origGetSenders.apply(this, []);
-        senders.forEach(function (sender) {
-          return sender._pc = _this6;
-        });
-        return senders;
-      };
-    }
-    var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-    if (origAddTrack) {
-      window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-        var sender = origAddTrack.apply(this, arguments);
-        sender._pc = this;
-        return sender;
-      };
-    }
-    window.RTCRtpSender.prototype.getStats = function getStats() {
-      var sender = this;
-      return this._pc.getStats().then(function (result) {
-        return (
-          /* Note: this will include stats of all senders that
-           *   send a track with the same id as sender.track as
-           *   it is not possible to identify the RTCRtpSender.
-           */
-          utils.filterStats(result, sender.track, true)
-        );
-      });
-    };
-  }
-
-  // shim receiver stats.
-  if (!('getStats' in window.RTCRtpReceiver.prototype)) {
-    var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-    if (origGetReceivers) {
-      window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
-        var _this7 = this;
-        var receivers = origGetReceivers.apply(this, []);
-        receivers.forEach(function (receiver) {
-          return receiver._pc = _this7;
-        });
-        return receivers;
-      };
-    }
-    utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-      e.receiver._pc = e.srcElement;
-      return e;
-    });
-    window.RTCRtpReceiver.prototype.getStats = function getStats() {
-      var receiver = this;
-      return this._pc.getStats().then(function (result) {
-        return utils.filterStats(result, receiver.track, false);
-      });
-    };
-  }
-  if (!('getStats' in window.RTCRtpSender.prototype && 'getStats' in window.RTCRtpReceiver.prototype)) {
-    return;
-  }
-
-  // shim RTCPeerConnection.getStats(track).
-  var origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    if (arguments.length > 0 && arguments[0] instanceof window.MediaStreamTrack) {
-      var track = arguments[0];
-      var sender;
-      var receiver;
-      var err;
-      this.getSenders().forEach(function (s) {
-        if (s.track === track) {
-          if (sender) {
-            err = true;
-          } else {
-            sender = s;
-          }
-        }
-      });
-      this.getReceivers().forEach(function (r) {
-        if (r.track === track) {
-          if (receiver) {
-            err = true;
-          } else {
-            receiver = r;
-          }
-        }
-        return r.track === track;
-      });
-      if (err || sender && receiver) {
-        return Promise.reject(new DOMException('There are more than one sender or receiver for the track.', 'InvalidAccessError'));
-      } else if (sender) {
-        return sender.getStats();
-      } else if (receiver) {
-        return receiver.getStats();
-      }
-      return Promise.reject(new DOMException('There is no sender or receiver for the track.', 'InvalidAccessError'));
-    }
-    return origGetStats.apply(this, arguments);
-  };
-}
-function shimAddTrackRemoveTrackWithNative(window) {
-  // shim addTrack/removeTrack with native variants in order to make
-  // the interactions with legacy getLocalStreams behave as in other browsers.
-  // Keeps a mapping stream.id => [stream, rtpsenders...]
-  window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-    var _this8 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    return Object.keys(this._shimmedLocalStreams).map(function (streamId) {
-      return _this8._shimmedLocalStreams[streamId][0];
-    });
-  };
-  var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-    if (!stream) {
-      return origAddTrack.apply(this, arguments);
-    }
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    var sender = origAddTrack.apply(this, arguments);
-    if (!this._shimmedLocalStreams[stream.id]) {
-      this._shimmedLocalStreams[stream.id] = [stream, sender];
-    } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) {
-      this._shimmedLocalStreams[stream.id].push(sender);
-    }
-    return sender;
-  };
-  var origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    var _this9 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    stream.getTracks().forEach(function (track) {
-      var alreadyExists = _this9.getSenders().find(function (s) {
-        return s.track === track;
-      });
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.', 'InvalidAccessError');
-      }
-    });
-    var existingSenders = this.getSenders();
-    origAddStream.apply(this, arguments);
-    var newSenders = this.getSenders().filter(function (newSender) {
-      return existingSenders.indexOf(newSender) === -1;
-    });
-    this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders);
-  };
-  var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    delete this._shimmedLocalStreams[stream.id];
-    return origRemoveStream.apply(this, arguments);
-  };
-  var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-  window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-    var _this10 = this;
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-    if (sender) {
-      Object.keys(this._shimmedLocalStreams).forEach(function (streamId) {
-        var idx = _this10._shimmedLocalStreams[streamId].indexOf(sender);
-        if (idx !== -1) {
-          _this10._shimmedLocalStreams[streamId].splice(idx, 1);
-        }
-        if (_this10._shimmedLocalStreams[streamId].length === 1) {
-          delete _this10._shimmedLocalStreams[streamId];
-        }
-      });
-    }
-    return origRemoveTrack.apply(this, arguments);
-  };
-}
-function shimAddTrackRemoveTrack(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // shim addTrack and removeTrack.
-  if (window.RTCPeerConnection.prototype.addTrack && browserDetails.version >= 65) {
-    return shimAddTrackRemoveTrackWithNative(window);
-  }
-
-  // also shim pc.getLocalStreams when addTrack is shimmed
-  // to return the original streams.
-  var origGetLocalStreams = window.RTCPeerConnection.prototype.getLocalStreams;
-  window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-    var _this11 = this;
-    var nativeStreams = origGetLocalStreams.apply(this);
-    this._reverseStreams = this._reverseStreams || {};
-    return nativeStreams.map(function (stream) {
-      return _this11._reverseStreams[stream.id];
-    });
-  };
-  var origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    var _this12 = this;
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    stream.getTracks().forEach(function (track) {
-      var alreadyExists = _this12.getSenders().find(function (s) {
-        return s.track === track;
-      });
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.', 'InvalidAccessError');
-      }
-    });
-    // Add identity mapping for consistency with addTrack.
-    // Unless this is being used with a stream from addTrack.
-    if (!this._reverseStreams[stream.id]) {
-      var newStream = new window.MediaStream(stream.getTracks());
-      this._streams[stream.id] = newStream;
-      this._reverseStreams[newStream.id] = stream;
-      stream = newStream;
-    }
-    origAddStream.apply(this, [stream]);
-  };
-  var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    origRemoveStream.apply(this, [this._streams[stream.id] || stream]);
-    delete this._reverseStreams[this._streams[stream.id] ? this._streams[stream.id].id : stream.id];
-    delete this._streams[stream.id];
-  };
-  window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
-    var _this13 = this;
-    if (this.signalingState === 'closed') {
-      throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
-    }
-    var streams = [].slice.call(arguments, 1);
-    if (streams.length !== 1 || !streams[0].getTracks().find(function (t) {
-      return t === track;
-    })) {
-      // this is not fully correct but all we can manage without
-      // [[associated MediaStreams]] internal slot.
-      throw new DOMException('The adapter.js addTrack polyfill only supports a single ' + ' stream which is associated with the specified track.', 'NotSupportedError');
-    }
-    var alreadyExists = this.getSenders().find(function (s) {
-      return s.track === track;
-    });
-    if (alreadyExists) {
-      throw new DOMException('Track already exists.', 'InvalidAccessError');
-    }
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-    var oldStream = this._streams[stream.id];
-    if (oldStream) {
-      // this is using odd Chrome behaviour, use with caution:
-      // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815
-      // Note: we rely on the high-level addTrack/dtmf shim to
-      // create the sender with a dtmf sender.
-      oldStream.addTrack(track);
-
-      // Trigger ONN async.
-      Promise.resolve().then(function () {
-        _this13.dispatchEvent(new Event('negotiationneeded'));
-      });
-    } else {
-      var newStream = new window.MediaStream([track]);
-      this._streams[stream.id] = newStream;
-      this._reverseStreams[newStream.id] = stream;
-      this.addStream(newStream);
-    }
-    return this.getSenders().find(function (s) {
-      return s.track === track;
-    });
-  };
-
-  // replace the internal stream id with the external one and
-  // vice versa.
-  function replaceInternalStreamId(pc, description) {
-    var sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
-      var externalStream = pc._reverseStreams[internalId];
-      var internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(internalStream.id, 'g'), externalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp: sdp
-    });
-  }
-  function replaceExternalStreamId(pc, description) {
-    var sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
-      var externalStream = pc._reverseStreams[internalId];
-      var internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(externalStream.id, 'g'), internalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp: sdp
-    });
-  }
-  ['createOffer', 'createAnswer'].forEach(function (method) {
-    var nativeMethod = window.RTCPeerConnection.prototype[method];
-    var methodObj = _defineProperty({}, method, function () {
-      var _this14 = this;
-      var args = arguments;
-      var isLegacyCall = arguments.length && typeof arguments[0] === 'function';
-      if (isLegacyCall) {
-        return nativeMethod.apply(this, [function (description) {
-          var desc = replaceInternalStreamId(_this14, description);
-          args[0].apply(null, [desc]);
-        }, function (err) {
-          if (args[1]) {
-            args[1].apply(null, err);
-          }
-        }, arguments[2]]);
-      }
-      return nativeMethod.apply(this, arguments).then(function (description) {
-        return replaceInternalStreamId(_this14, description);
-      });
-    });
-    window.RTCPeerConnection.prototype[method] = methodObj[method];
-  });
-  var origSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;
-  window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {
-    if (!arguments.length || !arguments[0].type) {
-      return origSetLocalDescription.apply(this, arguments);
-    }
-    arguments[0] = replaceExternalStreamId(this, arguments[0]);
-    return origSetLocalDescription.apply(this, arguments);
-  };
-
-  // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier
-
-  var origLocalDescription = Object.getOwnPropertyDescriptor(window.RTCPeerConnection.prototype, 'localDescription');
-  Object.defineProperty(window.RTCPeerConnection.prototype, 'localDescription', {
-    get: function get() {
-      var description = origLocalDescription.get.apply(this);
-      if (description.type === '') {
-        return description;
-      }
-      return replaceInternalStreamId(this, description);
-    }
-  });
-  window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
-    var _this15 = this;
-    if (this.signalingState === 'closed') {
-      throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
-    }
-    // We can not yet check for sender instanceof RTCRtpSender
-    // since we shim RTPSender. So we check if sender._pc is set.
-    if (!sender._pc) {
-      throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' + 'does not implement interface RTCRtpSender.', 'TypeError');
-    }
-    var isLocal = sender._pc === this;
-    if (!isLocal) {
-      throw new DOMException('Sender was not created by this connection.', 'InvalidAccessError');
-    }
-
-    // Search for the native stream the senders track belongs to.
-    this._streams = this._streams || {};
-    var stream;
-    Object.keys(this._streams).forEach(function (streamid) {
-      var hasTrack = _this15._streams[streamid].getTracks().find(function (track) {
-        return sender.track === track;
-      });
-      if (hasTrack) {
-        stream = _this15._streams[streamid];
-      }
-    });
-    if (stream) {
-      if (stream.getTracks().length === 1) {
-        // if this is the last track of the stream, remove the stream. This
-        // takes care of any shimmed _senders.
-        this.removeStream(this._reverseStreams[stream.id]);
-      } else {
-        // relying on the same odd chrome behaviour as above.
-        stream.removeTrack(sender.track);
-      }
-      this.dispatchEvent(new Event('negotiationneeded'));
-    }
-  };
-}
-function shimPeerConnection(window, browserDetails) {
-  if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.webkitRTCPeerConnection;
-  }
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-
-  // shim implicit creation of RTCSessionDescription/RTCIceCandidate
-  if (browserDetails.version < 53) {
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
-      var nativeMethod = window.RTCPeerConnection.prototype[method];
-      var methodObj = _defineProperty({}, method, function () {
-        arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
-        return nativeMethod.apply(this, arguments);
-      });
-      window.RTCPeerConnection.prototype[method] = methodObj[method];
-    });
-  }
-}
-
-// Attempt to fix ONN in plan-b mode.
-function fixNegotiationNeeded(window, browserDetails) {
-  utils.wrapPeerConnectionEvent(window, 'negotiationneeded', function (e) {
-    var pc = e.target;
-    if (browserDetails.version < 72 || pc.getConfiguration && pc.getConfiguration().sdpSemantics === 'plan-b') {
-      if (pc.signalingState !== 'stable') {
-        return;
-      }
-    }
-    return e;
-  });
-}
-
-},{"../utils.js":11,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(require,module,exports){
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetDisplayMedia = shimGetDisplayMedia;
-function shimGetDisplayMedia(window, getSourceId) {
-  if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!window.navigator.mediaDevices) {
-    return;
-  }
-  // getSourceId is a function that returns a promise resolving with
-  // the sourceId of the screen/window/tab to be shared.
-  if (typeof getSourceId !== 'function') {
-    console.error('shimGetDisplayMedia: getSourceId argument is not ' + 'a function');
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
-    return getSourceId(constraints).then(function (sourceId) {
-      var widthSpecified = constraints.video && constraints.video.width;
-      var heightSpecified = constraints.video && constraints.video.height;
-      var frameRateSpecified = constraints.video && constraints.video.frameRate;
-      constraints.video = {
-        mandatory: {
-          chromeMediaSource: 'desktop',
-          chromeMediaSourceId: sourceId,
-          maxFrameRate: frameRateSpecified || 3
-        }
-      };
-      if (widthSpecified) {
-        constraints.video.mandatory.maxWidth = widthSpecified;
-      }
-      if (heightSpecified) {
-        constraints.video.mandatory.maxHeight = heightSpecified;
-      }
-      return window.navigator.mediaDevices.getUserMedia(constraints);
-    });
-  };
-}
-
-},{}],5:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetUserMedia = shimGetUserMedia;
-var utils = _interopRequireWildcard(require("../utils.js"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-var logging = utils.log;
-function shimGetUserMedia(window, browserDetails) {
-  var navigator = window && window.navigator;
-  if (!navigator.mediaDevices) {
-    return;
-  }
-  var constraintsToChrome_ = function constraintsToChrome_(c) {
-    if (_typeof(c) !== 'object' || c.mandatory || c.optional) {
-      return c;
-    }
-    var cc = {};
-    Object.keys(c).forEach(function (key) {
-      if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
-        return;
-      }
-      var r = _typeof(c[key]) === 'object' ? c[key] : {
-        ideal: c[key]
-      };
-      if (r.exact !== undefined && typeof r.exact === 'number') {
-        r.min = r.max = r.exact;
-      }
-      var oldname_ = function oldname_(prefix, name) {
-        if (prefix) {
-          return prefix + name.charAt(0).toUpperCase() + name.slice(1);
-        }
-        return name === 'deviceId' ? 'sourceId' : name;
-      };
-      if (r.ideal !== undefined) {
-        cc.optional = cc.optional || [];
-        var oc = {};
-        if (typeof r.ideal === 'number') {
-          oc[oldname_('min', key)] = r.ideal;
-          cc.optional.push(oc);
-          oc = {};
-          oc[oldname_('max', key)] = r.ideal;
-          cc.optional.push(oc);
-        } else {
-          oc[oldname_('', key)] = r.ideal;
-          cc.optional.push(oc);
-        }
-      }
-      if (r.exact !== undefined && typeof r.exact !== 'number') {
-        cc.mandatory = cc.mandatory || {};
-        cc.mandatory[oldname_('', key)] = r.exact;
-      } else {
-        ['min', 'max'].forEach(function (mix) {
-          if (r[mix] !== undefined) {
-            cc.mandatory = cc.mandatory || {};
-            cc.mandatory[oldname_(mix, key)] = r[mix];
-          }
-        });
-      }
-    });
-    if (c.advanced) {
-      cc.optional = (cc.optional || []).concat(c.advanced);
-    }
-    return cc;
-  };
-  var shimConstraints_ = function shimConstraints_(constraints, func) {
-    if (browserDetails.version >= 61) {
-      return func(constraints);
-    }
-    constraints = JSON.parse(JSON.stringify(constraints));
-    if (constraints && _typeof(constraints.audio) === 'object') {
-      var remap = function remap(obj, a, b) {
-        if (a in obj && !(b in obj)) {
-          obj[b] = obj[a];
-          delete obj[a];
-        }
-      };
-      constraints = JSON.parse(JSON.stringify(constraints));
-      remap(constraints.audio, 'autoGainControl', 'googAutoGainControl');
-      remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression');
-      constraints.audio = constraintsToChrome_(constraints.audio);
-    }
-    if (constraints && _typeof(constraints.video) === 'object') {
-      // Shim facingMode for mobile & surface pro.
-      var face = constraints.video.facingMode;
-      face = face && (_typeof(face) === 'object' ? face : {
-        ideal: face
-      });
-      var getSupportedFacingModeLies = browserDetails.version < 66;
-      if (face && (face.exact === 'user' || face.exact === 'environment' || face.ideal === 'user' || face.ideal === 'environment') && !(navigator.mediaDevices.getSupportedConstraints && navigator.mediaDevices.getSupportedConstraints().facingMode && !getSupportedFacingModeLies)) {
-        delete constraints.video.facingMode;
-        var matches;
-        if (face.exact === 'environment' || face.ideal === 'environment') {
-          matches = ['back', 'rear'];
-        } else if (face.exact === 'user' || face.ideal === 'user') {
-          matches = ['front'];
-        }
-        if (matches) {
-          // Look for matches in label, or use last cam for back (typical).
-          return navigator.mediaDevices.enumerateDevices().then(function (devices) {
-            devices = devices.filter(function (d) {
-              return d.kind === 'videoinput';
-            });
-            var dev = devices.find(function (d) {
-              return matches.some(function (match) {
-                return d.label.toLowerCase().includes(match);
-              });
-            });
-            if (!dev && devices.length && matches.includes('back')) {
-              dev = devices[devices.length - 1]; // more likely the back cam
-            }
-
-            if (dev) {
-              constraints.video.deviceId = face.exact ? {
-                exact: dev.deviceId
-              } : {
-                ideal: dev.deviceId
-              };
-            }
-            constraints.video = constraintsToChrome_(constraints.video);
-            logging('chrome: ' + JSON.stringify(constraints));
-            return func(constraints);
-          });
-        }
-      }
-      constraints.video = constraintsToChrome_(constraints.video);
-    }
-    logging('chrome: ' + JSON.stringify(constraints));
-    return func(constraints);
-  };
-  var shimError_ = function shimError_(e) {
-    if (browserDetails.version >= 64) {
-      return e;
-    }
-    return {
-      name: {
-        PermissionDeniedError: 'NotAllowedError',
-        PermissionDismissedError: 'NotAllowedError',
-        InvalidStateError: 'NotAllowedError',
-        DevicesNotFoundError: 'NotFoundError',
-        ConstraintNotSatisfiedError: 'OverconstrainedError',
-        TrackStartError: 'NotReadableError',
-        MediaDeviceFailedDueToShutdown: 'NotAllowedError',
-        MediaDeviceKillSwitchOn: 'NotAllowedError',
-        TabCaptureError: 'AbortError',
-        ScreenCaptureError: 'AbortError',
-        DeviceCaptureError: 'AbortError'
-      }[e.name] || e.name,
-      message: e.message,
-      constraint: e.constraint || e.constraintName,
-      toString: function toString() {
-        return this.name + (this.message && ': ') + this.message;
-      }
-    };
-  };
-  var getUserMedia_ = function getUserMedia_(constraints, onSuccess, onError) {
-    shimConstraints_(constraints, function (c) {
-      navigator.webkitGetUserMedia(c, onSuccess, function (e) {
-        if (onError) {
-          onError(shimError_(e));
-        }
-      });
-    });
-  };
-  navigator.getUserMedia = getUserMedia_.bind(navigator);
-
-  // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia
-  // function which returns a Promise, it does not accept spec-style
-  // constraints.
-  if (navigator.mediaDevices.getUserMedia) {
-    var origGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (cs) {
-      return shimConstraints_(cs, function (c) {
-        return origGetUserMedia(c).then(function (stream) {
-          if (c.audio && !stream.getAudioTracks().length || c.video && !stream.getVideoTracks().length) {
-            stream.getTracks().forEach(function (track) {
-              track.stop();
-            });
-            throw new DOMException('', 'NotFoundError');
-          }
-          return stream;
-        }, function (e) {
-          return Promise.reject(shimError_(e));
-        });
-      });
-    };
-  }
-}
-
-},{"../utils.js":11}],6:[function(require,module,exports){
-/*
- *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.removeExtmapAllowMixed = removeExtmapAllowMixed;
-exports.shimAddIceCandidateNullOrEmpty = shimAddIceCandidateNullOrEmpty;
-exports.shimConnectionState = shimConnectionState;
-exports.shimMaxMessageSize = shimMaxMessageSize;
-exports.shimParameterlessSetLocalDescription = shimParameterlessSetLocalDescription;
-exports.shimRTCIceCandidate = shimRTCIceCandidate;
-exports.shimRTCIceCandidateRelayProtocol = shimRTCIceCandidateRelayProtocol;
-exports.shimSendThrowTypeError = shimSendThrowTypeError;
-var _sdp = _interopRequireDefault(require("sdp"));
-var utils = _interopRequireWildcard(require("./utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimRTCIceCandidate(window) {
-  // foundation is arbitrarily chosen as an indicator for full support for
-  // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
-  if (!window.RTCIceCandidate || window.RTCIceCandidate && 'foundation' in window.RTCIceCandidate.prototype) {
-    return;
-  }
-  var NativeRTCIceCandidate = window.RTCIceCandidate;
-  window.RTCIceCandidate = function RTCIceCandidate(args) {
-    // Remove the a= which shouldn't be part of the candidate string.
-    if (_typeof(args) === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) {
-      args = JSON.parse(JSON.stringify(args));
-      args.candidate = args.candidate.substring(2);
-    }
-    if (args.candidate && args.candidate.length) {
-      // Augment the native candidate with the parsed fields.
-      var nativeCandidate = new NativeRTCIceCandidate(args);
-      var parsedCandidate = _sdp["default"].parseCandidate(args.candidate);
-      for (var key in parsedCandidate) {
-        if (!(key in nativeCandidate)) {
-          Object.defineProperty(nativeCandidate, key, {
-            value: parsedCandidate[key]
-          });
-        }
-      }
-
-      // Override serializer to not serialize the extra attributes.
-      nativeCandidate.toJSON = function toJSON() {
-        return {
-          candidate: nativeCandidate.candidate,
-          sdpMid: nativeCandidate.sdpMid,
-          sdpMLineIndex: nativeCandidate.sdpMLineIndex,
-          usernameFragment: nativeCandidate.usernameFragment
-        };
-      };
-      return nativeCandidate;
-    }
-    return new NativeRTCIceCandidate(args);
-  };
-  window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) {
-    if (e.candidate) {
-      Object.defineProperty(e, 'candidate', {
-        value: new window.RTCIceCandidate(e.candidate),
-        writable: 'false'
-      });
-    }
-    return e;
-  });
-}
-function shimRTCIceCandidateRelayProtocol(window) {
-  if (!window.RTCIceCandidate || window.RTCIceCandidate && 'relayProtocol' in window.RTCIceCandidate.prototype) {
-    return;
-  }
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) {
-    if (e.candidate) {
-      var parsedCandidate = _sdp["default"].parseCandidate(e.candidate.candidate);
-      if (parsedCandidate.type === 'relay') {
-        // This is a libwebrtc-specific mapping of local type preference
-        // to relayProtocol.
-        e.candidate.relayProtocol = {
-          0: 'tls',
-          1: 'tcp',
-          2: 'udp'
-        }[parsedCandidate.priority >> 24];
-      }
-    }
-    return e;
-  });
-}
-function shimMaxMessageSize(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  if (!('sctp' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {
-      get: function get() {
-        return typeof this._sctp === 'undefined' ? null : this._sctp;
-      }
-    });
-  }
-  var sctpInDescription = function sctpInDescription(description) {
-    if (!description || !description.sdp) {
-      return false;
-    }
-    var sections = _sdp["default"].splitSections(description.sdp);
-    sections.shift();
-    return sections.some(function (mediaSection) {
-      var mLine = _sdp["default"].parseMLine(mediaSection);
-      return mLine && mLine.kind === 'application' && mLine.protocol.indexOf('SCTP') !== -1;
-    });
-  };
-  var getRemoteFirefoxVersion = function getRemoteFirefoxVersion(description) {
-    // TODO: Is there a better solution for detecting Firefox?
-    var match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);
-    if (match === null || match.length < 2) {
-      return -1;
-    }
-    var version = parseInt(match[1], 10);
-    // Test for NaN (yes, this is ugly)
-    return version !== version ? -1 : version;
-  };
-  var getCanSendMaxMessageSize = function getCanSendMaxMessageSize(remoteIsFirefox) {
-    // Every implementation we know can send at least 64 KiB.
-    // Note: Although Chrome is technically able to send up to 256 KiB, the
-    //       data does not reach the other peer reliably.
-    //       See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419
-    var canSendMaxMessageSize = 65536;
-    if (browserDetails.browser === 'firefox') {
-      if (browserDetails.version < 57) {
-        if (remoteIsFirefox === -1) {
-          // FF < 57 will send in 16 KiB chunks using the deprecated PPID
-          // fragmentation.
-          canSendMaxMessageSize = 16384;
-        } else {
-          // However, other FF (and RAWRTC) can reassemble PPID-fragmented
-          // messages. Thus, supporting ~2 GiB when sending.
-          canSendMaxMessageSize = 2147483637;
-        }
-      } else if (browserDetails.version < 60) {
-        // Currently, all FF >= 57 will reset the remote maximum message size
-        // to the default value when a data channel is created at a later
-        // stage. :(
-        // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-        canSendMaxMessageSize = browserDetails.version === 57 ? 65535 : 65536;
-      } else {
-        // FF >= 60 supports sending ~2 GiB
-        canSendMaxMessageSize = 2147483637;
-      }
-    }
-    return canSendMaxMessageSize;
-  };
-  var getMaxMessageSize = function getMaxMessageSize(description, remoteIsFirefox) {
-    // Note: 65536 bytes is the default value from the SDP spec. Also,
-    //       every implementation we know supports receiving 65536 bytes.
-    var maxMessageSize = 65536;
-
-    // FF 57 has a slightly incorrect default remote max message size, so
-    // we need to adjust it here to avoid a failure when sending.
-    // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697
-    if (browserDetails.browser === 'firefox' && browserDetails.version === 57) {
-      maxMessageSize = 65535;
-    }
-    var match = _sdp["default"].matchPrefix(description.sdp, 'a=max-message-size:');
-    if (match.length > 0) {
-      maxMessageSize = parseInt(match[0].substring(19), 10);
-    } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) {
-      // If the maximum message size is not present in the remote SDP and
-      // both local and remote are Firefox, the remote peer can receive
-      // ~2 GiB.
-      maxMessageSize = 2147483637;
-    }
-    return maxMessageSize;
-  };
-  var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-    this._sctp = null;
-    // Chrome decided to not expose .sctp in plan-b mode.
-    // As usual, adapter.js has to do an 'ugly worakaround'
-    // to cover up the mess.
-    if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) {
-      var _this$getConfiguratio = this.getConfiguration(),
-        sdpSemantics = _this$getConfiguratio.sdpSemantics;
-      if (sdpSemantics === 'plan-b') {
-        Object.defineProperty(this, 'sctp', {
-          get: function get() {
-            return typeof this._sctp === 'undefined' ? null : this._sctp;
-          },
-          enumerable: true,
-          configurable: true
-        });
-      }
-    }
-    if (sctpInDescription(arguments[0])) {
-      // Check if the remote is FF.
-      var isFirefox = getRemoteFirefoxVersion(arguments[0]);
-
-      // Get the maximum message size the local peer is capable of sending
-      var canSendMMS = getCanSendMaxMessageSize(isFirefox);
-
-      // Get the maximum message size of the remote peer.
-      var remoteMMS = getMaxMessageSize(arguments[0], isFirefox);
-
-      // Determine final maximum message size
-      var maxMessageSize;
-      if (canSendMMS === 0 && remoteMMS === 0) {
-        maxMessageSize = Number.POSITIVE_INFINITY;
-      } else if (canSendMMS === 0 || remoteMMS === 0) {
-        maxMessageSize = Math.max(canSendMMS, remoteMMS);
-      } else {
-        maxMessageSize = Math.min(canSendMMS, remoteMMS);
-      }
-
-      // Create a dummy RTCSctpTransport object and the 'maxMessageSize'
-      // attribute.
-      var sctp = {};
-      Object.defineProperty(sctp, 'maxMessageSize', {
-        get: function get() {
-          return maxMessageSize;
-        }
-      });
-      this._sctp = sctp;
-    }
-    return origSetRemoteDescription.apply(this, arguments);
-  };
-}
-function shimSendThrowTypeError(window) {
-  if (!(window.RTCPeerConnection && 'createDataChannel' in window.RTCPeerConnection.prototype)) {
-    return;
-  }
-
-  // Note: Although Firefox >= 57 has a native implementation, the maximum
-  //       message size can be reset for all data channels at a later stage.
-  //       See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-
-  function wrapDcSend(dc, pc) {
-    var origDataChannelSend = dc.send;
-    dc.send = function send() {
-      var data = arguments[0];
-      var length = data.length || data.size || data.byteLength;
-      if (dc.readyState === 'open' && pc.sctp && length > pc.sctp.maxMessageSize) {
-        throw new TypeError('Message too large (can send a maximum of ' + pc.sctp.maxMessageSize + ' bytes)');
-      }
-      return origDataChannelSend.apply(dc, arguments);
-    };
-  }
-  var origCreateDataChannel = window.RTCPeerConnection.prototype.createDataChannel;
-  window.RTCPeerConnection.prototype.createDataChannel = function createDataChannel() {
-    var dataChannel = origCreateDataChannel.apply(this, arguments);
-    wrapDcSend(dataChannel, this);
-    return dataChannel;
-  };
-  utils.wrapPeerConnectionEvent(window, 'datachannel', function (e) {
-    wrapDcSend(e.channel, e.target);
-    return e;
-  });
-}
-
-/* shims RTCConnectionState by pretending it is the same as iceConnectionState.
- * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12
- * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect
- * since DTLS failures would be hidden. See
- * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827
- * for the Firefox tracking bug.
- */
-function shimConnectionState(window) {
-  if (!window.RTCPeerConnection || 'connectionState' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  var proto = window.RTCPeerConnection.prototype;
-  Object.defineProperty(proto, 'connectionState', {
-    get: function get() {
-      return {
-        completed: 'connected',
-        checking: 'connecting'
-      }[this.iceConnectionState] || this.iceConnectionState;
-    },
-    enumerable: true,
-    configurable: true
-  });
-  Object.defineProperty(proto, 'onconnectionstatechange', {
-    get: function get() {
-      return this._onconnectionstatechange || null;
-    },
-    set: function set(cb) {
-      if (this._onconnectionstatechange) {
-        this.removeEventListener('connectionstatechange', this._onconnectionstatechange);
-        delete this._onconnectionstatechange;
-      }
-      if (cb) {
-        this.addEventListener('connectionstatechange', this._onconnectionstatechange = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-  ['setLocalDescription', 'setRemoteDescription'].forEach(function (method) {
-    var origMethod = proto[method];
-    proto[method] = function () {
-      if (!this._connectionstatechangepoly) {
-        this._connectionstatechangepoly = function (e) {
-          var pc = e.target;
-          if (pc._lastConnectionState !== pc.connectionState) {
-            pc._lastConnectionState = pc.connectionState;
-            var newEvent = new Event('connectionstatechange', e);
-            pc.dispatchEvent(newEvent);
-          }
-          return e;
-        };
-        this.addEventListener('iceconnectionstatechange', this._connectionstatechangepoly);
-      }
-      return origMethod.apply(this, arguments);
-    };
-  });
-}
-function removeExtmapAllowMixed(window, browserDetails) {
-  /* remove a=extmap-allow-mixed for webrtc.org < M71 */
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) {
-    return;
-  }
-  if (browserDetails.browser === 'safari' && browserDetails.version >= 605) {
-    return;
-  }
-  var nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription(desc) {
-    if (desc && desc.sdp && desc.sdp.indexOf('\na=extmap-allow-mixed') !== -1) {
-      var sdp = desc.sdp.split('\n').filter(function (line) {
-        return line.trim() !== 'a=extmap-allow-mixed';
-      }).join('\n');
-      // Safari enforces read-only-ness of RTCSessionDescription fields.
-      if (window.RTCSessionDescription && desc instanceof window.RTCSessionDescription) {
-        arguments[0] = new window.RTCSessionDescription({
-          type: desc.type,
-          sdp: sdp
-        });
-      } else {
-        desc.sdp = sdp;
-      }
-    }
-    return nativeSRD.apply(this, arguments);
-  };
-}
-function shimAddIceCandidateNullOrEmpty(window, browserDetails) {
-  // Support for addIceCandidate(null or undefined)
-  // as well as addIceCandidate({candidate: "", ...})
-  // https://bugs.chromium.org/p/chromium/issues/detail?id=978582
-  // Note: must be called before other polyfills which change the signature.
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate;
-  if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() {
-    if (!arguments[0]) {
-      if (arguments[1]) {
-        arguments[1].apply(null);
-      }
-      return Promise.resolve();
-    }
-    // Firefox 68+ emits and processes {candidate: "", ...}, ignore
-    // in older versions.
-    // Native support for ignoring exists for Chrome M77+.
-    // Safari ignores as well, exact version unknown but works in the same
-    // version that also ignores addIceCandidate(null).
-    if ((browserDetails.browser === 'chrome' && browserDetails.version < 78 || browserDetails.browser === 'firefox' && browserDetails.version < 68 || browserDetails.browser === 'safari') && arguments[0] && arguments[0].candidate === '') {
-      return Promise.resolve();
-    }
-    return nativeAddIceCandidate.apply(this, arguments);
-  };
-}
-
-// Note: Make sure to call this ahead of APIs that modify
-// setLocalDescription.length
-function shimParameterlessSetLocalDescription(window, browserDetails) {
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  var nativeSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;
-  if (!nativeSetLocalDescription || nativeSetLocalDescription.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {
-    var _this = this;
-    var desc = arguments[0] || {};
-    if (_typeof(desc) !== 'object' || desc.type && desc.sdp) {
-      return nativeSetLocalDescription.apply(this, arguments);
-    }
-    // The remaining steps should technically happen when SLD comes off the
-    // RTCPeerConnection's operations chain (not ahead of going on it), but
-    // this is too difficult to shim. Instead, this shim only covers the
-    // common case where the operations chain is empty. This is imperfect, but
-    // should cover many cases. Rationale: Even if we can't reduce the glare
-    // window to zero on imperfect implementations, there's value in tapping
-    // into the perfect negotiation pattern that several browsers support.
-    desc = {
-      type: desc.type,
-      sdp: desc.sdp
-    };
-    if (!desc.type) {
-      switch (this.signalingState) {
-        case 'stable':
-        case 'have-local-offer':
-        case 'have-remote-pranswer':
-          desc.type = 'offer';
-          break;
-        default:
-          desc.type = 'answer';
-          break;
-      }
-    }
-    if (desc.sdp || desc.type !== 'offer' && desc.type !== 'answer') {
-      return nativeSetLocalDescription.apply(this, [desc]);
-    }
-    var func = desc.type === 'offer' ? this.createOffer : this.createAnswer;
-    return func.apply(this).then(function (d) {
-      return nativeSetLocalDescription.apply(_this, [d]);
-    });
-  };
-}
-
-},{"./utils":11,"sdp":12}],7:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimAddTransceiver = shimAddTransceiver;
-exports.shimCreateAnswer = shimCreateAnswer;
-exports.shimCreateOffer = shimCreateOffer;
-Object.defineProperty(exports, "shimGetDisplayMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getdisplaymedia.shimGetDisplayMedia;
-  }
-});
-exports.shimGetParameters = shimGetParameters;
-Object.defineProperty(exports, "shimGetUserMedia", {
-  enumerable: true,
-  get: function get() {
-    return _getusermedia.shimGetUserMedia;
-  }
-});
-exports.shimOnTrack = shimOnTrack;
-exports.shimPeerConnection = shimPeerConnection;
-exports.shimRTCDataChannel = shimRTCDataChannel;
-exports.shimReceiverGetStats = shimReceiverGetStats;
-exports.shimRemoveStream = shimRemoveStream;
-exports.shimSenderGetStats = shimSenderGetStats;
-var utils = _interopRequireWildcard(require("../utils"));
-var _getusermedia = require("./getusermedia");
-var _getdisplaymedia = require("./getdisplaymedia");
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
-function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
-function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
-function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
-function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
-function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimOnTrack(window) {
-  if (_typeof(window) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get: function get() {
-        return {
-          receiver: this.receiver
-        };
-      }
-    });
-  }
-}
-function shimPeerConnection(window, browserDetails) {
-  if (_typeof(window) !== 'object' || !(window.RTCPeerConnection || window.mozRTCPeerConnection)) {
-    return; // probably media.peerconnection.enabled=false in about:config
-  }
-
-  if (!window.RTCPeerConnection && window.mozRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.mozRTCPeerConnection;
-  }
-  if (browserDetails.version < 53) {
-    // shim away need for obsolete RTCIceCandidate/RTCSessionDescription.
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
-      var nativeMethod = window.RTCPeerConnection.prototype[method];
-      var methodObj = _defineProperty({}, method, function () {
-        arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
-        return nativeMethod.apply(this, arguments);
-      });
-      window.RTCPeerConnection.prototype[method] = methodObj[method];
-    });
-  }
-  var modernStatsTypes = {
-    inboundrtp: 'inbound-rtp',
-    outboundrtp: 'outbound-rtp',
-    candidatepair: 'candidate-pair',
-    localcandidate: 'local-candidate',
-    remotecandidate: 'remote-candidate'
-  };
-  var nativeGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    var _arguments = Array.prototype.slice.call(arguments),
-      selector = _arguments[0],
-      onSucc = _arguments[1],
-      onErr = _arguments[2];
-    return nativeGetStats.apply(this, [selector || null]).then(function (stats) {
-      if (browserDetails.version < 53 && !onSucc) {
-        // Shim only promise getStats with spec-hyphens in type names
-        // Leave callback version alone; misc old uses of forEach before Map
-        try {
-          stats.forEach(function (stat) {
-            stat.type = modernStatsTypes[stat.type] || stat.type;
-          });
-        } catch (e) {
-          if (e.name !== 'TypeError') {
-            throw e;
-          }
-          // Avoid TypeError: "type" is read-only, in old versions. 34-43ish
-          stats.forEach(function (stat, i) {
-            stats.set(i, Object.assign({}, stat, {
-              type: modernStatsTypes[stat.type] || stat.type
-            }));
-          });
-        }
-      }
-      return stats;
-    }).then(onSucc, onErr);
-  };
-}
-function shimSenderGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpSender.prototype) {
-    return;
-  }
-  var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-  if (origGetSenders) {
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      var _this = this;
-      var senders = origGetSenders.apply(this, []);
-      senders.forEach(function (sender) {
-        return sender._pc = _this;
-      });
-      return senders;
-    };
-  }
-  var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  if (origAddTrack) {
-    window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-      var sender = origAddTrack.apply(this, arguments);
-      sender._pc = this;
-      return sender;
-    };
-  }
-  window.RTCRtpSender.prototype.getStats = function getStats() {
-    return this.track ? this._pc.getStats(this.track) : Promise.resolve(new Map());
-  };
-}
-function shimReceiverGetStats(window) {
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpReceiver.prototype) {
-    return;
-  }
-  var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-  if (origGetReceivers) {
-    window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
-      var _this2 = this;
-      var receivers = origGetReceivers.apply(this, []);
-      receivers.forEach(function (receiver) {
-        return receiver._pc = _this2;
-      });
-      return receivers;
-    };
-  }
-  utils.wrapPeerConnectionEvent(window, 'track', function (e) {
-    e.receiver._pc = e.srcElement;
-    return e;
-  });
-  window.RTCRtpReceiver.prototype.getStats = function getStats() {
-    return this._pc.getStats(this.track);
-  };
-}
-function shimRemoveStream(window) {
-  if (!window.RTCPeerConnection || 'removeStream' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-    var _this3 = this;
-    utils.deprecated('removeStream', 'removeTrack');
-    this.getSenders().forEach(function (sender) {
-      if (sender.track && stream.getTracks().includes(sender.track)) {
-        _this3.removeTrack(sender);
-      }
-    });
-  };
-}
-function shimRTCDataChannel(window) {
-  // rename DataChannel to RTCDataChannel (native fix in FF60):
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1173851
-  if (window.DataChannel && !window.RTCDataChannel) {
-    window.RTCDataChannel = window.DataChannel;
-  }
-}
-function shimAddTransceiver(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origAddTransceiver = window.RTCPeerConnection.prototype.addTransceiver;
-  if (origAddTransceiver) {
-    window.RTCPeerConnection.prototype.addTransceiver = function addTransceiver() {
-      this.setParametersPromises = [];
-      // WebIDL input coercion and validation
-      var sendEncodings = arguments[1] && arguments[1].sendEncodings;
-      if (sendEncodings === undefined) {
-        sendEncodings = [];
-      }
-      sendEncodings = _toConsumableArray(sendEncodings);
-      var shouldPerformCheck = sendEncodings.length > 0;
-      if (shouldPerformCheck) {
-        // If sendEncodings params are provided, validate grammar
-        sendEncodings.forEach(function (encodingParam) {
-          if ('rid' in encodingParam) {
-            var ridRegex = /^[a-z0-9]{0,16}$/i;
-            if (!ridRegex.test(encodingParam.rid)) {
-              throw new TypeError('Invalid RID value provided.');
-            }
-          }
-          if ('scaleResolutionDownBy' in encodingParam) {
-            if (!(parseFloat(encodingParam.scaleResolutionDownBy) >= 1.0)) {
-              throw new RangeError('scale_resolution_down_by must be >= 1.0');
-            }
-          }
-          if ('maxFramerate' in encodingParam) {
-            if (!(parseFloat(encodingParam.maxFramerate) >= 0)) {
-              throw new RangeError('max_framerate must be >= 0.0');
-            }
-          }
-        });
-      }
-      var transceiver = origAddTransceiver.apply(this, arguments);
-      if (shouldPerformCheck) {
-        // Check if the init options were applied. If not we do this in an
-        // asynchronous way and save the promise reference in a global object.
-        // This is an ugly hack, but at the same time is way more robust than
-        // checking the sender parameters before and after the createOffer
-        // Also note that after the createoffer we are not 100% sure that
-        // the params were asynchronously applied so we might miss the
-        // opportunity to recreate offer.
-        var sender = transceiver.sender;
-        var params = sender.getParameters();
-        if (!('encodings' in params) ||
-        // Avoid being fooled by patched getParameters() below.
-        params.encodings.length === 1 && Object.keys(params.encodings[0]).length === 0) {
-          params.encodings = sendEncodings;
-          sender.sendEncodings = sendEncodings;
-          this.setParametersPromises.push(sender.setParameters(params).then(function () {
-            delete sender.sendEncodings;
-          })["catch"](function () {
-            delete sender.sendEncodings;
-          }));
-        }
-      }
-      return transceiver;
-    };
-  }
-}
-function shimGetParameters(window) {
-  if (!(_typeof(window) === 'object' && window.RTCRtpSender)) {
-    return;
-  }
-  var origGetParameters = window.RTCRtpSender.prototype.getParameters;
-  if (origGetParameters) {
-    window.RTCRtpSender.prototype.getParameters = function getParameters() {
-      var params = origGetParameters.apply(this, arguments);
-      if (!('encodings' in params)) {
-        params.encodings = [].concat(this.sendEncodings || [{}]);
-      }
-      return params;
-    };
-  }
-}
-function shimCreateOffer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer = function createOffer() {
-    var _arguments2 = arguments,
-      _this4 = this;
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises).then(function () {
-        return origCreateOffer.apply(_this4, _arguments2);
-      })["finally"](function () {
-        _this4.setParametersPromises = [];
-      });
-    }
-    return origCreateOffer.apply(this, arguments);
-  };
-}
-function shimCreateAnswer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(_typeof(window) === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  var origCreateAnswer = window.RTCPeerConnection.prototype.createAnswer;
-  window.RTCPeerConnection.prototype.createAnswer = function createAnswer() {
-    var _arguments3 = arguments,
-      _this5 = this;
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises).then(function () {
-        return origCreateAnswer.apply(_this5, _arguments3);
-      })["finally"](function () {
-        _this5.setParametersPromises = [];
-      });
-    }
-    return origCreateAnswer.apply(this, arguments);
-  };
-}
-
-},{"../utils":11,"./getdisplaymedia":8,"./getusermedia":9}],8:[function(require,module,exports){
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetDisplayMedia = shimGetDisplayMedia;
-function shimGetDisplayMedia(window, preferredMediaSource) {
-  if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!window.navigator.mediaDevices) {
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
-    if (!(constraints && constraints.video)) {
-      var err = new DOMException('getDisplayMedia without video ' + 'constraints is undefined');
-      err.name = 'NotFoundError';
-      // from https://heycam.github.io/webidl/#idl-DOMException-error-names
-      err.code = 8;
-      return Promise.reject(err);
-    }
-    if (constraints.video === true) {
-      constraints.video = {
-        mediaSource: preferredMediaSource
-      };
-    } else {
-      constraints.video.mediaSource = preferredMediaSource;
-    }
-    return window.navigator.mediaDevices.getUserMedia(constraints);
-  };
-}
-
-},{}],9:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimGetUserMedia = shimGetUserMedia;
-var utils = _interopRequireWildcard(require("../utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimGetUserMedia(window, browserDetails) {
-  var navigator = window && window.navigator;
-  var MediaStreamTrack = window && window.MediaStreamTrack;
-  navigator.getUserMedia = function (constraints, onSuccess, onError) {
-    // Replace Firefox 44+'s deprecation warning with unprefixed version.
-    utils.deprecated('navigator.getUserMedia', 'navigator.mediaDevices.getUserMedia');
-    navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
-  };
-  if (!(browserDetails.version > 55 && 'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) {
-    var remap = function remap(obj, a, b) {
-      if (a in obj && !(b in obj)) {
-        obj[b] = obj[a];
-        delete obj[a];
-      }
-    };
-    var nativeGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (c) {
-      if (_typeof(c) === 'object' && _typeof(c.audio) === 'object') {
-        c = JSON.parse(JSON.stringify(c));
-        remap(c.audio, 'autoGainControl', 'mozAutoGainControl');
-        remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression');
-      }
-      return nativeGetUserMedia(c);
-    };
-    if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) {
-      var nativeGetSettings = MediaStreamTrack.prototype.getSettings;
-      MediaStreamTrack.prototype.getSettings = function () {
-        var obj = nativeGetSettings.apply(this, arguments);
-        remap(obj, 'mozAutoGainControl', 'autoGainControl');
-        remap(obj, 'mozNoiseSuppression', 'noiseSuppression');
-        return obj;
-      };
-    }
-    if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) {
-      var nativeApplyConstraints = MediaStreamTrack.prototype.applyConstraints;
-      MediaStreamTrack.prototype.applyConstraints = function (c) {
-        if (this.kind === 'audio' && _typeof(c) === 'object') {
-          c = JSON.parse(JSON.stringify(c));
-          remap(c, 'autoGainControl', 'mozAutoGainControl');
-          remap(c, 'noiseSuppression', 'mozNoiseSuppression');
-        }
-        return nativeApplyConstraints.apply(this, [c]);
-      };
-    }
-  }
-}
-
-},{"../utils":11}],10:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.shimAudioContext = shimAudioContext;
-exports.shimCallbacksAPI = shimCallbacksAPI;
-exports.shimConstraints = shimConstraints;
-exports.shimCreateOfferLegacy = shimCreateOfferLegacy;
-exports.shimGetUserMedia = shimGetUserMedia;
-exports.shimLocalStreamsAPI = shimLocalStreamsAPI;
-exports.shimRTCIceServerUrls = shimRTCIceServerUrls;
-exports.shimRemoteStreamsAPI = shimRemoteStreamsAPI;
-exports.shimTrackEventTransceiver = shimTrackEventTransceiver;
-var utils = _interopRequireWildcard(require("../utils"));
-function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
-function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-function shimLocalStreamsAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      return this._localStreams;
-    };
-  }
-  if (!('addStream' in window.RTCPeerConnection.prototype)) {
-    var _addTrack = window.RTCPeerConnection.prototype.addTrack;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      var _this = this;
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      if (!this._localStreams.includes(stream)) {
-        this._localStreams.push(stream);
-      }
-      // Try to emulate Chrome's behaviour of adding in audio-video order.
-      // Safari orders by track id.
-      stream.getAudioTracks().forEach(function (track) {
-        return _addTrack.call(_this, track, stream);
-      });
-      stream.getVideoTracks().forEach(function (track) {
-        return _addTrack.call(_this, track, stream);
-      });
-    };
-    window.RTCPeerConnection.prototype.addTrack = function addTrack(track) {
-      var _this2 = this;
-      for (var _len = arguments.length, streams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
-        streams[_key - 1] = arguments[_key];
-      }
-      if (streams) {
-        streams.forEach(function (stream) {
-          if (!_this2._localStreams) {
-            _this2._localStreams = [stream];
-          } else if (!_this2._localStreams.includes(stream)) {
-            _this2._localStreams.push(stream);
-          }
-        });
-      }
-      return _addTrack.apply(this, arguments);
-    };
-  }
-  if (!('removeStream' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
-      var _this3 = this;
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      var index = this._localStreams.indexOf(stream);
-      if (index === -1) {
-        return;
-      }
-      this._localStreams.splice(index, 1);
-      var tracks = stream.getTracks();
-      this.getSenders().forEach(function (sender) {
-        if (tracks.includes(sender.track)) {
-          _this3.removeTrack(sender);
-        }
-      });
-    };
-  }
-}
-function shimRemoteStreamsAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getRemoteStreams = function getRemoteStreams() {
-      return this._remoteStreams ? this._remoteStreams : [];
-    };
-  }
-  if (!('onaddstream' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', {
-      get: function get() {
-        return this._onaddstream;
-      },
-      set: function set(f) {
-        var _this4 = this;
-        if (this._onaddstream) {
-          this.removeEventListener('addstream', this._onaddstream);
-          this.removeEventListener('track', this._onaddstreampoly);
-        }
-        this.addEventListener('addstream', this._onaddstream = f);
-        this.addEventListener('track', this._onaddstreampoly = function (e) {
-          e.streams.forEach(function (stream) {
-            if (!_this4._remoteStreams) {
-              _this4._remoteStreams = [];
-            }
-            if (_this4._remoteStreams.includes(stream)) {
-              return;
-            }
-            _this4._remoteStreams.push(stream);
-            var event = new Event('addstream');
-            event.stream = stream;
-            _this4.dispatchEvent(event);
-          });
-        });
-      }
-    });
-    var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
-      var pc = this;
-      if (!this._onaddstreampoly) {
-        this.addEventListener('track', this._onaddstreampoly = function (e) {
-          e.streams.forEach(function (stream) {
-            if (!pc._remoteStreams) {
-              pc._remoteStreams = [];
-            }
-            if (pc._remoteStreams.indexOf(stream) >= 0) {
-              return;
-            }
-            pc._remoteStreams.push(stream);
-            var event = new Event('addstream');
-            event.stream = stream;
-            pc.dispatchEvent(event);
-          });
-        });
-      }
-      return origSetRemoteDescription.apply(pc, arguments);
-    };
-  }
-}
-function shimCallbacksAPI(window) {
-  if (_typeof(window) !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  var prototype = window.RTCPeerConnection.prototype;
-  var origCreateOffer = prototype.createOffer;
-  var origCreateAnswer = prototype.createAnswer;
-  var setLocalDescription = prototype.setLocalDescription;
-  var setRemoteDescription = prototype.setRemoteDescription;
-  var addIceCandidate = prototype.addIceCandidate;
-  prototype.createOffer = function createOffer(successCallback, failureCallback) {
-    var options = arguments.length >= 2 ? arguments[2] : arguments[0];
-    var promise = origCreateOffer.apply(this, [options]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.createAnswer = function createAnswer(successCallback, failureCallback) {
-    var options = arguments.length >= 2 ? arguments[2] : arguments[0];
-    var promise = origCreateAnswer.apply(this, [options]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  var withCallback = function withCallback(description, successCallback, failureCallback) {
-    var promise = setLocalDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setLocalDescription = withCallback;
-  withCallback = function withCallback(description, successCallback, failureCallback) {
-    var promise = setRemoteDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setRemoteDescription = withCallback;
-  withCallback = function withCallback(candidate, successCallback, failureCallback) {
-    var promise = addIceCandidate.apply(this, [candidate]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.addIceCandidate = withCallback;
-}
-function shimGetUserMedia(window) {
-  var navigator = window && window.navigator;
-  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-    // shim not needed in Safari 12.1
-    var mediaDevices = navigator.mediaDevices;
-    var _getUserMedia = mediaDevices.getUserMedia.bind(mediaDevices);
-    navigator.mediaDevices.getUserMedia = function (constraints) {
-      return _getUserMedia(shimConstraints(constraints));
-    };
-  }
-  if (!navigator.getUserMedia && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-    navigator.getUserMedia = function getUserMedia(constraints, cb, errcb) {
-      navigator.mediaDevices.getUserMedia(constraints).then(cb, errcb);
-    }.bind(navigator);
-  }
-}
-function shimConstraints(constraints) {
-  if (constraints && constraints.video !== undefined) {
-    return Object.assign({}, constraints, {
-      video: utils.compactObject(constraints.video)
-    });
-  }
-  return constraints;
-}
-function shimRTCIceServerUrls(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // migrate from non-spec RTCIceServer.url to RTCIceServer.urls
-  var OrigPeerConnection = window.RTCPeerConnection;
-  window.RTCPeerConnection = function RTCPeerConnection(pcConfig, pcConstraints) {
-    if (pcConfig && pcConfig.iceServers) {
-      var newIceServers = [];
-      for (var i = 0; i < pcConfig.iceServers.length; i++) {
-        var server = pcConfig.iceServers[i];
-        if (server.urls === undefined && server.url) {
-          utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');
-          server = JSON.parse(JSON.stringify(server));
-          server.urls = server.url;
-          delete server.url;
-          newIceServers.push(server);
-        } else {
-          newIceServers.push(pcConfig.iceServers[i]);
-        }
-      }
-      pcConfig.iceServers = newIceServers;
-    }
-    return new OrigPeerConnection(pcConfig, pcConstraints);
-  };
-  window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;
-  // wrap static methods. Currently just generateCertificate.
-  if ('generateCertificate' in OrigPeerConnection) {
-    Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
-      get: function get() {
-        return OrigPeerConnection.generateCertificate;
-      }
-    });
-  }
-}
-function shimTrackEventTransceiver(window) {
-  // Add event.transceiver member over deprecated event.receiver
-  if (_typeof(window) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get: function get() {
-        return {
-          receiver: this.receiver
-        };
-      }
-    });
-  }
-}
-function shimCreateOfferLegacy(window) {
-  var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer = function createOffer(offerOptions) {
-    if (offerOptions) {
-      if (typeof offerOptions.offerToReceiveAudio !== 'undefined') {
-        // support bit values
-        offerOptions.offerToReceiveAudio = !!offerOptions.offerToReceiveAudio;
-      }
-      var audioTransceiver = this.getTransceivers().find(function (transceiver) {
-        return transceiver.receiver.track.kind === 'audio';
-      });
-      if (offerOptions.offerToReceiveAudio === false && audioTransceiver) {
-        if (audioTransceiver.direction === 'sendrecv') {
-          if (audioTransceiver.setDirection) {
-            audioTransceiver.setDirection('sendonly');
-          } else {
-            audioTransceiver.direction = 'sendonly';
-          }
-        } else if (audioTransceiver.direction === 'recvonly') {
-          if (audioTransceiver.setDirection) {
-            audioTransceiver.setDirection('inactive');
-          } else {
-            audioTransceiver.direction = 'inactive';
-          }
-        }
-      } else if (offerOptions.offerToReceiveAudio === true && !audioTransceiver) {
-        this.addTransceiver('audio', {
-          direction: 'recvonly'
-        });
-      }
-      if (typeof offerOptions.offerToReceiveVideo !== 'undefined') {
-        // support bit values
-        offerOptions.offerToReceiveVideo = !!offerOptions.offerToReceiveVideo;
-      }
-      var videoTransceiver = this.getTransceivers().find(function (transceiver) {
-        return transceiver.receiver.track.kind === 'video';
-      });
-      if (offerOptions.offerToReceiveVideo === false && videoTransceiver) {
-        if (videoTransceiver.direction === 'sendrecv') {
-          if (videoTransceiver.setDirection) {
-            videoTransceiver.setDirection('sendonly');
-          } else {
-            videoTransceiver.direction = 'sendonly';
-          }
-        } else if (videoTransceiver.direction === 'recvonly') {
-          if (videoTransceiver.setDirection) {
-            videoTransceiver.setDirection('inactive');
-          } else {
-            videoTransceiver.direction = 'inactive';
-          }
-        }
-      } else if (offerOptions.offerToReceiveVideo === true && !videoTransceiver) {
-        this.addTransceiver('video', {
-          direction: 'recvonly'
-        });
-      }
-    }
-    return origCreateOffer.apply(this, arguments);
-  };
-}
-function shimAudioContext(window) {
-  if (_typeof(window) !== 'object' || window.AudioContext) {
-    return;
-  }
-  window.AudioContext = window.webkitAudioContext;
-}
-
-},{"../utils":11}],11:[function(require,module,exports){
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.compactObject = compactObject;
-exports.deprecated = deprecated;
-exports.detectBrowser = detectBrowser;
-exports.disableLog = disableLog;
-exports.disableWarnings = disableWarnings;
-exports.extractVersion = extractVersion;
-exports.filterStats = filterStats;
-exports.log = log;
-exports.walkStats = walkStats;
-exports.wrapPeerConnectionEvent = wrapPeerConnectionEvent;
-function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
-function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
-function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
-var logDisabled_ = true;
-var deprecationWarnings_ = true;
-
-/**
- * Extract browser version out of the provided user agent string.
- *
- * @param {!string} uastring userAgent string.
- * @param {!string} expr Regular expression used as match criteria.
- * @param {!number} pos position in the version string to be returned.
- * @return {!number} browser version.
- */
-function extractVersion(uastring, expr, pos) {
-  var match = uastring.match(expr);
-  return match && match.length >= pos && parseInt(match[pos], 10);
-}
-
-// Wraps the peerconnection event eventNameToWrap in a function
-// which returns the modified event object (or false to prevent
-// the event).
-function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  var proto = window.RTCPeerConnection.prototype;
-  var nativeAddEventListener = proto.addEventListener;
-  proto.addEventListener = function (nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap) {
-      return nativeAddEventListener.apply(this, arguments);
-    }
-    var wrappedCallback = function wrappedCallback(e) {
-      var modifiedEvent = wrapper(e);
-      if (modifiedEvent) {
-        if (cb.handleEvent) {
-          cb.handleEvent(modifiedEvent);
-        } else {
-          cb(modifiedEvent);
-        }
-      }
-    };
-    this._eventMap = this._eventMap || {};
-    if (!this._eventMap[eventNameToWrap]) {
-      this._eventMap[eventNameToWrap] = new Map();
-    }
-    this._eventMap[eventNameToWrap].set(cb, wrappedCallback);
-    return nativeAddEventListener.apply(this, [nativeEventName, wrappedCallback]);
-  };
-  var nativeRemoveEventListener = proto.removeEventListener;
-  proto.removeEventListener = function (nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap || !this._eventMap || !this._eventMap[eventNameToWrap]) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    if (!this._eventMap[eventNameToWrap].has(cb)) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    var unwrappedCb = this._eventMap[eventNameToWrap].get(cb);
-    this._eventMap[eventNameToWrap]["delete"](cb);
-    if (this._eventMap[eventNameToWrap].size === 0) {
-      delete this._eventMap[eventNameToWrap];
-    }
-    if (Object.keys(this._eventMap).length === 0) {
-      delete this._eventMap;
-    }
-    return nativeRemoveEventListener.apply(this, [nativeEventName, unwrappedCb]);
-  };
-  Object.defineProperty(proto, 'on' + eventNameToWrap, {
-    get: function get() {
-      return this['_on' + eventNameToWrap];
-    },
-    set: function set(cb) {
-      if (this['_on' + eventNameToWrap]) {
-        this.removeEventListener(eventNameToWrap, this['_on' + eventNameToWrap]);
-        delete this['_on' + eventNameToWrap];
-      }
-      if (cb) {
-        this.addEventListener(eventNameToWrap, this['_on' + eventNameToWrap] = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-}
-function disableLog(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + _typeof(bool) + '. Please use a boolean.');
-  }
-  logDisabled_ = bool;
-  return bool ? 'adapter.js logging disabled' : 'adapter.js logging enabled';
-}
-
-/**
- * Disable or enable deprecation warnings
- * @param {!boolean} bool set to true to disable warnings.
- */
-function disableWarnings(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + _typeof(bool) + '. Please use a boolean.');
-  }
-  deprecationWarnings_ = !bool;
-  return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');
-}
-function log() {
-  if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
-    if (logDisabled_) {
-      return;
-    }
-    if (typeof console !== 'undefined' && typeof console.log === 'function') {
-      console.log.apply(console, arguments);
-    }
-  }
-}
-
-/**
- * Shows a deprecation warning suggesting the modern and spec-compatible API.
- */
-function deprecated(oldMethod, newMethod) {
-  if (!deprecationWarnings_) {
-    return;
-  }
-  console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');
-}
-
-/**
- * Browser detector.
- *
- * @return {object} result containing browser and version
- *     properties.
- */
-function detectBrowser(window) {
-  // Returned result object.
-  var result = {
-    browser: null,
-    version: null
-  };
-
-  // Fail early if it's not a browser
-  if (typeof window === 'undefined' || !window.navigator || !window.navigator.userAgent) {
-    result.browser = 'Not a browser.';
-    return result;
-  }
-  var navigator = window.navigator;
-  if (navigator.mozGetUserMedia) {
-    // Firefox.
-    result.browser = 'firefox';
-    result.version = extractVersion(navigator.userAgent, /Firefox\/(\d+)\./, 1);
-  } else if (navigator.webkitGetUserMedia || window.isSecureContext === false && window.webkitRTCPeerConnection) {
-    // Chrome, Chromium, Webview, Opera.
-    // Version matches Chrome/WebRTC version.
-    // Chrome 74 removed webkitGetUserMedia on http as well so we need the
-    // more complicated fallback to webkitRTCPeerConnection.
-    result.browser = 'chrome';
-    result.version = extractVersion(navigator.userAgent, /Chrom(e|ium)\/(\d+)\./, 2);
-  } else if (window.RTCPeerConnection && navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) {
-    // Safari.
-    result.browser = 'safari';
-    result.version = extractVersion(navigator.userAgent, /AppleWebKit\/(\d+)\./, 1);
-    result.supportsUnifiedPlan = window.RTCRtpTransceiver && 'currentDirection' in window.RTCRtpTransceiver.prototype;
-  } else {
-    // Default fallthrough: not supported.
-    result.browser = 'Not a supported browser.';
-    return result;
-  }
-  return result;
-}
-
-/**
- * Checks if something is an object.
- *
- * @param {*} val The something you want to check.
- * @return true if val is an object, false otherwise.
- */
-function isObject(val) {
-  return Object.prototype.toString.call(val) === '[object Object]';
-}
-
-/**
- * Remove all empty objects and undefined values
- * from a nested object -- an enhanced and vanilla version
- * of Lodash's `compact`.
- */
-function compactObject(data) {
-  if (!isObject(data)) {
-    return data;
-  }
-  return Object.keys(data).reduce(function (accumulator, key) {
-    var isObj = isObject(data[key]);
-    var value = isObj ? compactObject(data[key]) : data[key];
-    var isEmptyObject = isObj && !Object.keys(value).length;
-    if (value === undefined || isEmptyObject) {
-      return accumulator;
-    }
-    return Object.assign(accumulator, _defineProperty({}, key, value));
-  }, {});
-}
-
-/* iterates the stats graph recursively. */
-function walkStats(stats, base, resultSet) {
-  if (!base || resultSet.has(base.id)) {
-    return;
-  }
-  resultSet.set(base.id, base);
-  Object.keys(base).forEach(function (name) {
-    if (name.endsWith('Id')) {
-      walkStats(stats, stats.get(base[name]), resultSet);
-    } else if (name.endsWith('Ids')) {
-      base[name].forEach(function (id) {
-        walkStats(stats, stats.get(id), resultSet);
-      });
-    }
-  });
-}
-
-/* filter getStats for a sender/receiver track. */
-function filterStats(result, track, outbound) {
-  var streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp';
-  var filteredResult = new Map();
-  if (track === null) {
-    return filteredResult;
-  }
-  var trackStats = [];
-  result.forEach(function (value) {
-    if (value.type === 'track' && value.trackIdentifier === track.id) {
-      trackStats.push(value);
-    }
-  });
-  trackStats.forEach(function (trackStat) {
-    result.forEach(function (stats) {
-      if (stats.type === streamStatsType && stats.trackId === trackStat.id) {
-        walkStats(result, stats, filteredResult);
-      }
-    });
-  });
-  return filteredResult;
-}
-
-},{}],12:[function(require,module,exports){
-/* eslint-env node */
-'use strict';
-
-// SDP helpers.
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var SDPUtils = {};
-
-// Generate an alphanumeric identifier for cname or mids.
-// TODO: use UUIDs instead? https://gist.github.com/jed/982883
-SDPUtils.generateIdentifier = function () {
-  return Math.random().toString(36).substring(2, 12);
-};
-
-// The RTCP CNAME used by all peerconnections from the same JS.
-SDPUtils.localCName = SDPUtils.generateIdentifier();
-
-// Splits SDP into lines, dealing with both CRLF and LF.
-SDPUtils.splitLines = function (blob) {
-  return blob.trim().split('\n').map(function (line) {
-    return line.trim();
-  });
-};
-// Splits SDP into sessionpart and mediasections. Ensures CRLF.
-SDPUtils.splitSections = function (blob) {
-  var parts = blob.split('\nm=');
-  return parts.map(function (part, index) {
-    return (index > 0 ? 'm=' + part : part).trim() + '\r\n';
-  });
-};
-
-// Returns the session description.
-SDPUtils.getDescription = function (blob) {
-  var sections = SDPUtils.splitSections(blob);
-  return sections && sections[0];
-};
-
-// Returns the individual media sections.
-SDPUtils.getMediaSections = function (blob) {
-  var sections = SDPUtils.splitSections(blob);
-  sections.shift();
-  return sections;
-};
-
-// Returns lines that start with a certain prefix.
-SDPUtils.matchPrefix = function (blob, prefix) {
-  return SDPUtils.splitLines(blob).filter(function (line) {
-    return line.indexOf(prefix) === 0;
-  });
-};
-
-// Parses an ICE candidate line. Sample input:
-// candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8
-// rport 55996"
-// Input can be prefixed with a=.
-SDPUtils.parseCandidate = function (line) {
-  var parts = void 0;
-  // Parse both variants.
-  if (line.indexOf('a=candidate:') === 0) {
-    parts = line.substring(12).split(' ');
-  } else {
-    parts = line.substring(10).split(' ');
-  }
-
-  var candidate = {
-    foundation: parts[0],
-    component: { 1: 'rtp', 2: 'rtcp' }[parts[1]] || parts[1],
-    protocol: parts[2].toLowerCase(),
-    priority: parseInt(parts[3], 10),
-    ip: parts[4],
-    address: parts[4], // address is an alias for ip.
-    port: parseInt(parts[5], 10),
-    // skip parts[6] == 'typ'
-    type: parts[7]
-  };
-
-  for (var i = 8; i < parts.length; i += 2) {
-    switch (parts[i]) {
-      case 'raddr':
-        candidate.relatedAddress = parts[i + 1];
-        break;
-      case 'rport':
-        candidate.relatedPort = parseInt(parts[i + 1], 10);
-        break;
-      case 'tcptype':
-        candidate.tcpType = parts[i + 1];
-        break;
-      case 'ufrag':
-        candidate.ufrag = parts[i + 1]; // for backward compatibility.
-        candidate.usernameFragment = parts[i + 1];
-        break;
-      default:
-        // extension handling, in particular ufrag. Don't overwrite.
-        if (candidate[parts[i]] === undefined) {
-          candidate[parts[i]] = parts[i + 1];
-        }
-        break;
-    }
-  }
-  return candidate;
-};
-
-// Translates a candidate object into SDP candidate attribute.
-// This does not include the a= prefix!
-SDPUtils.writeCandidate = function (candidate) {
-  var sdp = [];
-  sdp.push(candidate.foundation);
-
-  var component = candidate.component;
-  if (component === 'rtp') {
-    sdp.push(1);
-  } else if (component === 'rtcp') {
-    sdp.push(2);
-  } else {
-    sdp.push(component);
-  }
-  sdp.push(candidate.protocol.toUpperCase());
-  sdp.push(candidate.priority);
-  sdp.push(candidate.address || candidate.ip);
-  sdp.push(candidate.port);
-
-  var type = candidate.type;
-  sdp.push('typ');
-  sdp.push(type);
-  if (type !== 'host' && candidate.relatedAddress && candidate.relatedPort) {
-    sdp.push('raddr');
-    sdp.push(candidate.relatedAddress);
-    sdp.push('rport');
-    sdp.push(candidate.relatedPort);
-  }
-  if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {
-    sdp.push('tcptype');
-    sdp.push(candidate.tcpType);
-  }
-  if (candidate.usernameFragment || candidate.ufrag) {
-    sdp.push('ufrag');
-    sdp.push(candidate.usernameFragment || candidate.ufrag);
-  }
-  return 'candidate:' + sdp.join(' ');
-};
-
-// Parses an ice-options line, returns an array of option tags.
-// Sample input:
-// a=ice-options:foo bar
-SDPUtils.parseIceOptions = function (line) {
-  return line.substring(14).split(' ');
-};
-
-// Parses a rtpmap line, returns RTCRtpCoddecParameters. Sample input:
-// a=rtpmap:111 opus/48000/2
-SDPUtils.parseRtpMap = function (line) {
-  var parts = line.substring(9).split(' ');
-  var parsed = {
-    payloadType: parseInt(parts.shift(), 10) // was: id
-  };
-
-  parts = parts[0].split('/');
-
-  parsed.name = parts[0];
-  parsed.clockRate = parseInt(parts[1], 10); // was: clockrate
-  parsed.channels = parts.length === 3 ? parseInt(parts[2], 10) : 1;
-  // legacy alias, got renamed back to channels in ORTC.
-  parsed.numChannels = parsed.channels;
-  return parsed;
-};
-
-// Generates a rtpmap line from RTCRtpCodecCapability or
-// RTCRtpCodecParameters.
-SDPUtils.writeRtpMap = function (codec) {
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  var channels = codec.channels || codec.numChannels || 1;
-  return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate + (channels !== 1 ? '/' + channels : '') + '\r\n';
-};
-
-// Parses a extmap line (headerextension from RFC 5285). Sample input:
-// a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
-// a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset
-SDPUtils.parseExtmap = function (line) {
-  var parts = line.substring(9).split(' ');
-  return {
-    id: parseInt(parts[0], 10),
-    direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv',
-    uri: parts[1],
-    attributes: parts.slice(2).join(' ')
-  };
-};
-
-// Generates an extmap line from RTCRtpHeaderExtensionParameters or
-// RTCRtpHeaderExtension.
-SDPUtils.writeExtmap = function (headerExtension) {
-  return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) + (headerExtension.direction && headerExtension.direction !== 'sendrecv' ? '/' + headerExtension.direction : '') + ' ' + headerExtension.uri + (headerExtension.attributes ? ' ' + headerExtension.attributes : '') + '\r\n';
-};
-
-// Parses a fmtp line, returns dictionary. Sample input:
-// a=fmtp:96 vbr=on;cng=on
-// Also deals with vbr=on; cng=on
-SDPUtils.parseFmtp = function (line) {
-  var parsed = {};
-  var kv = void 0;
-  var parts = line.substring(line.indexOf(' ') + 1).split(';');
-  for (var j = 0; j < parts.length; j++) {
-    kv = parts[j].trim().split('=');
-    parsed[kv[0].trim()] = kv[1];
-  }
-  return parsed;
-};
-
-// Generates a fmtp line from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeFmtp = function (codec) {
-  var line = '';
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.parameters && Object.keys(codec.parameters).length) {
-    var params = [];
-    Object.keys(codec.parameters).forEach(function (param) {
-      if (codec.parameters[param] !== undefined) {
-        params.push(param + '=' + codec.parameters[param]);
-      } else {
-        params.push(param);
-      }
-    });
-    line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n';
-  }
-  return line;
-};
-
-// Parses a rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:
-// a=rtcp-fb:98 nack rpsi
-SDPUtils.parseRtcpFb = function (line) {
-  var parts = line.substring(line.indexOf(' ') + 1).split(' ');
-  return {
-    type: parts.shift(),
-    parameter: parts.join(' ')
-  };
-};
-
-// Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.
-SDPUtils.writeRtcpFb = function (codec) {
-  var lines = '';
-  var pt = codec.payloadType;
-  if (codec.preferredPayloadType !== undefined) {
-    pt = codec.preferredPayloadType;
-  }
-  if (codec.rtcpFeedback && codec.rtcpFeedback.length) {
-    // FIXME: special handling for trr-int?
-    codec.rtcpFeedback.forEach(function (fb) {
-      lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') + '\r\n';
-    });
-  }
-  return lines;
-};
-
-// Parses a RFC 5576 ssrc media attribute. Sample input:
-// a=ssrc:3735928559 cname:something
-SDPUtils.parseSsrcMedia = function (line) {
-  var sp = line.indexOf(' ');
-  var parts = {
-    ssrc: parseInt(line.substring(7, sp), 10)
-  };
-  var colon = line.indexOf(':', sp);
-  if (colon > -1) {
-    parts.attribute = line.substring(sp + 1, colon);
-    parts.value = line.substring(colon + 1);
-  } else {
-    parts.attribute = line.substring(sp + 1);
-  }
-  return parts;
-};
-
-// Parse a ssrc-group line (see RFC 5576). Sample input:
-// a=ssrc-group:semantics 12 34
-SDPUtils.parseSsrcGroup = function (line) {
-  var parts = line.substring(13).split(' ');
-  return {
-    semantics: parts.shift(),
-    ssrcs: parts.map(function (ssrc) {
-      return parseInt(ssrc, 10);
-    })
-  };
-};
-
-// Extracts the MID (RFC 5888) from a media section.
-// Returns the MID or undefined if no mid line was found.
-SDPUtils.getMid = function (mediaSection) {
-  var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];
-  if (mid) {
-    return mid.substring(6);
-  }
-};
-
-// Parses a fingerprint line for DTLS-SRTP.
-SDPUtils.parseFingerprint = function (line) {
-  var parts = line.substring(14).split(' ');
-  return {
-    algorithm: parts[0].toLowerCase(), // algorithm is case-sensitive in Edge.
-    value: parts[1].toUpperCase() // the definition is upper-case in RFC 4572.
-  };
-};
-
-// Extracts DTLS parameters from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the fingerprint line as input. See also getIceParameters.
-SDPUtils.getDtlsParameters = function (mediaSection, sessionpart) {
-  var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=fingerprint:');
-  // Note: a=setup line is ignored since we use the 'auto' role in Edge.
-  return {
-    role: 'auto',
-    fingerprints: lines.map(SDPUtils.parseFingerprint)
-  };
-};
-
-// Serializes DTLS parameters to SDP.
-SDPUtils.writeDtlsParameters = function (params, setupType) {
-  var sdp = 'a=setup:' + setupType + '\r\n';
-  params.fingerprints.forEach(function (fp) {
-    sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n';
-  });
-  return sdp;
-};
-
-// Parses a=crypto lines into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#dictionary-rtcsrtpsdesparameters-members
-SDPUtils.parseCryptoLine = function (line) {
-  var parts = line.substring(9).split(' ');
-  return {
-    tag: parseInt(parts[0], 10),
-    cryptoSuite: parts[1],
-    keyParams: parts[2],
-    sessionParams: parts.slice(3)
-  };
-};
-
-SDPUtils.writeCryptoLine = function (parameters) {
-  return 'a=crypto:' + parameters.tag + ' ' + parameters.cryptoSuite + ' ' + (_typeof(parameters.keyParams) === 'object' ? SDPUtils.writeCryptoKeyParams(parameters.keyParams) : parameters.keyParams) + (parameters.sessionParams ? ' ' + parameters.sessionParams.join(' ') : '') + '\r\n';
-};
-
-// Parses the crypto key parameters into
-//   https://rawgit.com/aboba/edgertc/master/msortc-rs4.html#rtcsrtpkeyparam*
-SDPUtils.parseCryptoKeyParams = function (keyParams) {
-  if (keyParams.indexOf('inline:') !== 0) {
-    return null;
-  }
-  var parts = keyParams.substring(7).split('|');
-  return {
-    keyMethod: 'inline',
-    keySalt: parts[0],
-    lifeTime: parts[1],
-    mkiValue: parts[2] ? parts[2].split(':')[0] : undefined,
-    mkiLength: parts[2] ? parts[2].split(':')[1] : undefined
-  };
-};
-
-SDPUtils.writeCryptoKeyParams = function (keyParams) {
-  return keyParams.keyMethod + ':' + keyParams.keySalt + (keyParams.lifeTime ? '|' + keyParams.lifeTime : '') + (keyParams.mkiValue && keyParams.mkiLength ? '|' + keyParams.mkiValue + ':' + keyParams.mkiLength : '');
-};
-
-// Extracts all SDES parameters.
-SDPUtils.getCryptoParameters = function (mediaSection, sessionpart) {
-  var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=crypto:');
-  return lines.map(SDPUtils.parseCryptoLine);
-};
-
-// Parses ICE information from SDP media section or sessionpart.
-// FIXME: for consistency with other functions this should only
-//   get the ice-ufrag and ice-pwd lines as input.
-SDPUtils.getIceParameters = function (mediaSection, sessionpart) {
-  var ufrag = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-ufrag:')[0];
-  var pwd = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=ice-pwd:')[0];
-  if (!(ufrag && pwd)) {
-    return null;
-  }
-  return {
-    usernameFragment: ufrag.substring(12),
-    password: pwd.substring(10)
-  };
-};
-
-// Serializes ICE parameters to SDP.
-SDPUtils.writeIceParameters = function (params) {
-  var sdp = 'a=ice-ufrag:' + params.usernameFragment + '\r\n' + 'a=ice-pwd:' + params.password + '\r\n';
-  if (params.iceLite) {
-    sdp += 'a=ice-lite\r\n';
-  }
-  return sdp;
-};
-
-// Parses the SDP media section and returns RTCRtpParameters.
-SDPUtils.parseRtpParameters = function (mediaSection) {
-  var description = {
-    codecs: [],
-    headerExtensions: [],
-    fecMechanisms: [],
-    rtcp: []
-  };
-  var lines = SDPUtils.splitLines(mediaSection);
-  var mline = lines[0].split(' ');
-  description.profile = mline[2];
-  for (var i = 3; i < mline.length; i++) {
-    // find all codecs from mline[3..]
-    var pt = mline[i];
-    var rtpmapline = SDPUtils.matchPrefix(mediaSection, 'a=rtpmap:' + pt + ' ')[0];
-    if (rtpmapline) {
-      var codec = SDPUtils.parseRtpMap(rtpmapline);
-      var fmtps = SDPUtils.matchPrefix(mediaSection, 'a=fmtp:' + pt + ' ');
-      // Only the first a=fmtp:<pt> is considered.
-      codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};
-      codec.rtcpFeedback = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:' + pt + ' ').map(SDPUtils.parseRtcpFb);
-      description.codecs.push(codec);
-      // parse FEC mechanisms from rtpmap lines.
-      switch (codec.name.toUpperCase()) {
-        case 'RED':
-        case 'ULPFEC':
-          description.fecMechanisms.push(codec.name.toUpperCase());
-          break;
-        default:
-          // only RED and ULPFEC are recognized as FEC mechanisms.
-          break;
-      }
-    }
-  }
-  SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function (line) {
-    description.headerExtensions.push(SDPUtils.parseExtmap(line));
-  });
-  var wildcardRtcpFb = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:* ').map(SDPUtils.parseRtcpFb);
-  description.codecs.forEach(function (codec) {
-    wildcardRtcpFb.forEach(function (fb) {
-      var duplicate = codec.rtcpFeedback.find(function (existingFeedback) {
-        return existingFeedback.type === fb.type && existingFeedback.parameter === fb.parameter;
-      });
-      if (!duplicate) {
-        codec.rtcpFeedback.push(fb);
-      }
-    });
-  });
-  // FIXME: parse rtcp.
-  return description;
-};
-
-// Generates parts of the SDP media section describing the capabilities /
-// parameters.
-SDPUtils.writeRtpDescription = function (kind, caps) {
-  var sdp = '';
-
-  // Build the mline.
-  sdp += 'm=' + kind + ' ';
-  sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.
-  sdp += ' ' + (caps.profile || 'UDP/TLS/RTP/SAVPF') + ' ';
-  sdp += caps.codecs.map(function (codec) {
-    if (codec.preferredPayloadType !== undefined) {
-      return codec.preferredPayloadType;
-    }
-    return codec.payloadType;
-  }).join(' ') + '\r\n';
-
-  sdp += 'c=IN IP4 0.0.0.0\r\n';
-  sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n';
-
-  // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.
-  caps.codecs.forEach(function (codec) {
-    sdp += SDPUtils.writeRtpMap(codec);
-    sdp += SDPUtils.writeFmtp(codec);
-    sdp += SDPUtils.writeRtcpFb(codec);
-  });
-  var maxptime = 0;
-  caps.codecs.forEach(function (codec) {
-    if (codec.maxptime > maxptime) {
-      maxptime = codec.maxptime;
-    }
-  });
-  if (maxptime > 0) {
-    sdp += 'a=maxptime:' + maxptime + '\r\n';
-  }
-
-  if (caps.headerExtensions) {
-    caps.headerExtensions.forEach(function (extension) {
-      sdp += SDPUtils.writeExtmap(extension);
-    });
-  }
-  // FIXME: write fecMechanisms.
-  return sdp;
-};
-
-// Parses the SDP media section and returns an array of
-// RTCRtpEncodingParameters.
-SDPUtils.parseRtpEncodingParameters = function (mediaSection) {
-  var encodingParameters = [];
-  var description = SDPUtils.parseRtpParameters(mediaSection);
-  var hasRed = description.fecMechanisms.indexOf('RED') !== -1;
-  var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1;
-
-  // filter a=ssrc:... cname:, ignore PlanB-msid
-  var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (parts) {
-    return parts.attribute === 'cname';
-  });
-  var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc;
-  var secondarySsrc = void 0;
-
-  var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID').map(function (line) {
-    var parts = line.substring(17).split(' ');
-    return parts.map(function (part) {
-      return parseInt(part, 10);
-    });
-  });
-  if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) {
-    secondarySsrc = flows[0][1];
-  }
-
-  description.codecs.forEach(function (codec) {
-    if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) {
-      var encParam = {
-        ssrc: primarySsrc,
-        codecPayloadType: parseInt(codec.parameters.apt, 10)
-      };
-      if (primarySsrc && secondarySsrc) {
-        encParam.rtx = { ssrc: secondarySsrc };
-      }
-      encodingParameters.push(encParam);
-      if (hasRed) {
-        encParam = JSON.parse(JSON.stringify(encParam));
-        encParam.fec = {
-          ssrc: primarySsrc,
-          mechanism: hasUlpfec ? 'red+ulpfec' : 'red'
-        };
-        encodingParameters.push(encParam);
-      }
-    }
-  });
-  if (encodingParameters.length === 0 && primarySsrc) {
-    encodingParameters.push({
-      ssrc: primarySsrc
-    });
-  }
-
-  // we support both b=AS and b=TIAS but interpret AS as TIAS.
-  var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b=');
-  if (bandwidth.length) {
-    if (bandwidth[0].indexOf('b=TIAS:') === 0) {
-      bandwidth = parseInt(bandwidth[0].substring(7), 10);
-    } else if (bandwidth[0].indexOf('b=AS:') === 0) {
-      // use formula from JSEP to convert b=AS to TIAS value.
-      bandwidth = parseInt(bandwidth[0].substring(5), 10) * 1000 * 0.95 - 50 * 40 * 8;
-    } else {
-      bandwidth = undefined;
-    }
-    encodingParameters.forEach(function (params) {
-      params.maxBitrate = bandwidth;
-    });
-  }
-  return encodingParameters;
-};
-
-// parses http://draft.ortc.org/#rtcrtcpparameters*
-SDPUtils.parseRtcpParameters = function (mediaSection) {
-  var rtcpParameters = {};
-
-  // Gets the first SSRC. Note that with RTX there might be multiple
-  // SSRCs.
-  var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (obj) {
-    return obj.attribute === 'cname';
-  })[0];
-  if (remoteSsrc) {
-    rtcpParameters.cname = remoteSsrc.value;
-    rtcpParameters.ssrc = remoteSsrc.ssrc;
-  }
-
-  // Edge uses the compound attribute instead of reducedSize
-  // compound is !reducedSize
-  var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize');
-  rtcpParameters.reducedSize = rsize.length > 0;
-  rtcpParameters.compound = rsize.length === 0;
-
-  // parses the rtcp-mux attrіbute.
-  // Note that Edge does not support unmuxed RTCP.
-  var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux');
-  rtcpParameters.mux = mux.length > 0;
-
-  return rtcpParameters;
-};
-
-SDPUtils.writeRtcpParameters = function (rtcpParameters) {
-  var sdp = '';
-  if (rtcpParameters.reducedSize) {
-    sdp += 'a=rtcp-rsize\r\n';
-  }
-  if (rtcpParameters.mux) {
-    sdp += 'a=rtcp-mux\r\n';
-  }
-  if (rtcpParameters.ssrc !== undefined && rtcpParameters.cname) {
-    sdp += 'a=ssrc:' + rtcpParameters.ssrc + ' cname:' + rtcpParameters.cname + '\r\n';
-  }
-  return sdp;
-};
-
-// parses either a=msid: or a=ssrc:... msid lines and returns
-// the id of the MediaStream and MediaStreamTrack.
-SDPUtils.parseMsid = function (mediaSection) {
-  var parts = void 0;
-  var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:');
-  if (spec.length === 1) {
-    parts = spec[0].substring(7).split(' ');
-    return { stream: parts[0], track: parts[1] };
-  }
-  var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
-    return SDPUtils.parseSsrcMedia(line);
-  }).filter(function (msidParts) {
-    return msidParts.attribute === 'msid';
-  });
-  if (planB.length > 0) {
-    parts = planB[0].value.split(' ');
-    return { stream: parts[0], track: parts[1] };
-  }
-};
-
-// SCTP
-// parses draft-ietf-mmusic-sctp-sdp-26 first and falls back
-// to draft-ietf-mmusic-sctp-sdp-05
-SDPUtils.parseSctpDescription = function (mediaSection) {
-  var mline = SDPUtils.parseMLine(mediaSection);
-  var maxSizeLine = SDPUtils.matchPrefix(mediaSection, 'a=max-message-size:');
-  var maxMessageSize = void 0;
-  if (maxSizeLine.length > 0) {
-    maxMessageSize = parseInt(maxSizeLine[0].substring(19), 10);
-  }
-  if (isNaN(maxMessageSize)) {
-    maxMessageSize = 65536;
-  }
-  var sctpPort = SDPUtils.matchPrefix(mediaSection, 'a=sctp-port:');
-  if (sctpPort.length > 0) {
-    return {
-      port: parseInt(sctpPort[0].substring(12), 10),
-      protocol: mline.fmt,
-      maxMessageSize: maxMessageSize
-    };
-  }
-  var sctpMapLines = SDPUtils.matchPrefix(mediaSection, 'a=sctpmap:');
-  if (sctpMapLines.length > 0) {
-    var parts = sctpMapLines[0].substring(10).split(' ');
-    return {
-      port: parseInt(parts[0], 10),
-      protocol: parts[1],
-      maxMessageSize: maxMessageSize
-    };
-  }
-};
-
-// SCTP
-// outputs the draft-ietf-mmusic-sctp-sdp-26 version that all browsers
-// support by now receiving in this format, unless we originally parsed
-// as the draft-ietf-mmusic-sctp-sdp-05 format (indicated by the m-line
-// protocol of DTLS/SCTP -- without UDP/ or TCP/)
-SDPUtils.writeSctpDescription = function (media, sctp) {
-  var output = [];
-  if (media.protocol !== 'DTLS/SCTP') {
-    output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.protocol + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctp-port:' + sctp.port + '\r\n'];
-  } else {
-    output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.port + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctpmap:' + sctp.port + ' ' + sctp.protocol + ' 65535\r\n'];
-  }
-  if (sctp.maxMessageSize !== undefined) {
-    output.push('a=max-message-size:' + sctp.maxMessageSize + '\r\n');
-  }
-  return output.join('');
-};
-
-// Generate a session ID for SDP.
-// https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1
-// recommends using a cryptographically random +ve 64-bit value
-// but right now this should be acceptable and within the right range
-SDPUtils.generateSessionId = function () {
-  return Math.random().toString().substr(2, 22);
-};
-
-// Write boiler plate for start of SDP
-// sessId argument is optional - if not supplied it will
-// be generated randomly
-// sessVersion is optional and defaults to 2
-// sessUser is optional and defaults to 'thisisadapterortc'
-SDPUtils.writeSessionBoilerplate = function (sessId, sessVer, sessUser) {
-  var sessionId = void 0;
-  var version = sessVer !== undefined ? sessVer : 2;
-  if (sessId) {
-    sessionId = sessId;
-  } else {
-    sessionId = SDPUtils.generateSessionId();
-  }
-  var user = sessUser || 'thisisadapterortc';
-  // FIXME: sess-id should be an NTP timestamp.
-  return 'v=0\r\n' + 'o=' + user + ' ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\r\n' + 's=-\r\n' + 't=0 0\r\n';
-};
-
-// Gets the direction from the mediaSection or the sessionpart.
-SDPUtils.getDirection = function (mediaSection, sessionpart) {
-  // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.
-  var lines = SDPUtils.splitLines(mediaSection);
-  for (var i = 0; i < lines.length; i++) {
-    switch (lines[i]) {
-      case 'a=sendrecv':
-      case 'a=sendonly':
-      case 'a=recvonly':
-      case 'a=inactive':
-        return lines[i].substring(2);
-      default:
-      // FIXME: What should happen here?
-    }
-  }
-  if (sessionpart) {
-    return SDPUtils.getDirection(sessionpart);
-  }
-  return 'sendrecv';
-};
-
-SDPUtils.getKind = function (mediaSection) {
-  var lines = SDPUtils.splitLines(mediaSection);
-  var mline = lines[0].split(' ');
-  return mline[0].substring(2);
-};
-
-SDPUtils.isRejected = function (mediaSection) {
-  return mediaSection.split(' ', 2)[1] === '0';
-};
-
-SDPUtils.parseMLine = function (mediaSection) {
-  var lines = SDPUtils.splitLines(mediaSection);
-  var parts = lines[0].substring(2).split(' ');
-  return {
-    kind: parts[0],
-    port: parseInt(parts[1], 10),
-    protocol: parts[2],
-    fmt: parts.slice(3).join(' ')
-  };
-};
-
-SDPUtils.parseOLine = function (mediaSection) {
-  var line = SDPUtils.matchPrefix(mediaSection, 'o=')[0];
-  var parts = line.substring(2).split(' ');
-  return {
-    username: parts[0],
-    sessionId: parts[1],
-    sessionVersion: parseInt(parts[2], 10),
-    netType: parts[3],
-    addressType: parts[4],
-    address: parts[5]
-  };
-};
-
-// a very naive interpretation of a valid SDP.
-SDPUtils.isValidSDP = function (blob) {
-  if (typeof blob !== 'string' || blob.length === 0) {
-    return false;
-  }
-  var lines = SDPUtils.splitLines(blob);
-  for (var i = 0; i < lines.length; i++) {
-    if (lines[i].length < 2 || lines[i].charAt(1) !== '=') {
-      return false;
-    }
-    // TODO: check the modifier a bit more.
-  }
-  return true;
-};
-
-// Expose public methods.
-if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object') {
-  module.exports = SDPUtils;
-}
-},{}]},{},[1]);

File diff ditekan karena terlalu besar
+ 0 - 0
node_modules/webrtc-adapter/out/esbuild.js


+ 0 - 91
node_modules/webrtc-adapter/package.json

@@ -1,91 +0,0 @@
-{
-  "_from": "webrtc-adapter@^8.2.3",
-  "_id": "webrtc-adapter@8.2.3",
-  "_inBundle": false,
-  "_integrity": "sha512-gnmRz++suzmvxtp3ehQts6s2JtAGPuDPjA1F3a9ckNpG1kYdYuHWYpazoAnL9FS5/B21tKlhkorbdCXat0+4xQ==",
-  "_location": "/webrtc-adapter",
-  "_phantomChildren": {},
-  "_requested": {
-    "type": "range",
-    "registry": true,
-    "raw": "webrtc-adapter@^8.2.3",
-    "name": "webrtc-adapter",
-    "escapedName": "webrtc-adapter",
-    "rawSpec": "^8.2.3",
-    "saveSpec": null,
-    "fetchSpec": "^8.2.3"
-  },
-  "_requiredBy": [
-    "/trtc-sdk-v5"
-  ],
-  "_resolved": "https://registry.npmmirror.com/webrtc-adapter/-/webrtc-adapter-8.2.3.tgz",
-  "_shasum": "85e5e52ea68e808be8d6db85e338aa5c95e80022",
-  "_spec": "webrtc-adapter@^8.2.3",
-  "_where": "/Users/lianghulin/Documents/HBuilderProjects/recruit-video/node_modules/trtc-sdk-v5",
-  "authors": [
-    "The WebRTC project authors (https://www.webrtc.org/)",
-    "The adapter.js project authors (https://github.com/webrtchacks/adapter/)"
-  ],
-  "bugs": {
-    "url": "https://github.com/webrtchacks/adapter/issues"
-  },
-  "bundleDependencies": false,
-  "dependencies": {
-    "sdp": "^3.2.0"
-  },
-  "deprecated": false,
-  "description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences",
-  "devDependencies": {
-    "@babel/core": "^7.21.0",
-    "@babel/preset-env": "^7.20.2",
-    "babel-preset-env": "^1.7.0",
-    "brfs": "^1.5.0",
-    "chai": "^3.5.0",
-    "grunt": "^1.1.0",
-    "grunt-babel": "^8.0.0",
-    "grunt-browserify": "^6.0.0",
-    "grunt-cli": "^1.3.1",
-    "grunt-contrib-clean": "^1.1.0",
-    "grunt-contrib-copy": "^1.0.0",
-    "grunt-eslint": "^24.0.0",
-    "grunt-shell": "^2.1.0",
-    "karma": "^6.4.1",
-    "karma-browserify": "^8.1.0",
-    "karma-chai": "^0.1.0",
-    "karma-chrome-launcher": "^2.2.0",
-    "karma-firefox-launcher": "^1.3.0",
-    "karma-mocha": "^2.0.1",
-    "karma-mocha-reporter": "^2.2.3",
-    "karma-safari-launcher": "^1.0.0",
-    "karma-stability-reporter": "^3.0.1",
-    "mocha": "^10.1.0",
-    "sinon": "^2.2.0",
-    "sinon-chai": "^2.14.0",
-    "travis-multirunner": "^5.0.1"
-  },
-  "engines": {
-    "node": ">=6.0.0",
-    "npm": ">=3.10.0"
-  },
-  "homepage": "https://github.com/webrtchacks/adapter#readme",
-  "license": "BSD-3-Clause",
-  "main": "./dist/adapter_core.js",
-  "module": "./src/js/adapter_core.js",
-  "name": "webrtc-adapter",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/webrtchacks/adapter.git"
-  },
-  "scripts": {
-    "e2e-tests": "grunt && grunt downloadBrowser && karma start test/karma.conf.js",
-    "lint-and-unit-tests": "grunt && mocha test/unit",
-    "postversion": "export GITTAG=\"echo $(git describe --abbrev=0 --tags | sed 's/^v//')\" && git push --force --set-upstream origin bumpVersion --follow-tags && git checkout gh-pages && git pull && cp out/adapter.js adapter.js && cp adapter.js adapter-`$GITTAG`.js && rm adapter-latest.js && ln -s adapter-`$GITTAG`.js adapter-latest.js && mkdir -p adapter-`$GITTAG`-variants && cp out/adapter.js adapter-`$GITTAG`-variants/ && cp out/adapter_*.js adapter-`$GITTAG`-variants/ && git add adapter.js adapter-latest.js adapter-`$GITTAG`.js adapter-`$GITTAG`-variants && git commit -m `$GITTAG` && git push --set-upstream origin gh-pages && git checkout main",
-    "prepare": "grunt build",
-    "prepublishonly": "npm test",
-    "preversion": "git stash && npm install && npm update && BROWSER=chrome BVER=stable CI=true npm test && git checkout -B bumpVersion && grunt build && grunt copyForPublish && git add package.json release/* && git commit -m 'Add adapter artifacts' --allow-empty",
-    "test": "grunt && mocha test/unit && grunt downloadBrowser && karma start test/karma.conf.js",
-    "version": ""
-  },
-  "types": "./index.d.ts",
-  "version": "8.2.3"
-}

+ 0 - 16
node_modules/webrtc-adapter/src/js/adapter_core.js

@@ -1,16 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-
-'use strict';
-
-import {adapterFactory} from './adapter_factory.js';
-
-const adapter =
-  adapterFactory({window: typeof window === 'undefined' ? undefined : window});
-export default adapter;

+ 0 - 16
node_modules/webrtc-adapter/src/js/adapter_core5.js

@@ -1,16 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-
-'use strict';
-
-import {adapterFactory} from './adapter_factory.js';
-
-const adapter =
-  adapterFactory({window: typeof window === 'undefined' ? undefined : window});
-module.exports = adapter; // this is the difference from adapter_core.

+ 0 - 139
node_modules/webrtc-adapter/src/js/adapter_factory.js

@@ -1,139 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-import * as utils from './utils';
-
-// Browser shims.
-import * as chromeShim from './chrome/chrome_shim';
-import * as firefoxShim from './firefox/firefox_shim';
-import * as safariShim from './safari/safari_shim';
-import * as commonShim from './common_shim';
-import * as sdp from 'sdp';
-
-// Shimming starts here.
-export function adapterFactory({window} = {}, options = {
-  shimChrome: true,
-  shimFirefox: true,
-  shimSafari: true,
-}) {
-  // Utils.
-  const logging = utils.log;
-  const browserDetails = utils.detectBrowser(window);
-
-  const adapter = {
-    browserDetails,
-    commonShim,
-    extractVersion: utils.extractVersion,
-    disableLog: utils.disableLog,
-    disableWarnings: utils.disableWarnings,
-    // Expose sdp as a convenience. For production apps include directly.
-    sdp,
-  };
-
-  // Shim browser if found.
-  switch (browserDetails.browser) {
-    case 'chrome':
-      if (!chromeShim || !chromeShim.shimPeerConnection ||
-          !options.shimChrome) {
-        logging('Chrome shim is not included in this adapter release.');
-        return adapter;
-      }
-      if (browserDetails.version === null) {
-        logging('Chrome shim can not determine version, not shimming.');
-        return adapter;
-      }
-      logging('adapter.js shimming chrome.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = chromeShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-
-      chromeShim.shimGetUserMedia(window, browserDetails);
-      chromeShim.shimMediaStream(window, browserDetails);
-      chromeShim.shimPeerConnection(window, browserDetails);
-      chromeShim.shimOnTrack(window, browserDetails);
-      chromeShim.shimAddTrackRemoveTrack(window, browserDetails);
-      chromeShim.shimGetSendersWithDtmf(window, browserDetails);
-      chromeShim.shimGetStats(window, browserDetails);
-      chromeShim.shimSenderReceiverGetStats(window, browserDetails);
-      chromeShim.fixNegotiationNeeded(window, browserDetails);
-
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    case 'firefox':
-      if (!firefoxShim || !firefoxShim.shimPeerConnection ||
-          !options.shimFirefox) {
-        logging('Firefox shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming firefox.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = firefoxShim;
-
-      // Must be called before shimPeerConnection.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-
-      firefoxShim.shimGetUserMedia(window, browserDetails);
-      firefoxShim.shimPeerConnection(window, browserDetails);
-      firefoxShim.shimOnTrack(window, browserDetails);
-      firefoxShim.shimRemoveStream(window, browserDetails);
-      firefoxShim.shimSenderGetStats(window, browserDetails);
-      firefoxShim.shimReceiverGetStats(window, browserDetails);
-      firefoxShim.shimRTCDataChannel(window, browserDetails);
-      firefoxShim.shimAddTransceiver(window, browserDetails);
-      firefoxShim.shimGetParameters(window, browserDetails);
-      firefoxShim.shimCreateOffer(window, browserDetails);
-      firefoxShim.shimCreateAnswer(window, browserDetails);
-
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimConnectionState(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      break;
-    case 'safari':
-      if (!safariShim || !options.shimSafari) {
-        logging('Safari shim is not included in this adapter release.');
-        return adapter;
-      }
-      logging('adapter.js shimming safari.');
-      // Export to the adapter global object visible in the browser.
-      adapter.browserShim = safariShim;
-
-      // Must be called before shimCallbackAPI.
-      commonShim.shimAddIceCandidateNullOrEmpty(window, browserDetails);
-      commonShim.shimParameterlessSetLocalDescription(window, browserDetails);
-
-      safariShim.shimRTCIceServerUrls(window, browserDetails);
-      safariShim.shimCreateOfferLegacy(window, browserDetails);
-      safariShim.shimCallbacksAPI(window, browserDetails);
-      safariShim.shimLocalStreamsAPI(window, browserDetails);
-      safariShim.shimRemoteStreamsAPI(window, browserDetails);
-      safariShim.shimTrackEventTransceiver(window, browserDetails);
-      safariShim.shimGetUserMedia(window, browserDetails);
-      safariShim.shimAudioContext(window, browserDetails);
-
-      commonShim.shimRTCIceCandidate(window, browserDetails);
-      commonShim.shimRTCIceCandidateRelayProtocol(window, browserDetails);
-      commonShim.shimMaxMessageSize(window, browserDetails);
-      commonShim.shimSendThrowTypeError(window, browserDetails);
-      commonShim.removeExtmapAllowMixed(window, browserDetails);
-      break;
-    default:
-      logging('Unsupported browser!');
-      break;
-  }
-
-  return adapter;
-}

+ 0 - 702
node_modules/webrtc-adapter/src/js/chrome/chrome_shim.js

@@ -1,702 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-import * as utils from '../utils.js';
-
-export {shimGetUserMedia} from './getusermedia';
-export {shimGetDisplayMedia} from './getdisplaymedia';
-
-export function shimMediaStream(window) {
-  window.MediaStream = window.MediaStream || window.webkitMediaStream;
-}
-
-export function shimOnTrack(window) {
-  if (typeof window === 'object' && window.RTCPeerConnection && !('ontrack' in
-      window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
-      get() {
-        return this._ontrack;
-      },
-      set(f) {
-        if (this._ontrack) {
-          this.removeEventListener('track', this._ontrack);
-        }
-        this.addEventListener('track', this._ontrack = f);
-      },
-      enumerable: true,
-      configurable: true
-    });
-    const origSetRemoteDescription =
-        window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription =
-      function setRemoteDescription() {
-        if (!this._ontrackpoly) {
-          this._ontrackpoly = (e) => {
-            // onaddstream does not fire when a track is added to an existing
-            // stream. But stream.onaddtrack is implemented so we use that.
-            e.stream.addEventListener('addtrack', te => {
-              let receiver;
-              if (window.RTCPeerConnection.prototype.getReceivers) {
-                receiver = this.getReceivers()
-                  .find(r => r.track && r.track.id === te.track.id);
-              } else {
-                receiver = {track: te.track};
-              }
-
-              const event = new Event('track');
-              event.track = te.track;
-              event.receiver = receiver;
-              event.transceiver = {receiver};
-              event.streams = [e.stream];
-              this.dispatchEvent(event);
-            });
-            e.stream.getTracks().forEach(track => {
-              let receiver;
-              if (window.RTCPeerConnection.prototype.getReceivers) {
-                receiver = this.getReceivers()
-                  .find(r => r.track && r.track.id === track.id);
-              } else {
-                receiver = {track};
-              }
-              const event = new Event('track');
-              event.track = track;
-              event.receiver = receiver;
-              event.transceiver = {receiver};
-              event.streams = [e.stream];
-              this.dispatchEvent(event);
-            });
-          };
-          this.addEventListener('addstream', this._ontrackpoly);
-        }
-        return origSetRemoteDescription.apply(this, arguments);
-      };
-  } else {
-    // even if RTCRtpTransceiver is in window, it is only used and
-    // emitted in unified-plan. Unfortunately this means we need
-    // to unconditionally wrap the event.
-    utils.wrapPeerConnectionEvent(window, 'track', e => {
-      if (!e.transceiver) {
-        Object.defineProperty(e, 'transceiver',
-          {value: {receiver: e.receiver}});
-      }
-      return e;
-    });
-  }
-}
-
-export function shimGetSendersWithDtmf(window) {
-  // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.
-  if (typeof window === 'object' && window.RTCPeerConnection &&
-      !('getSenders' in window.RTCPeerConnection.prototype) &&
-      'createDTMFSender' in window.RTCPeerConnection.prototype) {
-    const shimSenderWithDtmf = function(pc, track) {
-      return {
-        track,
-        get dtmf() {
-          if (this._dtmf === undefined) {
-            if (track.kind === 'audio') {
-              this._dtmf = pc.createDTMFSender(track);
-            } else {
-              this._dtmf = null;
-            }
-          }
-          return this._dtmf;
-        },
-        _pc: pc
-      };
-    };
-
-    // augment addTrack when getSenders is not available.
-    if (!window.RTCPeerConnection.prototype.getSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        this._senders = this._senders || [];
-        return this._senders.slice(); // return a copy of the internal state.
-      };
-      const origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-      window.RTCPeerConnection.prototype.addTrack =
-        function addTrack(track, stream) {
-          let sender = origAddTrack.apply(this, arguments);
-          if (!sender) {
-            sender = shimSenderWithDtmf(this, track);
-            this._senders.push(sender);
-          }
-          return sender;
-        };
-
-      const origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-      window.RTCPeerConnection.prototype.removeTrack =
-        function removeTrack(sender) {
-          origRemoveTrack.apply(this, arguments);
-          const idx = this._senders.indexOf(sender);
-          if (idx !== -1) {
-            this._senders.splice(idx, 1);
-          }
-        };
-    }
-    const origAddStream = window.RTCPeerConnection.prototype.addStream;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      this._senders = this._senders || [];
-      origAddStream.apply(this, [stream]);
-      stream.getTracks().forEach(track => {
-        this._senders.push(shimSenderWithDtmf(this, track));
-      });
-    };
-
-    const origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-    window.RTCPeerConnection.prototype.removeStream =
-      function removeStream(stream) {
-        this._senders = this._senders || [];
-        origRemoveStream.apply(this, [stream]);
-
-        stream.getTracks().forEach(track => {
-          const sender = this._senders.find(s => s.track === track);
-          if (sender) { // remove sender
-            this._senders.splice(this._senders.indexOf(sender), 1);
-          }
-        });
-      };
-  } else if (typeof window === 'object' && window.RTCPeerConnection &&
-             'getSenders' in window.RTCPeerConnection.prototype &&
-             'createDTMFSender' in window.RTCPeerConnection.prototype &&
-             window.RTCRtpSender &&
-             !('dtmf' in window.RTCRtpSender.prototype)) {
-    const origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      const senders = origGetSenders.apply(this, []);
-      senders.forEach(sender => sender._pc = this);
-      return senders;
-    };
-
-    Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {
-      get() {
-        if (this._dtmf === undefined) {
-          if (this.track.kind === 'audio') {
-            this._dtmf = this._pc.createDTMFSender(this.track);
-          } else {
-            this._dtmf = null;
-          }
-        }
-        return this._dtmf;
-      }
-    });
-  }
-}
-
-export function shimGetStats(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-
-  const origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    const [selector, onSucc, onErr] = arguments;
-
-    // If selector is a function then we are in the old style stats so just
-    // pass back the original getStats format to avoid breaking old users.
-    if (arguments.length > 0 && typeof selector === 'function') {
-      return origGetStats.apply(this, arguments);
-    }
-
-    // When spec-style getStats is supported, return those when called with
-    // either no arguments or the selector argument is null.
-    if (origGetStats.length === 0 && (arguments.length === 0 ||
-        typeof selector !== 'function')) {
-      return origGetStats.apply(this, []);
-    }
-
-    const fixChromeStats_ = function(response) {
-      const standardReport = {};
-      const reports = response.result();
-      reports.forEach(report => {
-        const standardStats = {
-          id: report.id,
-          timestamp: report.timestamp,
-          type: {
-            localcandidate: 'local-candidate',
-            remotecandidate: 'remote-candidate'
-          }[report.type] || report.type
-        };
-        report.names().forEach(name => {
-          standardStats[name] = report.stat(name);
-        });
-        standardReport[standardStats.id] = standardStats;
-      });
-
-      return standardReport;
-    };
-
-    // shim getStats with maplike support
-    const makeMapStats = function(stats) {
-      return new Map(Object.keys(stats).map(key => [key, stats[key]]));
-    };
-
-    if (arguments.length >= 2) {
-      const successCallbackWrapper_ = function(response) {
-        onSucc(makeMapStats(fixChromeStats_(response)));
-      };
-
-      return origGetStats.apply(this, [successCallbackWrapper_,
-        selector]);
-    }
-
-    // promise-support
-    return new Promise((resolve, reject) => {
-      origGetStats.apply(this, [
-        function(response) {
-          resolve(makeMapStats(fixChromeStats_(response)));
-        }, reject]);
-    }).then(onSucc, onErr);
-  };
-}
-
-export function shimSenderReceiverGetStats(window) {
-  if (!(typeof window === 'object' && window.RTCPeerConnection &&
-      window.RTCRtpSender && window.RTCRtpReceiver)) {
-    return;
-  }
-
-  // shim sender stats.
-  if (!('getStats' in window.RTCRtpSender.prototype)) {
-    const origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-    if (origGetSenders) {
-      window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-        const senders = origGetSenders.apply(this, []);
-        senders.forEach(sender => sender._pc = this);
-        return senders;
-      };
-    }
-
-    const origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-    if (origAddTrack) {
-      window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-        const sender = origAddTrack.apply(this, arguments);
-        sender._pc = this;
-        return sender;
-      };
-    }
-    window.RTCRtpSender.prototype.getStats = function getStats() {
-      const sender = this;
-      return this._pc.getStats().then(result =>
-        /* Note: this will include stats of all senders that
-         *   send a track with the same id as sender.track as
-         *   it is not possible to identify the RTCRtpSender.
-         */
-        utils.filterStats(result, sender.track, true));
-    };
-  }
-
-  // shim receiver stats.
-  if (!('getStats' in window.RTCRtpReceiver.prototype)) {
-    const origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-    if (origGetReceivers) {
-      window.RTCPeerConnection.prototype.getReceivers =
-        function getReceivers() {
-          const receivers = origGetReceivers.apply(this, []);
-          receivers.forEach(receiver => receiver._pc = this);
-          return receivers;
-        };
-    }
-    utils.wrapPeerConnectionEvent(window, 'track', e => {
-      e.receiver._pc = e.srcElement;
-      return e;
-    });
-    window.RTCRtpReceiver.prototype.getStats = function getStats() {
-      const receiver = this;
-      return this._pc.getStats().then(result =>
-        utils.filterStats(result, receiver.track, false));
-    };
-  }
-
-  if (!('getStats' in window.RTCRtpSender.prototype &&
-      'getStats' in window.RTCRtpReceiver.prototype)) {
-    return;
-  }
-
-  // shim RTCPeerConnection.getStats(track).
-  const origGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    if (arguments.length > 0 &&
-        arguments[0] instanceof window.MediaStreamTrack) {
-      const track = arguments[0];
-      let sender;
-      let receiver;
-      let err;
-      this.getSenders().forEach(s => {
-        if (s.track === track) {
-          if (sender) {
-            err = true;
-          } else {
-            sender = s;
-          }
-        }
-      });
-      this.getReceivers().forEach(r => {
-        if (r.track === track) {
-          if (receiver) {
-            err = true;
-          } else {
-            receiver = r;
-          }
-        }
-        return r.track === track;
-      });
-      if (err || (sender && receiver)) {
-        return Promise.reject(new DOMException(
-          'There are more than one sender or receiver for the track.',
-          'InvalidAccessError'));
-      } else if (sender) {
-        return sender.getStats();
-      } else if (receiver) {
-        return receiver.getStats();
-      }
-      return Promise.reject(new DOMException(
-        'There is no sender or receiver for the track.',
-        'InvalidAccessError'));
-    }
-    return origGetStats.apply(this, arguments);
-  };
-}
-
-export function shimAddTrackRemoveTrackWithNative(window) {
-  // shim addTrack/removeTrack with native variants in order to make
-  // the interactions with legacy getLocalStreams behave as in other browsers.
-  // Keeps a mapping stream.id => [stream, rtpsenders...]
-  window.RTCPeerConnection.prototype.getLocalStreams =
-    function getLocalStreams() {
-      this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-      return Object.keys(this._shimmedLocalStreams)
-        .map(streamId => this._shimmedLocalStreams[streamId][0]);
-    };
-
-  const origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  window.RTCPeerConnection.prototype.addTrack =
-    function addTrack(track, stream) {
-      if (!stream) {
-        return origAddTrack.apply(this, arguments);
-      }
-      this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-
-      const sender = origAddTrack.apply(this, arguments);
-      if (!this._shimmedLocalStreams[stream.id]) {
-        this._shimmedLocalStreams[stream.id] = [stream, sender];
-      } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) {
-        this._shimmedLocalStreams[stream.id].push(sender);
-      }
-      return sender;
-    };
-
-  const origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-
-    stream.getTracks().forEach(track => {
-      const alreadyExists = this.getSenders().find(s => s.track === track);
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.',
-          'InvalidAccessError');
-      }
-    });
-    const existingSenders = this.getSenders();
-    origAddStream.apply(this, arguments);
-    const newSenders = this.getSenders()
-      .filter(newSender => existingSenders.indexOf(newSender) === -1);
-    this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders);
-  };
-
-  const origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream =
-    function removeStream(stream) {
-      this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-      delete this._shimmedLocalStreams[stream.id];
-      return origRemoveStream.apply(this, arguments);
-    };
-
-  const origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
-  window.RTCPeerConnection.prototype.removeTrack =
-    function removeTrack(sender) {
-      this._shimmedLocalStreams = this._shimmedLocalStreams || {};
-      if (sender) {
-        Object.keys(this._shimmedLocalStreams).forEach(streamId => {
-          const idx = this._shimmedLocalStreams[streamId].indexOf(sender);
-          if (idx !== -1) {
-            this._shimmedLocalStreams[streamId].splice(idx, 1);
-          }
-          if (this._shimmedLocalStreams[streamId].length === 1) {
-            delete this._shimmedLocalStreams[streamId];
-          }
-        });
-      }
-      return origRemoveTrack.apply(this, arguments);
-    };
-}
-
-export function shimAddTrackRemoveTrack(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // shim addTrack and removeTrack.
-  if (window.RTCPeerConnection.prototype.addTrack &&
-      browserDetails.version >= 65) {
-    return shimAddTrackRemoveTrackWithNative(window);
-  }
-
-  // also shim pc.getLocalStreams when addTrack is shimmed
-  // to return the original streams.
-  const origGetLocalStreams = window.RTCPeerConnection.prototype
-    .getLocalStreams;
-  window.RTCPeerConnection.prototype.getLocalStreams =
-    function getLocalStreams() {
-      const nativeStreams = origGetLocalStreams.apply(this);
-      this._reverseStreams = this._reverseStreams || {};
-      return nativeStreams.map(stream => this._reverseStreams[stream.id]);
-    };
-
-  const origAddStream = window.RTCPeerConnection.prototype.addStream;
-  window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-    this._streams = this._streams || {};
-    this._reverseStreams = this._reverseStreams || {};
-
-    stream.getTracks().forEach(track => {
-      const alreadyExists = this.getSenders().find(s => s.track === track);
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.',
-          'InvalidAccessError');
-      }
-    });
-    // Add identity mapping for consistency with addTrack.
-    // Unless this is being used with a stream from addTrack.
-    if (!this._reverseStreams[stream.id]) {
-      const newStream = new window.MediaStream(stream.getTracks());
-      this._streams[stream.id] = newStream;
-      this._reverseStreams[newStream.id] = stream;
-      stream = newStream;
-    }
-    origAddStream.apply(this, [stream]);
-  };
-
-  const origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
-  window.RTCPeerConnection.prototype.removeStream =
-    function removeStream(stream) {
-      this._streams = this._streams || {};
-      this._reverseStreams = this._reverseStreams || {};
-
-      origRemoveStream.apply(this, [(this._streams[stream.id] || stream)]);
-      delete this._reverseStreams[(this._streams[stream.id] ?
-        this._streams[stream.id].id : stream.id)];
-      delete this._streams[stream.id];
-    };
-
-  window.RTCPeerConnection.prototype.addTrack =
-    function addTrack(track, stream) {
-      if (this.signalingState === 'closed') {
-        throw new DOMException(
-          'The RTCPeerConnection\'s signalingState is \'closed\'.',
-          'InvalidStateError');
-      }
-      const streams = [].slice.call(arguments, 1);
-      if (streams.length !== 1 ||
-          !streams[0].getTracks().find(t => t === track)) {
-        // this is not fully correct but all we can manage without
-        // [[associated MediaStreams]] internal slot.
-        throw new DOMException(
-          'The adapter.js addTrack polyfill only supports a single ' +
-          ' stream which is associated with the specified track.',
-          'NotSupportedError');
-      }
-
-      const alreadyExists = this.getSenders().find(s => s.track === track);
-      if (alreadyExists) {
-        throw new DOMException('Track already exists.',
-          'InvalidAccessError');
-      }
-
-      this._streams = this._streams || {};
-      this._reverseStreams = this._reverseStreams || {};
-      const oldStream = this._streams[stream.id];
-      if (oldStream) {
-        // this is using odd Chrome behaviour, use with caution:
-        // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815
-        // Note: we rely on the high-level addTrack/dtmf shim to
-        // create the sender with a dtmf sender.
-        oldStream.addTrack(track);
-
-        // Trigger ONN async.
-        Promise.resolve().then(() => {
-          this.dispatchEvent(new Event('negotiationneeded'));
-        });
-      } else {
-        const newStream = new window.MediaStream([track]);
-        this._streams[stream.id] = newStream;
-        this._reverseStreams[newStream.id] = stream;
-        this.addStream(newStream);
-      }
-      return this.getSenders().find(s => s.track === track);
-    };
-
-  // replace the internal stream id with the external one and
-  // vice versa.
-  function replaceInternalStreamId(pc, description) {
-    let sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(internalId => {
-      const externalStream = pc._reverseStreams[internalId];
-      const internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(internalStream.id, 'g'),
-        externalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp
-    });
-  }
-  function replaceExternalStreamId(pc, description) {
-    let sdp = description.sdp;
-    Object.keys(pc._reverseStreams || []).forEach(internalId => {
-      const externalStream = pc._reverseStreams[internalId];
-      const internalStream = pc._streams[externalStream.id];
-      sdp = sdp.replace(new RegExp(externalStream.id, 'g'),
-        internalStream.id);
-    });
-    return new RTCSessionDescription({
-      type: description.type,
-      sdp
-    });
-  }
-  ['createOffer', 'createAnswer'].forEach(function(method) {
-    const nativeMethod = window.RTCPeerConnection.prototype[method];
-    const methodObj = {[method]() {
-      const args = arguments;
-      const isLegacyCall = arguments.length &&
-          typeof arguments[0] === 'function';
-      if (isLegacyCall) {
-        return nativeMethod.apply(this, [
-          (description) => {
-            const desc = replaceInternalStreamId(this, description);
-            args[0].apply(null, [desc]);
-          },
-          (err) => {
-            if (args[1]) {
-              args[1].apply(null, err);
-            }
-          }, arguments[2]
-        ]);
-      }
-      return nativeMethod.apply(this, arguments)
-        .then(description => replaceInternalStreamId(this, description));
-    }};
-    window.RTCPeerConnection.prototype[method] = methodObj[method];
-  });
-
-  const origSetLocalDescription =
-      window.RTCPeerConnection.prototype.setLocalDescription;
-  window.RTCPeerConnection.prototype.setLocalDescription =
-    function setLocalDescription() {
-      if (!arguments.length || !arguments[0].type) {
-        return origSetLocalDescription.apply(this, arguments);
-      }
-      arguments[0] = replaceExternalStreamId(this, arguments[0]);
-      return origSetLocalDescription.apply(this, arguments);
-    };
-
-  // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier
-
-  const origLocalDescription = Object.getOwnPropertyDescriptor(
-    window.RTCPeerConnection.prototype, 'localDescription');
-  Object.defineProperty(window.RTCPeerConnection.prototype,
-    'localDescription', {
-      get() {
-        const description = origLocalDescription.get.apply(this);
-        if (description.type === '') {
-          return description;
-        }
-        return replaceInternalStreamId(this, description);
-      }
-    });
-
-  window.RTCPeerConnection.prototype.removeTrack =
-    function removeTrack(sender) {
-      if (this.signalingState === 'closed') {
-        throw new DOMException(
-          'The RTCPeerConnection\'s signalingState is \'closed\'.',
-          'InvalidStateError');
-      }
-      // We can not yet check for sender instanceof RTCRtpSender
-      // since we shim RTPSender. So we check if sender._pc is set.
-      if (!sender._pc) {
-        throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' +
-            'does not implement interface RTCRtpSender.', 'TypeError');
-      }
-      const isLocal = sender._pc === this;
-      if (!isLocal) {
-        throw new DOMException('Sender was not created by this connection.',
-          'InvalidAccessError');
-      }
-
-      // Search for the native stream the senders track belongs to.
-      this._streams = this._streams || {};
-      let stream;
-      Object.keys(this._streams).forEach(streamid => {
-        const hasTrack = this._streams[streamid].getTracks()
-          .find(track => sender.track === track);
-        if (hasTrack) {
-          stream = this._streams[streamid];
-        }
-      });
-
-      if (stream) {
-        if (stream.getTracks().length === 1) {
-          // if this is the last track of the stream, remove the stream. This
-          // takes care of any shimmed _senders.
-          this.removeStream(this._reverseStreams[stream.id]);
-        } else {
-          // relying on the same odd chrome behaviour as above.
-          stream.removeTrack(sender.track);
-        }
-        this.dispatchEvent(new Event('negotiationneeded'));
-      }
-    };
-}
-
-export function shimPeerConnection(window, browserDetails) {
-  if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.webkitRTCPeerConnection;
-  }
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-
-  // shim implicit creation of RTCSessionDescription/RTCIceCandidate
-  if (browserDetails.version < 53) {
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']
-      .forEach(function(method) {
-        const nativeMethod = window.RTCPeerConnection.prototype[method];
-        const methodObj = {[method]() {
-          arguments[0] = new ((method === 'addIceCandidate') ?
-            window.RTCIceCandidate :
-            window.RTCSessionDescription)(arguments[0]);
-          return nativeMethod.apply(this, arguments);
-        }};
-        window.RTCPeerConnection.prototype[method] = methodObj[method];
-      });
-  }
-}
-
-// Attempt to fix ONN in plan-b mode.
-export function fixNegotiationNeeded(window, browserDetails) {
-  utils.wrapPeerConnectionEvent(window, 'negotiationneeded', e => {
-    const pc = e.target;
-    if (browserDetails.version < 72 || (pc.getConfiguration &&
-        pc.getConfiguration().sdpSemantics === 'plan-b')) {
-      if (pc.signalingState !== 'stable') {
-        return;
-      }
-    }
-    return e;
-  });
-}

+ 0 - 50
node_modules/webrtc-adapter/src/js/chrome/getdisplaymedia.js

@@ -1,50 +0,0 @@
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-export function shimGetDisplayMedia(window, getSourceId) {
-  if (window.navigator.mediaDevices &&
-    'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!(window.navigator.mediaDevices)) {
-    return;
-  }
-  // getSourceId is a function that returns a promise resolving with
-  // the sourceId of the screen/window/tab to be shared.
-  if (typeof getSourceId !== 'function') {
-    console.error('shimGetDisplayMedia: getSourceId argument is not ' +
-        'a function');
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia =
-    function getDisplayMedia(constraints) {
-      return getSourceId(constraints)
-        .then(sourceId => {
-          const widthSpecified = constraints.video && constraints.video.width;
-          const heightSpecified = constraints.video &&
-            constraints.video.height;
-          const frameRateSpecified = constraints.video &&
-            constraints.video.frameRate;
-          constraints.video = {
-            mandatory: {
-              chromeMediaSource: 'desktop',
-              chromeMediaSourceId: sourceId,
-              maxFrameRate: frameRateSpecified || 3
-            }
-          };
-          if (widthSpecified) {
-            constraints.video.mandatory.maxWidth = widthSpecified;
-          }
-          if (heightSpecified) {
-            constraints.video.mandatory.maxHeight = heightSpecified;
-          }
-          return window.navigator.mediaDevices.getUserMedia(constraints);
-        });
-    };
-}

+ 0 - 189
node_modules/webrtc-adapter/src/js/chrome/getusermedia.js

@@ -1,189 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-import * as utils from '../utils.js';
-const logging = utils.log;
-
-export function shimGetUserMedia(window, browserDetails) {
-  const navigator = window && window.navigator;
-
-  if (!navigator.mediaDevices) {
-    return;
-  }
-
-  const constraintsToChrome_ = function(c) {
-    if (typeof c !== 'object' || c.mandatory || c.optional) {
-      return c;
-    }
-    const cc = {};
-    Object.keys(c).forEach(key => {
-      if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
-        return;
-      }
-      const r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]};
-      if (r.exact !== undefined && typeof r.exact === 'number') {
-        r.min = r.max = r.exact;
-      }
-      const oldname_ = function(prefix, name) {
-        if (prefix) {
-          return prefix + name.charAt(0).toUpperCase() + name.slice(1);
-        }
-        return (name === 'deviceId') ? 'sourceId' : name;
-      };
-      if (r.ideal !== undefined) {
-        cc.optional = cc.optional || [];
-        let oc = {};
-        if (typeof r.ideal === 'number') {
-          oc[oldname_('min', key)] = r.ideal;
-          cc.optional.push(oc);
-          oc = {};
-          oc[oldname_('max', key)] = r.ideal;
-          cc.optional.push(oc);
-        } else {
-          oc[oldname_('', key)] = r.ideal;
-          cc.optional.push(oc);
-        }
-      }
-      if (r.exact !== undefined && typeof r.exact !== 'number') {
-        cc.mandatory = cc.mandatory || {};
-        cc.mandatory[oldname_('', key)] = r.exact;
-      } else {
-        ['min', 'max'].forEach(mix => {
-          if (r[mix] !== undefined) {
-            cc.mandatory = cc.mandatory || {};
-            cc.mandatory[oldname_(mix, key)] = r[mix];
-          }
-        });
-      }
-    });
-    if (c.advanced) {
-      cc.optional = (cc.optional || []).concat(c.advanced);
-    }
-    return cc;
-  };
-
-  const shimConstraints_ = function(constraints, func) {
-    if (browserDetails.version >= 61) {
-      return func(constraints);
-    }
-    constraints = JSON.parse(JSON.stringify(constraints));
-    if (constraints && typeof constraints.audio === 'object') {
-      const remap = function(obj, a, b) {
-        if (a in obj && !(b in obj)) {
-          obj[b] = obj[a];
-          delete obj[a];
-        }
-      };
-      constraints = JSON.parse(JSON.stringify(constraints));
-      remap(constraints.audio, 'autoGainControl', 'googAutoGainControl');
-      remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression');
-      constraints.audio = constraintsToChrome_(constraints.audio);
-    }
-    if (constraints && typeof constraints.video === 'object') {
-      // Shim facingMode for mobile & surface pro.
-      let face = constraints.video.facingMode;
-      face = face && ((typeof face === 'object') ? face : {ideal: face});
-      const getSupportedFacingModeLies = browserDetails.version < 66;
-
-      if ((face && (face.exact === 'user' || face.exact === 'environment' ||
-                    face.ideal === 'user' || face.ideal === 'environment')) &&
-          !(navigator.mediaDevices.getSupportedConstraints &&
-            navigator.mediaDevices.getSupportedConstraints().facingMode &&
-            !getSupportedFacingModeLies)) {
-        delete constraints.video.facingMode;
-        let matches;
-        if (face.exact === 'environment' || face.ideal === 'environment') {
-          matches = ['back', 'rear'];
-        } else if (face.exact === 'user' || face.ideal === 'user') {
-          matches = ['front'];
-        }
-        if (matches) {
-          // Look for matches in label, or use last cam for back (typical).
-          return navigator.mediaDevices.enumerateDevices()
-            .then(devices => {
-              devices = devices.filter(d => d.kind === 'videoinput');
-              let dev = devices.find(d => matches.some(match =>
-                d.label.toLowerCase().includes(match)));
-              if (!dev && devices.length && matches.includes('back')) {
-                dev = devices[devices.length - 1]; // more likely the back cam
-              }
-              if (dev) {
-                constraints.video.deviceId = face.exact
-                  ? {exact: dev.deviceId}
-                  : {ideal: dev.deviceId};
-              }
-              constraints.video = constraintsToChrome_(constraints.video);
-              logging('chrome: ' + JSON.stringify(constraints));
-              return func(constraints);
-            });
-        }
-      }
-      constraints.video = constraintsToChrome_(constraints.video);
-    }
-    logging('chrome: ' + JSON.stringify(constraints));
-    return func(constraints);
-  };
-
-  const shimError_ = function(e) {
-    if (browserDetails.version >= 64) {
-      return e;
-    }
-    return {
-      name: {
-        PermissionDeniedError: 'NotAllowedError',
-        PermissionDismissedError: 'NotAllowedError',
-        InvalidStateError: 'NotAllowedError',
-        DevicesNotFoundError: 'NotFoundError',
-        ConstraintNotSatisfiedError: 'OverconstrainedError',
-        TrackStartError: 'NotReadableError',
-        MediaDeviceFailedDueToShutdown: 'NotAllowedError',
-        MediaDeviceKillSwitchOn: 'NotAllowedError',
-        TabCaptureError: 'AbortError',
-        ScreenCaptureError: 'AbortError',
-        DeviceCaptureError: 'AbortError'
-      }[e.name] || e.name,
-      message: e.message,
-      constraint: e.constraint || e.constraintName,
-      toString() {
-        return this.name + (this.message && ': ') + this.message;
-      }
-    };
-  };
-
-  const getUserMedia_ = function(constraints, onSuccess, onError) {
-    shimConstraints_(constraints, c => {
-      navigator.webkitGetUserMedia(c, onSuccess, e => {
-        if (onError) {
-          onError(shimError_(e));
-        }
-      });
-    });
-  };
-  navigator.getUserMedia = getUserMedia_.bind(navigator);
-
-  // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia
-  // function which returns a Promise, it does not accept spec-style
-  // constraints.
-  if (navigator.mediaDevices.getUserMedia) {
-    const origGetUserMedia = navigator.mediaDevices.getUserMedia.
-      bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function(cs) {
-      return shimConstraints_(cs, c => origGetUserMedia(c).then(stream => {
-        if (c.audio && !stream.getAudioTracks().length ||
-            c.video && !stream.getVideoTracks().length) {
-          stream.getTracks().forEach(track => {
-            track.stop();
-          });
-          throw new DOMException('', 'NotFoundError');
-        }
-        return stream;
-      }, e => Promise.reject(shimError_(e))));
-    };
-  }
-}

+ 0 - 462
node_modules/webrtc-adapter/src/js/common_shim.js

@@ -1,462 +0,0 @@
-/*
- *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-import SDPUtils from 'sdp';
-import * as utils from './utils';
-
-export function shimRTCIceCandidate(window) {
-  // foundation is arbitrarily chosen as an indicator for full support for
-  // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
-  if (!window.RTCIceCandidate || (window.RTCIceCandidate && 'foundation' in
-      window.RTCIceCandidate.prototype)) {
-    return;
-  }
-
-  const NativeRTCIceCandidate = window.RTCIceCandidate;
-  window.RTCIceCandidate = function RTCIceCandidate(args) {
-    // Remove the a= which shouldn't be part of the candidate string.
-    if (typeof args === 'object' && args.candidate &&
-        args.candidate.indexOf('a=') === 0) {
-      args = JSON.parse(JSON.stringify(args));
-      args.candidate = args.candidate.substring(2);
-    }
-
-    if (args.candidate && args.candidate.length) {
-      // Augment the native candidate with the parsed fields.
-      const nativeCandidate = new NativeRTCIceCandidate(args);
-      const parsedCandidate = SDPUtils.parseCandidate(args.candidate);
-      for (const key in parsedCandidate) {
-        if (!(key in nativeCandidate)) {
-          Object.defineProperty(nativeCandidate, key,
-            {value: parsedCandidate[key]});
-        }
-      }
-
-      // Override serializer to not serialize the extra attributes.
-      nativeCandidate.toJSON = function toJSON() {
-        return {
-          candidate: nativeCandidate.candidate,
-          sdpMid: nativeCandidate.sdpMid,
-          sdpMLineIndex: nativeCandidate.sdpMLineIndex,
-          usernameFragment: nativeCandidate.usernameFragment,
-        };
-      };
-      return nativeCandidate;
-    }
-    return new NativeRTCIceCandidate(args);
-  };
-  window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', e => {
-    if (e.candidate) {
-      Object.defineProperty(e, 'candidate', {
-        value: new window.RTCIceCandidate(e.candidate),
-        writable: 'false'
-      });
-    }
-    return e;
-  });
-}
-
-export function shimRTCIceCandidateRelayProtocol(window) {
-  if (!window.RTCIceCandidate || (window.RTCIceCandidate && 'relayProtocol' in
-      window.RTCIceCandidate.prototype)) {
-    return;
-  }
-
-  // Hook up the augmented candidate in onicecandidate and
-  // addEventListener('icecandidate', ...)
-  utils.wrapPeerConnectionEvent(window, 'icecandidate', e => {
-    if (e.candidate) {
-      const parsedCandidate = SDPUtils.parseCandidate(e.candidate.candidate);
-      if (parsedCandidate.type === 'relay') {
-        // This is a libwebrtc-specific mapping of local type preference
-        // to relayProtocol.
-        e.candidate.relayProtocol = {
-          0: 'tls',
-          1: 'tcp',
-          2: 'udp',
-        }[parsedCandidate.priority >> 24];
-      }
-    }
-    return e;
-  });
-}
-
-export function shimMaxMessageSize(window, browserDetails) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-
-  if (!('sctp' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {
-      get() {
-        return typeof this._sctp === 'undefined' ? null : this._sctp;
-      }
-    });
-  }
-
-  const sctpInDescription = function(description) {
-    if (!description || !description.sdp) {
-      return false;
-    }
-    const sections = SDPUtils.splitSections(description.sdp);
-    sections.shift();
-    return sections.some(mediaSection => {
-      const mLine = SDPUtils.parseMLine(mediaSection);
-      return mLine && mLine.kind === 'application'
-          && mLine.protocol.indexOf('SCTP') !== -1;
-    });
-  };
-
-  const getRemoteFirefoxVersion = function(description) {
-    // TODO: Is there a better solution for detecting Firefox?
-    const match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);
-    if (match === null || match.length < 2) {
-      return -1;
-    }
-    const version = parseInt(match[1], 10);
-    // Test for NaN (yes, this is ugly)
-    return version !== version ? -1 : version;
-  };
-
-  const getCanSendMaxMessageSize = function(remoteIsFirefox) {
-    // Every implementation we know can send at least 64 KiB.
-    // Note: Although Chrome is technically able to send up to 256 KiB, the
-    //       data does not reach the other peer reliably.
-    //       See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419
-    let canSendMaxMessageSize = 65536;
-    if (browserDetails.browser === 'firefox') {
-      if (browserDetails.version < 57) {
-        if (remoteIsFirefox === -1) {
-          // FF < 57 will send in 16 KiB chunks using the deprecated PPID
-          // fragmentation.
-          canSendMaxMessageSize = 16384;
-        } else {
-          // However, other FF (and RAWRTC) can reassemble PPID-fragmented
-          // messages. Thus, supporting ~2 GiB when sending.
-          canSendMaxMessageSize = 2147483637;
-        }
-      } else if (browserDetails.version < 60) {
-        // Currently, all FF >= 57 will reset the remote maximum message size
-        // to the default value when a data channel is created at a later
-        // stage. :(
-        // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-        canSendMaxMessageSize =
-          browserDetails.version === 57 ? 65535 : 65536;
-      } else {
-        // FF >= 60 supports sending ~2 GiB
-        canSendMaxMessageSize = 2147483637;
-      }
-    }
-    return canSendMaxMessageSize;
-  };
-
-  const getMaxMessageSize = function(description, remoteIsFirefox) {
-    // Note: 65536 bytes is the default value from the SDP spec. Also,
-    //       every implementation we know supports receiving 65536 bytes.
-    let maxMessageSize = 65536;
-
-    // FF 57 has a slightly incorrect default remote max message size, so
-    // we need to adjust it here to avoid a failure when sending.
-    // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697
-    if (browserDetails.browser === 'firefox'
-         && browserDetails.version === 57) {
-      maxMessageSize = 65535;
-    }
-
-    const match = SDPUtils.matchPrefix(description.sdp,
-      'a=max-message-size:');
-    if (match.length > 0) {
-      maxMessageSize = parseInt(match[0].substring(19), 10);
-    } else if (browserDetails.browser === 'firefox' &&
-                remoteIsFirefox !== -1) {
-      // If the maximum message size is not present in the remote SDP and
-      // both local and remote are Firefox, the remote peer can receive
-      // ~2 GiB.
-      maxMessageSize = 2147483637;
-    }
-    return maxMessageSize;
-  };
-
-  const origSetRemoteDescription =
-      window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription =
-    function setRemoteDescription() {
-      this._sctp = null;
-      // Chrome decided to not expose .sctp in plan-b mode.
-      // As usual, adapter.js has to do an 'ugly worakaround'
-      // to cover up the mess.
-      if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) {
-        const {sdpSemantics} = this.getConfiguration();
-        if (sdpSemantics === 'plan-b') {
-          Object.defineProperty(this, 'sctp', {
-            get() {
-              return typeof this._sctp === 'undefined' ? null : this._sctp;
-            },
-            enumerable: true,
-            configurable: true,
-          });
-        }
-      }
-
-      if (sctpInDescription(arguments[0])) {
-        // Check if the remote is FF.
-        const isFirefox = getRemoteFirefoxVersion(arguments[0]);
-
-        // Get the maximum message size the local peer is capable of sending
-        const canSendMMS = getCanSendMaxMessageSize(isFirefox);
-
-        // Get the maximum message size of the remote peer.
-        const remoteMMS = getMaxMessageSize(arguments[0], isFirefox);
-
-        // Determine final maximum message size
-        let maxMessageSize;
-        if (canSendMMS === 0 && remoteMMS === 0) {
-          maxMessageSize = Number.POSITIVE_INFINITY;
-        } else if (canSendMMS === 0 || remoteMMS === 0) {
-          maxMessageSize = Math.max(canSendMMS, remoteMMS);
-        } else {
-          maxMessageSize = Math.min(canSendMMS, remoteMMS);
-        }
-
-        // Create a dummy RTCSctpTransport object and the 'maxMessageSize'
-        // attribute.
-        const sctp = {};
-        Object.defineProperty(sctp, 'maxMessageSize', {
-          get() {
-            return maxMessageSize;
-          }
-        });
-        this._sctp = sctp;
-      }
-
-      return origSetRemoteDescription.apply(this, arguments);
-    };
-}
-
-export function shimSendThrowTypeError(window) {
-  if (!(window.RTCPeerConnection &&
-      'createDataChannel' in window.RTCPeerConnection.prototype)) {
-    return;
-  }
-
-  // Note: Although Firefox >= 57 has a native implementation, the maximum
-  //       message size can be reset for all data channels at a later stage.
-  //       See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
-
-  function wrapDcSend(dc, pc) {
-    const origDataChannelSend = dc.send;
-    dc.send = function send() {
-      const data = arguments[0];
-      const length = data.length || data.size || data.byteLength;
-      if (dc.readyState === 'open' &&
-          pc.sctp && length > pc.sctp.maxMessageSize) {
-        throw new TypeError('Message too large (can send a maximum of ' +
-          pc.sctp.maxMessageSize + ' bytes)');
-      }
-      return origDataChannelSend.apply(dc, arguments);
-    };
-  }
-  const origCreateDataChannel =
-    window.RTCPeerConnection.prototype.createDataChannel;
-  window.RTCPeerConnection.prototype.createDataChannel =
-    function createDataChannel() {
-      const dataChannel = origCreateDataChannel.apply(this, arguments);
-      wrapDcSend(dataChannel, this);
-      return dataChannel;
-    };
-  utils.wrapPeerConnectionEvent(window, 'datachannel', e => {
-    wrapDcSend(e.channel, e.target);
-    return e;
-  });
-}
-
-
-/* shims RTCConnectionState by pretending it is the same as iceConnectionState.
- * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12
- * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect
- * since DTLS failures would be hidden. See
- * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827
- * for the Firefox tracking bug.
- */
-export function shimConnectionState(window) {
-  if (!window.RTCPeerConnection ||
-      'connectionState' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  const proto = window.RTCPeerConnection.prototype;
-  Object.defineProperty(proto, 'connectionState', {
-    get() {
-      return {
-        completed: 'connected',
-        checking: 'connecting'
-      }[this.iceConnectionState] || this.iceConnectionState;
-    },
-    enumerable: true,
-    configurable: true
-  });
-  Object.defineProperty(proto, 'onconnectionstatechange', {
-    get() {
-      return this._onconnectionstatechange || null;
-    },
-    set(cb) {
-      if (this._onconnectionstatechange) {
-        this.removeEventListener('connectionstatechange',
-          this._onconnectionstatechange);
-        delete this._onconnectionstatechange;
-      }
-      if (cb) {
-        this.addEventListener('connectionstatechange',
-          this._onconnectionstatechange = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-
-  ['setLocalDescription', 'setRemoteDescription'].forEach((method) => {
-    const origMethod = proto[method];
-    proto[method] = function() {
-      if (!this._connectionstatechangepoly) {
-        this._connectionstatechangepoly = e => {
-          const pc = e.target;
-          if (pc._lastConnectionState !== pc.connectionState) {
-            pc._lastConnectionState = pc.connectionState;
-            const newEvent = new Event('connectionstatechange', e);
-            pc.dispatchEvent(newEvent);
-          }
-          return e;
-        };
-        this.addEventListener('iceconnectionstatechange',
-          this._connectionstatechangepoly);
-      }
-      return origMethod.apply(this, arguments);
-    };
-  });
-}
-
-export function removeExtmapAllowMixed(window, browserDetails) {
-  /* remove a=extmap-allow-mixed for webrtc.org < M71 */
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) {
-    return;
-  }
-  if (browserDetails.browser === 'safari' && browserDetails.version >= 605) {
-    return;
-  }
-  const nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription;
-  window.RTCPeerConnection.prototype.setRemoteDescription =
-  function setRemoteDescription(desc) {
-    if (desc && desc.sdp && desc.sdp.indexOf('\na=extmap-allow-mixed') !== -1) {
-      const sdp = desc.sdp.split('\n').filter((line) => {
-        return line.trim() !== 'a=extmap-allow-mixed';
-      }).join('\n');
-      // Safari enforces read-only-ness of RTCSessionDescription fields.
-      if (window.RTCSessionDescription &&
-          desc instanceof window.RTCSessionDescription) {
-        arguments[0] = new window.RTCSessionDescription({
-          type: desc.type,
-          sdp,
-        });
-      } else {
-        desc.sdp = sdp;
-      }
-    }
-    return nativeSRD.apply(this, arguments);
-  };
-}
-
-export function shimAddIceCandidateNullOrEmpty(window, browserDetails) {
-  // Support for addIceCandidate(null or undefined)
-  // as well as addIceCandidate({candidate: "", ...})
-  // https://bugs.chromium.org/p/chromium/issues/detail?id=978582
-  // Note: must be called before other polyfills which change the signature.
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  const nativeAddIceCandidate =
-      window.RTCPeerConnection.prototype.addIceCandidate;
-  if (!nativeAddIceCandidate || nativeAddIceCandidate.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.addIceCandidate =
-    function addIceCandidate() {
-      if (!arguments[0]) {
-        if (arguments[1]) {
-          arguments[1].apply(null);
-        }
-        return Promise.resolve();
-      }
-      // Firefox 68+ emits and processes {candidate: "", ...}, ignore
-      // in older versions.
-      // Native support for ignoring exists for Chrome M77+.
-      // Safari ignores as well, exact version unknown but works in the same
-      // version that also ignores addIceCandidate(null).
-      if (((browserDetails.browser === 'chrome' && browserDetails.version < 78)
-           || (browserDetails.browser === 'firefox'
-               && browserDetails.version < 68)
-           || (browserDetails.browser === 'safari'))
-          && arguments[0] && arguments[0].candidate === '') {
-        return Promise.resolve();
-      }
-      return nativeAddIceCandidate.apply(this, arguments);
-    };
-}
-
-// Note: Make sure to call this ahead of APIs that modify
-// setLocalDescription.length
-export function shimParameterlessSetLocalDescription(window, browserDetails) {
-  if (!(window.RTCPeerConnection && window.RTCPeerConnection.prototype)) {
-    return;
-  }
-  const nativeSetLocalDescription =
-      window.RTCPeerConnection.prototype.setLocalDescription;
-  if (!nativeSetLocalDescription || nativeSetLocalDescription.length === 0) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.setLocalDescription =
-    function setLocalDescription() {
-      let desc = arguments[0] || {};
-      if (typeof desc !== 'object' || (desc.type && desc.sdp)) {
-        return nativeSetLocalDescription.apply(this, arguments);
-      }
-      // The remaining steps should technically happen when SLD comes off the
-      // RTCPeerConnection's operations chain (not ahead of going on it), but
-      // this is too difficult to shim. Instead, this shim only covers the
-      // common case where the operations chain is empty. This is imperfect, but
-      // should cover many cases. Rationale: Even if we can't reduce the glare
-      // window to zero on imperfect implementations, there's value in tapping
-      // into the perfect negotiation pattern that several browsers support.
-      desc = {type: desc.type, sdp: desc.sdp};
-      if (!desc.type) {
-        switch (this.signalingState) {
-          case 'stable':
-          case 'have-local-offer':
-          case 'have-remote-pranswer':
-            desc.type = 'offer';
-            break;
-          default:
-            desc.type = 'answer';
-            break;
-        }
-      }
-      if (desc.sdp || (desc.type !== 'offer' && desc.type !== 'answer')) {
-        return nativeSetLocalDescription.apply(this, [desc]);
-      }
-      const func = desc.type === 'offer' ? this.createOffer : this.createAnswer;
-      return func.apply(this)
-        .then(d => nativeSetLocalDescription.apply(this, [d]));
-    };
-}

+ 0 - 300
node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js

@@ -1,300 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-import * as utils from '../utils';
-export {shimGetUserMedia} from './getusermedia';
-export {shimGetDisplayMedia} from './getdisplaymedia';
-
-export function shimOnTrack(window) {
-  if (typeof window === 'object' && window.RTCTrackEvent &&
-      ('receiver' in window.RTCTrackEvent.prototype) &&
-      !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get() {
-        return {receiver: this.receiver};
-      }
-    });
-  }
-}
-
-export function shimPeerConnection(window, browserDetails) {
-  if (typeof window !== 'object' ||
-      !(window.RTCPeerConnection || window.mozRTCPeerConnection)) {
-    return; // probably media.peerconnection.enabled=false in about:config
-  }
-  if (!window.RTCPeerConnection && window.mozRTCPeerConnection) {
-    // very basic support for old versions.
-    window.RTCPeerConnection = window.mozRTCPeerConnection;
-  }
-
-  if (browserDetails.version < 53) {
-    // shim away need for obsolete RTCIceCandidate/RTCSessionDescription.
-    ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate']
-      .forEach(function(method) {
-        const nativeMethod = window.RTCPeerConnection.prototype[method];
-        const methodObj = {[method]() {
-          arguments[0] = new ((method === 'addIceCandidate') ?
-            window.RTCIceCandidate :
-            window.RTCSessionDescription)(arguments[0]);
-          return nativeMethod.apply(this, arguments);
-        }};
-        window.RTCPeerConnection.prototype[method] = methodObj[method];
-      });
-  }
-
-  const modernStatsTypes = {
-    inboundrtp: 'inbound-rtp',
-    outboundrtp: 'outbound-rtp',
-    candidatepair: 'candidate-pair',
-    localcandidate: 'local-candidate',
-    remotecandidate: 'remote-candidate'
-  };
-
-  const nativeGetStats = window.RTCPeerConnection.prototype.getStats;
-  window.RTCPeerConnection.prototype.getStats = function getStats() {
-    const [selector, onSucc, onErr] = arguments;
-    return nativeGetStats.apply(this, [selector || null])
-      .then(stats => {
-        if (browserDetails.version < 53 && !onSucc) {
-          // Shim only promise getStats with spec-hyphens in type names
-          // Leave callback version alone; misc old uses of forEach before Map
-          try {
-            stats.forEach(stat => {
-              stat.type = modernStatsTypes[stat.type] || stat.type;
-            });
-          } catch (e) {
-            if (e.name !== 'TypeError') {
-              throw e;
-            }
-            // Avoid TypeError: "type" is read-only, in old versions. 34-43ish
-            stats.forEach((stat, i) => {
-              stats.set(i, Object.assign({}, stat, {
-                type: modernStatsTypes[stat.type] || stat.type
-              }));
-            });
-          }
-        }
-        return stats;
-      })
-      .then(onSucc, onErr);
-  };
-}
-
-export function shimSenderGetStats(window) {
-  if (!(typeof window === 'object' && window.RTCPeerConnection &&
-      window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpSender.prototype) {
-    return;
-  }
-  const origGetSenders = window.RTCPeerConnection.prototype.getSenders;
-  if (origGetSenders) {
-    window.RTCPeerConnection.prototype.getSenders = function getSenders() {
-      const senders = origGetSenders.apply(this, []);
-      senders.forEach(sender => sender._pc = this);
-      return senders;
-    };
-  }
-
-  const origAddTrack = window.RTCPeerConnection.prototype.addTrack;
-  if (origAddTrack) {
-    window.RTCPeerConnection.prototype.addTrack = function addTrack() {
-      const sender = origAddTrack.apply(this, arguments);
-      sender._pc = this;
-      return sender;
-    };
-  }
-  window.RTCRtpSender.prototype.getStats = function getStats() {
-    return this.track ? this._pc.getStats(this.track) :
-      Promise.resolve(new Map());
-  };
-}
-
-export function shimReceiverGetStats(window) {
-  if (!(typeof window === 'object' && window.RTCPeerConnection &&
-      window.RTCRtpSender)) {
-    return;
-  }
-  if (window.RTCRtpSender && 'getStats' in window.RTCRtpReceiver.prototype) {
-    return;
-  }
-  const origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
-  if (origGetReceivers) {
-    window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
-      const receivers = origGetReceivers.apply(this, []);
-      receivers.forEach(receiver => receiver._pc = this);
-      return receivers;
-    };
-  }
-  utils.wrapPeerConnectionEvent(window, 'track', e => {
-    e.receiver._pc = e.srcElement;
-    return e;
-  });
-  window.RTCRtpReceiver.prototype.getStats = function getStats() {
-    return this._pc.getStats(this.track);
-  };
-}
-
-export function shimRemoveStream(window) {
-  if (!window.RTCPeerConnection ||
-      'removeStream' in window.RTCPeerConnection.prototype) {
-    return;
-  }
-  window.RTCPeerConnection.prototype.removeStream =
-    function removeStream(stream) {
-      utils.deprecated('removeStream', 'removeTrack');
-      this.getSenders().forEach(sender => {
-        if (sender.track && stream.getTracks().includes(sender.track)) {
-          this.removeTrack(sender);
-        }
-      });
-    };
-}
-
-export function shimRTCDataChannel(window) {
-  // rename DataChannel to RTCDataChannel (native fix in FF60):
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1173851
-  if (window.DataChannel && !window.RTCDataChannel) {
-    window.RTCDataChannel = window.DataChannel;
-  }
-}
-
-export function shimAddTransceiver(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(typeof window === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  const origAddTransceiver = window.RTCPeerConnection.prototype.addTransceiver;
-  if (origAddTransceiver) {
-    window.RTCPeerConnection.prototype.addTransceiver =
-      function addTransceiver() {
-        this.setParametersPromises = [];
-        // WebIDL input coercion and validation
-        let sendEncodings = arguments[1] && arguments[1].sendEncodings;
-        if (sendEncodings === undefined) {
-          sendEncodings = [];
-        }
-        sendEncodings = [...sendEncodings];
-        const shouldPerformCheck = sendEncodings.length > 0;
-        if (shouldPerformCheck) {
-          // If sendEncodings params are provided, validate grammar
-          sendEncodings.forEach((encodingParam) => {
-            if ('rid' in encodingParam) {
-              const ridRegex = /^[a-z0-9]{0,16}$/i;
-              if (!ridRegex.test(encodingParam.rid)) {
-                throw new TypeError('Invalid RID value provided.');
-              }
-            }
-            if ('scaleResolutionDownBy' in encodingParam) {
-              if (!(parseFloat(encodingParam.scaleResolutionDownBy) >= 1.0)) {
-                throw new RangeError('scale_resolution_down_by must be >= 1.0');
-              }
-            }
-            if ('maxFramerate' in encodingParam) {
-              if (!(parseFloat(encodingParam.maxFramerate) >= 0)) {
-                throw new RangeError('max_framerate must be >= 0.0');
-              }
-            }
-          });
-        }
-        const transceiver = origAddTransceiver.apply(this, arguments);
-        if (shouldPerformCheck) {
-          // Check if the init options were applied. If not we do this in an
-          // asynchronous way and save the promise reference in a global object.
-          // This is an ugly hack, but at the same time is way more robust than
-          // checking the sender parameters before and after the createOffer
-          // Also note that after the createoffer we are not 100% sure that
-          // the params were asynchronously applied so we might miss the
-          // opportunity to recreate offer.
-          const {sender} = transceiver;
-          const params = sender.getParameters();
-          if (!('encodings' in params) ||
-              // Avoid being fooled by patched getParameters() below.
-              (params.encodings.length === 1 &&
-               Object.keys(params.encodings[0]).length === 0)) {
-            params.encodings = sendEncodings;
-            sender.sendEncodings = sendEncodings;
-            this.setParametersPromises.push(sender.setParameters(params)
-              .then(() => {
-                delete sender.sendEncodings;
-              }).catch(() => {
-                delete sender.sendEncodings;
-              })
-            );
-          }
-        }
-        return transceiver;
-      };
-  }
-}
-
-export function shimGetParameters(window) {
-  if (!(typeof window === 'object' && window.RTCRtpSender)) {
-    return;
-  }
-  const origGetParameters = window.RTCRtpSender.prototype.getParameters;
-  if (origGetParameters) {
-    window.RTCRtpSender.prototype.getParameters =
-      function getParameters() {
-        const params = origGetParameters.apply(this, arguments);
-        if (!('encodings' in params)) {
-          params.encodings = [].concat(this.sendEncodings || [{}]);
-        }
-        return params;
-      };
-  }
-}
-
-export function shimCreateOffer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(typeof window === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  const origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer = function createOffer() {
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises)
-        .then(() => {
-          return origCreateOffer.apply(this, arguments);
-        })
-        .finally(() => {
-          this.setParametersPromises = [];
-        });
-    }
-    return origCreateOffer.apply(this, arguments);
-  };
-}
-
-export function shimCreateAnswer(window) {
-  // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
-  // Firefox ignores the init sendEncodings options passed to addTransceiver
-  // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
-  if (!(typeof window === 'object' && window.RTCPeerConnection)) {
-    return;
-  }
-  const origCreateAnswer = window.RTCPeerConnection.prototype.createAnswer;
-  window.RTCPeerConnection.prototype.createAnswer = function createAnswer() {
-    if (this.setParametersPromises && this.setParametersPromises.length) {
-      return Promise.all(this.setParametersPromises)
-        .then(() => {
-          return origCreateAnswer.apply(this, arguments);
-        })
-        .finally(() => {
-          this.setParametersPromises = [];
-        });
-    }
-    return origCreateAnswer.apply(this, arguments);
-  };
-}

+ 0 - 36
node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js

@@ -1,36 +0,0 @@
-/*
- *  Copyright (c) 2018 The adapter.js project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-export function shimGetDisplayMedia(window, preferredMediaSource) {
-  if (window.navigator.mediaDevices &&
-    'getDisplayMedia' in window.navigator.mediaDevices) {
-    return;
-  }
-  if (!(window.navigator.mediaDevices)) {
-    return;
-  }
-  window.navigator.mediaDevices.getDisplayMedia =
-    function getDisplayMedia(constraints) {
-      if (!(constraints && constraints.video)) {
-        const err = new DOMException('getDisplayMedia without video ' +
-            'constraints is undefined');
-        err.name = 'NotFoundError';
-        // from https://heycam.github.io/webidl/#idl-DOMException-error-names
-        err.code = 8;
-        return Promise.reject(err);
-      }
-      if (constraints.video === true) {
-        constraints.video = {mediaSource: preferredMediaSource};
-      } else {
-        constraints.video.mediaSource = preferredMediaSource;
-      }
-      return window.navigator.mediaDevices.getUserMedia(constraints);
-    };
-}

+ 0 - 67
node_modules/webrtc-adapter/src/js/firefox/getusermedia.js

@@ -1,67 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-import * as utils from '../utils';
-
-export function shimGetUserMedia(window, browserDetails) {
-  const navigator = window && window.navigator;
-  const MediaStreamTrack = window && window.MediaStreamTrack;
-
-  navigator.getUserMedia = function(constraints, onSuccess, onError) {
-    // Replace Firefox 44+'s deprecation warning with unprefixed version.
-    utils.deprecated('navigator.getUserMedia',
-      'navigator.mediaDevices.getUserMedia');
-    navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
-  };
-
-  if (!(browserDetails.version > 55 &&
-      'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) {
-    const remap = function(obj, a, b) {
-      if (a in obj && !(b in obj)) {
-        obj[b] = obj[a];
-        delete obj[a];
-      }
-    };
-
-    const nativeGetUserMedia = navigator.mediaDevices.getUserMedia.
-      bind(navigator.mediaDevices);
-    navigator.mediaDevices.getUserMedia = function(c) {
-      if (typeof c === 'object' && typeof c.audio === 'object') {
-        c = JSON.parse(JSON.stringify(c));
-        remap(c.audio, 'autoGainControl', 'mozAutoGainControl');
-        remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression');
-      }
-      return nativeGetUserMedia(c);
-    };
-
-    if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) {
-      const nativeGetSettings = MediaStreamTrack.prototype.getSettings;
-      MediaStreamTrack.prototype.getSettings = function() {
-        const obj = nativeGetSettings.apply(this, arguments);
-        remap(obj, 'mozAutoGainControl', 'autoGainControl');
-        remap(obj, 'mozNoiseSuppression', 'noiseSuppression');
-        return obj;
-      };
-    }
-
-    if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) {
-      const nativeApplyConstraints =
-        MediaStreamTrack.prototype.applyConstraints;
-      MediaStreamTrack.prototype.applyConstraints = function(c) {
-        if (this.kind === 'audio' && typeof c === 'object') {
-          c = JSON.parse(JSON.stringify(c));
-          remap(c, 'autoGainControl', 'mozAutoGainControl');
-          remap(c, 'noiseSuppression', 'mozNoiseSuppression');
-        }
-        return nativeApplyConstraints.apply(this, [c]);
-      };
-    }
-  }
-}

+ 0 - 352
node_modules/webrtc-adapter/src/js/safari/safari_shim.js

@@ -1,352 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-'use strict';
-import * as utils from '../utils';
-
-export function shimLocalStreamsAPI(window) {
-  if (typeof window !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getLocalStreams =
-      function getLocalStreams() {
-        if (!this._localStreams) {
-          this._localStreams = [];
-        }
-        return this._localStreams;
-      };
-  }
-  if (!('addStream' in window.RTCPeerConnection.prototype)) {
-    const _addTrack = window.RTCPeerConnection.prototype.addTrack;
-    window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
-      if (!this._localStreams) {
-        this._localStreams = [];
-      }
-      if (!this._localStreams.includes(stream)) {
-        this._localStreams.push(stream);
-      }
-      // Try to emulate Chrome's behaviour of adding in audio-video order.
-      // Safari orders by track id.
-      stream.getAudioTracks().forEach(track => _addTrack.call(this, track,
-        stream));
-      stream.getVideoTracks().forEach(track => _addTrack.call(this, track,
-        stream));
-    };
-
-    window.RTCPeerConnection.prototype.addTrack =
-      function addTrack(track, ...streams) {
-        if (streams) {
-          streams.forEach((stream) => {
-            if (!this._localStreams) {
-              this._localStreams = [stream];
-            } else if (!this._localStreams.includes(stream)) {
-              this._localStreams.push(stream);
-            }
-          });
-        }
-        return _addTrack.apply(this, arguments);
-      };
-  }
-  if (!('removeStream' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.removeStream =
-      function removeStream(stream) {
-        if (!this._localStreams) {
-          this._localStreams = [];
-        }
-        const index = this._localStreams.indexOf(stream);
-        if (index === -1) {
-          return;
-        }
-        this._localStreams.splice(index, 1);
-        const tracks = stream.getTracks();
-        this.getSenders().forEach(sender => {
-          if (tracks.includes(sender.track)) {
-            this.removeTrack(sender);
-          }
-        });
-      };
-  }
-}
-
-export function shimRemoteStreamsAPI(window) {
-  if (typeof window !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) {
-    window.RTCPeerConnection.prototype.getRemoteStreams =
-      function getRemoteStreams() {
-        return this._remoteStreams ? this._remoteStreams : [];
-      };
-  }
-  if (!('onaddstream' in window.RTCPeerConnection.prototype)) {
-    Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', {
-      get() {
-        return this._onaddstream;
-      },
-      set(f) {
-        if (this._onaddstream) {
-          this.removeEventListener('addstream', this._onaddstream);
-          this.removeEventListener('track', this._onaddstreampoly);
-        }
-        this.addEventListener('addstream', this._onaddstream = f);
-        this.addEventListener('track', this._onaddstreampoly = (e) => {
-          e.streams.forEach(stream => {
-            if (!this._remoteStreams) {
-              this._remoteStreams = [];
-            }
-            if (this._remoteStreams.includes(stream)) {
-              return;
-            }
-            this._remoteStreams.push(stream);
-            const event = new Event('addstream');
-            event.stream = stream;
-            this.dispatchEvent(event);
-          });
-        });
-      }
-    });
-    const origSetRemoteDescription =
-      window.RTCPeerConnection.prototype.setRemoteDescription;
-    window.RTCPeerConnection.prototype.setRemoteDescription =
-      function setRemoteDescription() {
-        const pc = this;
-        if (!this._onaddstreampoly) {
-          this.addEventListener('track', this._onaddstreampoly = function(e) {
-            e.streams.forEach(stream => {
-              if (!pc._remoteStreams) {
-                pc._remoteStreams = [];
-              }
-              if (pc._remoteStreams.indexOf(stream) >= 0) {
-                return;
-              }
-              pc._remoteStreams.push(stream);
-              const event = new Event('addstream');
-              event.stream = stream;
-              pc.dispatchEvent(event);
-            });
-          });
-        }
-        return origSetRemoteDescription.apply(pc, arguments);
-      };
-  }
-}
-
-export function shimCallbacksAPI(window) {
-  if (typeof window !== 'object' || !window.RTCPeerConnection) {
-    return;
-  }
-  const prototype = window.RTCPeerConnection.prototype;
-  const origCreateOffer = prototype.createOffer;
-  const origCreateAnswer = prototype.createAnswer;
-  const setLocalDescription = prototype.setLocalDescription;
-  const setRemoteDescription = prototype.setRemoteDescription;
-  const addIceCandidate = prototype.addIceCandidate;
-
-  prototype.createOffer =
-    function createOffer(successCallback, failureCallback) {
-      const options = (arguments.length >= 2) ? arguments[2] : arguments[0];
-      const promise = origCreateOffer.apply(this, [options]);
-      if (!failureCallback) {
-        return promise;
-      }
-      promise.then(successCallback, failureCallback);
-      return Promise.resolve();
-    };
-
-  prototype.createAnswer =
-    function createAnswer(successCallback, failureCallback) {
-      const options = (arguments.length >= 2) ? arguments[2] : arguments[0];
-      const promise = origCreateAnswer.apply(this, [options]);
-      if (!failureCallback) {
-        return promise;
-      }
-      promise.then(successCallback, failureCallback);
-      return Promise.resolve();
-    };
-
-  let withCallback = function(description, successCallback, failureCallback) {
-    const promise = setLocalDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setLocalDescription = withCallback;
-
-  withCallback = function(description, successCallback, failureCallback) {
-    const promise = setRemoteDescription.apply(this, [description]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.setRemoteDescription = withCallback;
-
-  withCallback = function(candidate, successCallback, failureCallback) {
-    const promise = addIceCandidate.apply(this, [candidate]);
-    if (!failureCallback) {
-      return promise;
-    }
-    promise.then(successCallback, failureCallback);
-    return Promise.resolve();
-  };
-  prototype.addIceCandidate = withCallback;
-}
-
-export function shimGetUserMedia(window) {
-  const navigator = window && window.navigator;
-
-  if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
-    // shim not needed in Safari 12.1
-    const mediaDevices = navigator.mediaDevices;
-    const _getUserMedia = mediaDevices.getUserMedia.bind(mediaDevices);
-    navigator.mediaDevices.getUserMedia = (constraints) => {
-      return _getUserMedia(shimConstraints(constraints));
-    };
-  }
-
-  if (!navigator.getUserMedia && navigator.mediaDevices &&
-    navigator.mediaDevices.getUserMedia) {
-    navigator.getUserMedia = function getUserMedia(constraints, cb, errcb) {
-      navigator.mediaDevices.getUserMedia(constraints)
-        .then(cb, errcb);
-    }.bind(navigator);
-  }
-}
-
-export function shimConstraints(constraints) {
-  if (constraints && constraints.video !== undefined) {
-    return Object.assign({},
-      constraints,
-      {video: utils.compactObject(constraints.video)}
-    );
-  }
-
-  return constraints;
-}
-
-export function shimRTCIceServerUrls(window) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  // migrate from non-spec RTCIceServer.url to RTCIceServer.urls
-  const OrigPeerConnection = window.RTCPeerConnection;
-  window.RTCPeerConnection =
-    function RTCPeerConnection(pcConfig, pcConstraints) {
-      if (pcConfig && pcConfig.iceServers) {
-        const newIceServers = [];
-        for (let i = 0; i < pcConfig.iceServers.length; i++) {
-          let server = pcConfig.iceServers[i];
-          if (server.urls === undefined && server.url) {
-            utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');
-            server = JSON.parse(JSON.stringify(server));
-            server.urls = server.url;
-            delete server.url;
-            newIceServers.push(server);
-          } else {
-            newIceServers.push(pcConfig.iceServers[i]);
-          }
-        }
-        pcConfig.iceServers = newIceServers;
-      }
-      return new OrigPeerConnection(pcConfig, pcConstraints);
-    };
-  window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;
-  // wrap static methods. Currently just generateCertificate.
-  if ('generateCertificate' in OrigPeerConnection) {
-    Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
-      get() {
-        return OrigPeerConnection.generateCertificate;
-      }
-    });
-  }
-}
-
-export function shimTrackEventTransceiver(window) {
-  // Add event.transceiver member over deprecated event.receiver
-  if (typeof window === 'object' && window.RTCTrackEvent &&
-      'receiver' in window.RTCTrackEvent.prototype &&
-      !('transceiver' in window.RTCTrackEvent.prototype)) {
-    Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
-      get() {
-        return {receiver: this.receiver};
-      }
-    });
-  }
-}
-
-export function shimCreateOfferLegacy(window) {
-  const origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
-  window.RTCPeerConnection.prototype.createOffer =
-    function createOffer(offerOptions) {
-      if (offerOptions) {
-        if (typeof offerOptions.offerToReceiveAudio !== 'undefined') {
-          // support bit values
-          offerOptions.offerToReceiveAudio =
-            !!offerOptions.offerToReceiveAudio;
-        }
-        const audioTransceiver = this.getTransceivers().find(transceiver =>
-          transceiver.receiver.track.kind === 'audio');
-        if (offerOptions.offerToReceiveAudio === false && audioTransceiver) {
-          if (audioTransceiver.direction === 'sendrecv') {
-            if (audioTransceiver.setDirection) {
-              audioTransceiver.setDirection('sendonly');
-            } else {
-              audioTransceiver.direction = 'sendonly';
-            }
-          } else if (audioTransceiver.direction === 'recvonly') {
-            if (audioTransceiver.setDirection) {
-              audioTransceiver.setDirection('inactive');
-            } else {
-              audioTransceiver.direction = 'inactive';
-            }
-          }
-        } else if (offerOptions.offerToReceiveAudio === true &&
-            !audioTransceiver) {
-          this.addTransceiver('audio', {direction: 'recvonly'});
-        }
-
-        if (typeof offerOptions.offerToReceiveVideo !== 'undefined') {
-          // support bit values
-          offerOptions.offerToReceiveVideo =
-            !!offerOptions.offerToReceiveVideo;
-        }
-        const videoTransceiver = this.getTransceivers().find(transceiver =>
-          transceiver.receiver.track.kind === 'video');
-        if (offerOptions.offerToReceiveVideo === false && videoTransceiver) {
-          if (videoTransceiver.direction === 'sendrecv') {
-            if (videoTransceiver.setDirection) {
-              videoTransceiver.setDirection('sendonly');
-            } else {
-              videoTransceiver.direction = 'sendonly';
-            }
-          } else if (videoTransceiver.direction === 'recvonly') {
-            if (videoTransceiver.setDirection) {
-              videoTransceiver.setDirection('inactive');
-            } else {
-              videoTransceiver.direction = 'inactive';
-            }
-          }
-        } else if (offerOptions.offerToReceiveVideo === true &&
-            !videoTransceiver) {
-          this.addTransceiver('video', {direction: 'recvonly'});
-        }
-      }
-      return origCreateOffer.apply(this, arguments);
-    };
-}
-
-export function shimAudioContext(window) {
-  if (typeof window !== 'object' || window.AudioContext) {
-    return;
-  }
-  window.AudioContext = window.webkitAudioContext;
-}
-

+ 0 - 263
node_modules/webrtc-adapter/src/js/utils.js

@@ -1,263 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree.
- */
-/* eslint-env node */
-'use strict';
-
-let logDisabled_ = true;
-let deprecationWarnings_ = true;
-
-/**
- * Extract browser version out of the provided user agent string.
- *
- * @param {!string} uastring userAgent string.
- * @param {!string} expr Regular expression used as match criteria.
- * @param {!number} pos position in the version string to be returned.
- * @return {!number} browser version.
- */
-export function extractVersion(uastring, expr, pos) {
-  const match = uastring.match(expr);
-  return match && match.length >= pos && parseInt(match[pos], 10);
-}
-
-// Wraps the peerconnection event eventNameToWrap in a function
-// which returns the modified event object (or false to prevent
-// the event).
-export function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
-  if (!window.RTCPeerConnection) {
-    return;
-  }
-  const proto = window.RTCPeerConnection.prototype;
-  const nativeAddEventListener = proto.addEventListener;
-  proto.addEventListener = function(nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap) {
-      return nativeAddEventListener.apply(this, arguments);
-    }
-    const wrappedCallback = (e) => {
-      const modifiedEvent = wrapper(e);
-      if (modifiedEvent) {
-        if (cb.handleEvent) {
-          cb.handleEvent(modifiedEvent);
-        } else {
-          cb(modifiedEvent);
-        }
-      }
-    };
-    this._eventMap = this._eventMap || {};
-    if (!this._eventMap[eventNameToWrap]) {
-      this._eventMap[eventNameToWrap] = new Map();
-    }
-    this._eventMap[eventNameToWrap].set(cb, wrappedCallback);
-    return nativeAddEventListener.apply(this, [nativeEventName,
-      wrappedCallback]);
-  };
-
-  const nativeRemoveEventListener = proto.removeEventListener;
-  proto.removeEventListener = function(nativeEventName, cb) {
-    if (nativeEventName !== eventNameToWrap || !this._eventMap
-        || !this._eventMap[eventNameToWrap]) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    if (!this._eventMap[eventNameToWrap].has(cb)) {
-      return nativeRemoveEventListener.apply(this, arguments);
-    }
-    const unwrappedCb = this._eventMap[eventNameToWrap].get(cb);
-    this._eventMap[eventNameToWrap].delete(cb);
-    if (this._eventMap[eventNameToWrap].size === 0) {
-      delete this._eventMap[eventNameToWrap];
-    }
-    if (Object.keys(this._eventMap).length === 0) {
-      delete this._eventMap;
-    }
-    return nativeRemoveEventListener.apply(this, [nativeEventName,
-      unwrappedCb]);
-  };
-
-  Object.defineProperty(proto, 'on' + eventNameToWrap, {
-    get() {
-      return this['_on' + eventNameToWrap];
-    },
-    set(cb) {
-      if (this['_on' + eventNameToWrap]) {
-        this.removeEventListener(eventNameToWrap,
-          this['_on' + eventNameToWrap]);
-        delete this['_on' + eventNameToWrap];
-      }
-      if (cb) {
-        this.addEventListener(eventNameToWrap,
-          this['_on' + eventNameToWrap] = cb);
-      }
-    },
-    enumerable: true,
-    configurable: true
-  });
-}
-
-export function disableLog(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + typeof bool +
-        '. Please use a boolean.');
-  }
-  logDisabled_ = bool;
-  return (bool) ? 'adapter.js logging disabled' :
-    'adapter.js logging enabled';
-}
-
-/**
- * Disable or enable deprecation warnings
- * @param {!boolean} bool set to true to disable warnings.
- */
-export function disableWarnings(bool) {
-  if (typeof bool !== 'boolean') {
-    return new Error('Argument type: ' + typeof bool +
-        '. Please use a boolean.');
-  }
-  deprecationWarnings_ = !bool;
-  return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');
-}
-
-export function log() {
-  if (typeof window === 'object') {
-    if (logDisabled_) {
-      return;
-    }
-    if (typeof console !== 'undefined' && typeof console.log === 'function') {
-      console.log.apply(console, arguments);
-    }
-  }
-}
-
-/**
- * Shows a deprecation warning suggesting the modern and spec-compatible API.
- */
-export function deprecated(oldMethod, newMethod) {
-  if (!deprecationWarnings_) {
-    return;
-  }
-  console.warn(oldMethod + ' is deprecated, please use ' + newMethod +
-      ' instead.');
-}
-
-/**
- * Browser detector.
- *
- * @return {object} result containing browser and version
- *     properties.
- */
-export function detectBrowser(window) {
-  // Returned result object.
-  const result = {browser: null, version: null};
-
-  // Fail early if it's not a browser
-  if (typeof window === 'undefined' || !window.navigator ||
-      !window.navigator.userAgent) {
-    result.browser = 'Not a browser.';
-    return result;
-  }
-
-  const {navigator} = window;
-
-  if (navigator.mozGetUserMedia) { // Firefox.
-    result.browser = 'firefox';
-    result.version = extractVersion(navigator.userAgent,
-      /Firefox\/(\d+)\./, 1);
-  } else if (navigator.webkitGetUserMedia ||
-      (window.isSecureContext === false && window.webkitRTCPeerConnection)) {
-    // Chrome, Chromium, Webview, Opera.
-    // Version matches Chrome/WebRTC version.
-    // Chrome 74 removed webkitGetUserMedia on http as well so we need the
-    // more complicated fallback to webkitRTCPeerConnection.
-    result.browser = 'chrome';
-    result.version = extractVersion(navigator.userAgent,
-      /Chrom(e|ium)\/(\d+)\./, 2);
-  } else if (window.RTCPeerConnection &&
-      navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) { // Safari.
-    result.browser = 'safari';
-    result.version = extractVersion(navigator.userAgent,
-      /AppleWebKit\/(\d+)\./, 1);
-    result.supportsUnifiedPlan = window.RTCRtpTransceiver &&
-        'currentDirection' in window.RTCRtpTransceiver.prototype;
-  } else { // Default fallthrough: not supported.
-    result.browser = 'Not a supported browser.';
-    return result;
-  }
-
-  return result;
-}
-
-/**
- * Checks if something is an object.
- *
- * @param {*} val The something you want to check.
- * @return true if val is an object, false otherwise.
- */
-function isObject(val) {
-  return Object.prototype.toString.call(val) === '[object Object]';
-}
-
-/**
- * Remove all empty objects and undefined values
- * from a nested object -- an enhanced and vanilla version
- * of Lodash's `compact`.
- */
-export function compactObject(data) {
-  if (!isObject(data)) {
-    return data;
-  }
-
-  return Object.keys(data).reduce(function(accumulator, key) {
-    const isObj = isObject(data[key]);
-    const value = isObj ? compactObject(data[key]) : data[key];
-    const isEmptyObject = isObj && !Object.keys(value).length;
-    if (value === undefined || isEmptyObject) {
-      return accumulator;
-    }
-    return Object.assign(accumulator, {[key]: value});
-  }, {});
-}
-
-/* iterates the stats graph recursively. */
-export function walkStats(stats, base, resultSet) {
-  if (!base || resultSet.has(base.id)) {
-    return;
-  }
-  resultSet.set(base.id, base);
-  Object.keys(base).forEach(name => {
-    if (name.endsWith('Id')) {
-      walkStats(stats, stats.get(base[name]), resultSet);
-    } else if (name.endsWith('Ids')) {
-      base[name].forEach(id => {
-        walkStats(stats, stats.get(id), resultSet);
-      });
-    }
-  });
-}
-
-/* filter getStats for a sender/receiver track. */
-export function filterStats(result, track, outbound) {
-  const streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp';
-  const filteredResult = new Map();
-  if (track === null) {
-    return filteredResult;
-  }
-  const trackStats = [];
-  result.forEach(value => {
-    if (value.type === 'track' &&
-        value.trackIdentifier === track.id) {
-      trackStats.push(value);
-    }
-  });
-  trackStats.forEach(trackStat => {
-    result.forEach(stats => {
-      if (stats.type === streamStatsType && stats.trackId === trackStat.id) {
-        walkStats(result, stats, filteredResult);
-      }
-    });
-  });
-  return filteredResult;
-}
-

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini