speaker-calibration 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/.eslintignore +72 -0
  2. package/.eslintrc.json +40 -0
  3. package/.gitignore +78 -0
  4. package/.prettierignore +70 -0
  5. package/.prettierrc +15 -0
  6. package/LICENSE +20 -20
  7. package/README.md +133 -133
  8. package/__mocks__/fileMock.js +1 -0
  9. package/__mocks__/styleMock.js +1 -0
  10. package/babel.config.js +3 -0
  11. package/coverage/clover.xml +71 -0
  12. package/coverage/coverage-final.json +224 -0
  13. package/coverage/lcov-report/PythonServerInterface.js.html +265 -0
  14. package/coverage/lcov-report/base.css +354 -0
  15. package/coverage/lcov-report/block-navigation.js +82 -0
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/index.html +123 -0
  18. package/coverage/lcov-report/prettify.css +101 -0
  19. package/coverage/lcov-report/prettify.js +937 -0
  20. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  21. package/coverage/lcov-report/sorter.js +189 -0
  22. package/coverage/lcov-report/src/index.html +121 -0
  23. package/coverage/lcov-report/src/server/PythonServerInterface.js.html +268 -0
  24. package/coverage/lcov-report/src/server/index.html +123 -0
  25. package/coverage/lcov-report/src/tasks/audioCalibrator.js.html +499 -0
  26. package/coverage/lcov-report/src/tasks/audioRecorder.js.html +412 -0
  27. package/coverage/lcov-report/src/tasks/index.html +143 -0
  28. package/coverage/lcov-report/src/tasks/volume/index.html +123 -0
  29. package/coverage/lcov-report/src/tasks/volume/volume.js.html +409 -0
  30. package/coverage/lcov-report/src/utils.js.html +172 -0
  31. package/coverage/lcov.info +91 -0
  32. package/dist/example/Queen-Bohemian_Rhapsody.wav +0 -0
  33. package/dist/example/Queen-Bohemian_Rhapsody_g_filtered.wav +0 -0
  34. package/dist/example/index.html +47 -0
  35. package/dist/example/listener.html +89 -0
  36. package/dist/example/server.js +49 -0
  37. package/dist/example/speaker.html +126 -0
  38. package/dist/example/speakerUI.js +217 -0
  39. package/dist/example/styles.css +40 -0
  40. package/dist/main.js +1 -1
  41. package/dist/mlsGen.js +6814 -6814
  42. package/dist/mlsGen.wasm +0 -0
  43. package/doc/AudioCalibrator.html +417 -0
  44. package/doc/AudioPeer.html +251 -0
  45. package/doc/AudioRecorder.html +195 -0
  46. package/doc/ImpulseResponse.html +215 -0
  47. package/doc/Listener.html +308 -0
  48. package/doc/MlsGenInterface.html +226 -0
  49. package/doc/MyEventEmitter.html +274 -0
  50. package/doc/PythonServerAPI.html +109 -0
  51. package/doc/Speaker-Calibration-UML-Diagram.png +0 -0
  52. package/doc/Speaker.html +276 -0
  53. package/doc/Takes%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +128 -0
  54. package/doc/Takes%20the%20url%20of%20the%20current%20site%0Aand%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +138 -0
  55. package/doc/Takes%20the%20url%20of%20the%20current%20site%20and%20a%20target%20element%20where%20html%20elements%20will%20be%20appended..html +137 -0
  56. package/doc/Volume.html +88 -0
  57. package/doc/audioCalibrator.js.html +179 -0
  58. package/doc/audioPeer.js.html +175 -0
  59. package/doc/audioRecorder.js.html +163 -0
  60. package/doc/creates%20a%20new%20AudioRecorder%20instance.%20%0ASets%20up%20the%20audio%20context%20and%20file%20reader..html +114 -0
  61. package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
  62. package/doc/fonts/OpenSans-Bold-webfont.svg +1830 -0
  63. package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
  64. package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  65. package/doc/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  66. package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  67. package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
  68. package/doc/fonts/OpenSans-Italic-webfont.svg +1830 -0
  69. package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
  70. package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
  71. package/doc/fonts/OpenSans-Light-webfont.svg +1831 -0
  72. package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
  73. package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  74. package/doc/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  75. package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  76. package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
  77. package/doc/fonts/OpenSans-Regular-webfont.svg +1831 -0
  78. package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
  79. package/doc/global.html +308 -0
  80. package/doc/index.html +58 -0
  81. package/doc/listener.js.html +170 -0
  82. package/doc/mlsGen_mlsGenInterface.js.html +117 -0
  83. package/doc/myEventEmitter.js.html +124 -0
  84. package/doc/peer-connection_audioPeer.js.html +188 -0
  85. package/doc/peer-connection_listener.js.html +311 -0
  86. package/doc/peer-connection_speaker.js.html +381 -0
  87. package/doc/sc-activity-diagram.png +0 -0
  88. package/doc/scripts/linenumber.js +25 -0
  89. package/doc/scripts/prettify/Apache-License-2.0.txt +202 -0
  90. package/doc/scripts/prettify/lang-css.js +24 -0
  91. package/doc/scripts/prettify/prettify.js +640 -0
  92. package/doc/server_PythonServerAPI.js.html +160 -0
  93. package/doc/speaker.js.html +248 -0
  94. package/doc/styles/jsdoc-default.css +371 -0
  95. package/doc/styles/prettify-jsdoc.css +111 -0
  96. package/doc/styles/prettify-tomorrow.css +163 -0
  97. package/doc/tasks_audioCalibrator.js.html +207 -0
  98. package/doc/tasks_audioRecorder.js.html +190 -0
  99. package/doc/tasks_impulse-response_impulseResponse.js.html +442 -0
  100. package/doc/tasks_impulse-response_mlsGen_mlsGenInterface.js.html +175 -0
  101. package/doc/tasks_volume_volume.js.html +185 -0
  102. package/doc/utils.js.html +105 -0
  103. package/jest.config.js +173 -0
  104. package/netlify.toml +27 -0
  105. package/package.json +67 -66
  106. package/src/index.html +21 -0
  107. package/src/main.js +21 -0
  108. package/src/myEventEmitter.js +83 -0
  109. package/src/peer-connection/audioPeer.js +151 -0
  110. package/src/peer-connection/listener.js +251 -0
  111. package/src/peer-connection/peerErrors.js +25 -0
  112. package/src/peer-connection/speaker.js +346 -0
  113. package/src/server/PythonServerAPI.js +117 -0
  114. package/src/tasks/audioCalibrator.js +218 -0
  115. package/src/tasks/audioRecorder.js +148 -0
  116. package/src/tasks/impulse-response/impulseResponse.js +436 -0
  117. package/src/tasks/impulse-response/mlsGen/mlsGen.cpp +99 -0
  118. package/src/tasks/impulse-response/mlsGen/mlsGen.hpp +304 -0
  119. package/src/tasks/impulse-response/mlsGen/mlsGenInterface.js +131 -0
  120. package/src/tasks/impulse-response/mlsGen/mlsGenTest.cpp +181 -0
  121. package/src/tasks/volume/volume.cpp +3 -0
  122. package/src/tasks/volume/volume.hpp +23 -0
  123. package/src/tasks/volume/volume.js +157 -0
  124. package/src/utils.js +55 -0
  125. package/webpack.config.js +37 -0
  126. package/README +0 -3
package/dist/mlsGen.wasm CHANGED
File without changes
@@ -0,0 +1,417 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>JSDoc: Class: AudioCalibrator</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"></script>
8
+ <script src="scripts/prettify/lang-css.js"></script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css" />
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css" />
14
+ </head>
15
+
16
+ <body>
17
+ <div id="main">
18
+ <h1 class="page-title">Class: AudioCalibrator</h1>
19
+
20
+ <section>
21
+ <header>
22
+ <h2>
23
+ <span class="attribs"><span class="type-signature"></span></span>AudioCalibrator<span
24
+ class="signature"
25
+ >()</span
26
+ ><span class="type-signature"></span>
27
+ </h2>
28
+
29
+ <div class="class-description">Provides methods for calibrating the user's speakers</div>
30
+ </header>
31
+
32
+ <article>
33
+ <div class="container-overview">
34
+ <h2>Constructor</h2>
35
+
36
+ <h4 class="name" id="AudioCalibrator">
37
+ <span class="type-signature"></span>new AudioCalibrator<span class="signature"
38
+ >()</span
39
+ ><span class="type-signature"></span>
40
+ </h4>
41
+
42
+ <dl class="details">
43
+ <dt class="tag-source">Source:</dt>
44
+ <dd class="tag-source">
45
+ <ul class="dummy">
46
+ <li>
47
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
48
+ <a href="tasks_audioCalibrator.js.html#line10">line 10</a>
49
+ </li>
50
+ </ul>
51
+ </dd>
52
+ </dl>
53
+ </div>
54
+
55
+ <h3 class="subsection-title">Extends</h3>
56
+
57
+ <ul>
58
+ <li><a href="AudioRecorder.html">AudioRecorder</a></li>
59
+ </ul>
60
+
61
+ <h3 class="subsection-title">Members</h3>
62
+
63
+ <h4 class="name" id="calibrationNodes">
64
+ <span class="type-signature">(protected) </span>calibrationNodes<span
65
+ class="type-signature"
66
+ ></span>
67
+ </h4>
68
+
69
+ <dl class="details">
70
+ <dt class="tag-source">Source:</dt>
71
+ <dd class="tag-source">
72
+ <ul class="dummy">
73
+ <li>
74
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
75
+ <a href="tasks_audioCalibrator.js.html#line37">line 37</a>
76
+ </li>
77
+ </ul>
78
+ </dd>
79
+ </dl>
80
+
81
+ <h4 class="name" id="calibrationSteps">
82
+ <span class="type-signature"></span>calibrationSteps<span class="type-signature"></span>
83
+ </h4>
84
+
85
+ <dl class="details">
86
+ <dt class="tag-source">Source:</dt>
87
+ <dd class="tag-source">
88
+ <ul class="dummy">
89
+ <li>
90
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
91
+ <a href="tasks_audioCalibrator.js.html#line61">line 61</a>
92
+ </li>
93
+ </ul>
94
+ </dd>
95
+ </dl>
96
+
97
+ <h4 class="name" id="createLocalAudio">
98
+ <span class="type-signature"></span>createLocalAudio<span class="type-signature"></span>
99
+ </h4>
100
+
101
+ <div class="description">
102
+ Called when a call is received. Creates a local audio DOM element and attaches it to the
103
+ page.
104
+ </div>
105
+
106
+ <dl class="details">
107
+ <dt class="tag-source">Source:</dt>
108
+ <dd class="tag-source">
109
+ <ul class="dummy">
110
+ <li>
111
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
112
+ <a href="tasks_audioCalibrator.js.html#line46">line 46</a>
113
+ </li>
114
+ </ul>
115
+ </dd>
116
+ </dl>
117
+
118
+ <h4 class="name" id="downloadData">
119
+ <span class="type-signature"></span>downloadData<span class="type-signature"></span>
120
+ </h4>
121
+
122
+ <div class="description">Download the result of the calibration roudns</div>
123
+
124
+ <dl class="details">
125
+ <dt class="tag-source">Source:</dt>
126
+ <dd class="tag-source">
127
+ <ul class="dummy">
128
+ <li>
129
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
130
+ <a href="tasks_audioCalibrator.js.html#line138">line 138</a>
131
+ </li>
132
+ </ul>
133
+ </dd>
134
+ </dl>
135
+
136
+ <h4 class="name" id="getAllRecordedSignals">
137
+ <span class="type-signature"></span>getAllRecordedSignals<span
138
+ class="type-signature"
139
+ ></span>
140
+ </h4>
141
+
142
+ <div class="description">Public method to get all the recorded audio signals</div>
143
+
144
+ <dl class="details">
145
+ <dt class="tag-overrides">Overrides:</dt>
146
+ <dd class="tag-overrides">
147
+ <ul class="dummy">
148
+ <li>
149
+ <a href="AudioRecorder.html#getAllRecordedSignals"
150
+ >AudioRecorder#getAllRecordedSignals</a
151
+ >
152
+ </li>
153
+ </ul>
154
+ </dd>
155
+
156
+ <dt class="tag-source">Source:</dt>
157
+ <dd class="tag-source">
158
+ <ul class="dummy">
159
+ <li>
160
+ <a href="tasks_audioRecorder.js.html">tasks/audioRecorder.js</a>,
161
+ <a href="tasks_audioRecorder.js.html#line115">line 115</a>
162
+ </li>
163
+ </ul>
164
+ </dd>
165
+ </dl>
166
+
167
+ <h4 class="name" id="getCalibrationStatus">
168
+ <span class="type-signature"></span>getCalibrationStatus<span
169
+ class="type-signature"
170
+ ></span>
171
+ </h4>
172
+
173
+ <div class="description">Getter for the isCalibrating property.</div>
174
+
175
+ <dl class="details">
176
+ <dt class="tag-source">Source:</dt>
177
+ <dd class="tag-source">
178
+ <ul class="dummy">
179
+ <li>
180
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
181
+ <a href="tasks_audioCalibrator.js.html#line105">line 105</a>
182
+ </li>
183
+ </ul>
184
+ </dd>
185
+ </dl>
186
+
187
+ <h4 class="name" id="getLastRecordedSignal">
188
+ <span class="type-signature"></span>getLastRecordedSignal<span
189
+ class="type-signature"
190
+ ></span>
191
+ </h4>
192
+
193
+ <div class="description">Public method to get the last recorded audio signal</div>
194
+
195
+ <dl class="details">
196
+ <dt class="tag-overrides">Overrides:</dt>
197
+ <dd class="tag-overrides">
198
+ <ul class="dummy">
199
+ <li>
200
+ <a href="AudioRecorder.html#getLastRecordedSignal"
201
+ >AudioRecorder#getLastRecordedSignal</a
202
+ >
203
+ </li>
204
+ </ul>
205
+ </dd>
206
+
207
+ <dt class="tag-source">Source:</dt>
208
+ <dd class="tag-source">
209
+ <ul class="dummy">
210
+ <li>
211
+ <a href="tasks_audioRecorder.js.html">tasks/audioRecorder.js</a>,
212
+ <a href="tasks_audioRecorder.js.html#line109">line 109</a>
213
+ </li>
214
+ </ul>
215
+ </dd>
216
+ </dl>
217
+
218
+ <h4 class="name" id="localAudio">
219
+ <span class="type-signature">(protected) </span>localAudio<span
220
+ class="type-signature"
221
+ ></span>
222
+ </h4>
223
+
224
+ <dl class="details">
225
+ <dt class="tag-source">Source:</dt>
226
+ <dd class="tag-source">
227
+ <ul class="dummy">
228
+ <li>
229
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
230
+ <a href="tasks_audioCalibrator.js.html#line40">line 40</a>
231
+ </li>
232
+ </ul>
233
+ </dd>
234
+ </dl>
235
+
236
+ <h4 class="name" id="numCalibratingRounds">
237
+ <span class="type-signature">(protected) </span>numCalibratingRounds<span
238
+ class="type-signature"
239
+ ></span>
240
+ </h4>
241
+
242
+ <dl class="details">
243
+ <dt class="tag-source">Source:</dt>
244
+ <dd class="tag-source">
245
+ <ul class="dummy">
246
+ <li>
247
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
248
+ <a href="tasks_audioCalibrator.js.html#line28">line 28</a>
249
+ </li>
250
+ </ul>
251
+ </dd>
252
+ </dl>
253
+
254
+ <h4 class="name" id="numSuccessfulCaptured">
255
+ <span class="type-signature">(protected) </span>numSuccessfulCaptured<span
256
+ class="type-signature"
257
+ ></span>
258
+ </h4>
259
+
260
+ <dl class="details">
261
+ <dt class="tag-source">Source:</dt>
262
+ <dd class="tag-source">
263
+ <ul class="dummy">
264
+ <li>
265
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
266
+ <a href="tasks_audioCalibrator.js.html#line31">line 31</a>
267
+ </li>
268
+ </ul>
269
+ </dd>
270
+ </dl>
271
+
272
+ <h4 class="name" id="setSamplingRates">
273
+ <span class="type-signature"></span>setSamplingRates<span class="type-signature"></span>
274
+ </h4>
275
+
276
+ <div class="description">
277
+ Set the sampling rate to the value received from the listener
278
+ </div>
279
+
280
+ <dl class="details">
281
+ <dt class="tag-source">Source:</dt>
282
+ <dd class="tag-source">
283
+ <ul class="dummy">
284
+ <li>
285
+ <a href="tasks_audioCalibrator.js.html">tasks/audioCalibrator.js</a>,
286
+ <a href="tasks_audioCalibrator.js.html#line111">line 111</a>
287
+ </li>
288
+ </ul>
289
+ </dd>
290
+ </dl>
291
+
292
+ <h4 class="name" id="setSinkSamplingRate">
293
+ <span class="type-signature"></span>setSinkSamplingRate<span
294
+ class="type-signature"
295
+ ></span>
296
+ </h4>
297
+
298
+ <div class="description">
299
+ Public method to set the sampling rate used by the capture device
300
+ </div>
301
+
302
+ <dl class="details">
303
+ <dt class="tag-overrides">Overrides:</dt>
304
+ <dd class="tag-overrides">
305
+ <ul class="dummy">
306
+ <li>
307
+ <a href="AudioRecorder.html#setSinkSamplingRate"
308
+ >AudioRecorder#setSinkSamplingRate</a
309
+ >
310
+ </li>
311
+ </ul>
312
+ </dd>
313
+
314
+ <dt class="tag-source">Source:</dt>
315
+ <dd class="tag-source">
316
+ <ul class="dummy">
317
+ <li>
318
+ <a href="tasks_audioRecorder.js.html">tasks/audioRecorder.js</a>,
319
+ <a href="tasks_audioRecorder.js.html#line121">line 121</a>
320
+ </li>
321
+ </ul>
322
+ </dd>
323
+ </dl>
324
+
325
+ <h4 class="name" id="startRecording">
326
+ <span class="type-signature"></span>startRecording<span class="type-signature"></span>
327
+ </h4>
328
+
329
+ <div class="description">Public method to start the recording process.</div>
330
+
331
+ <dl class="details">
332
+ <dt class="tag-overrides">Overrides:</dt>
333
+ <dd class="tag-overrides">
334
+ <ul class="dummy">
335
+ <li>
336
+ <a href="AudioRecorder.html#startRecording">AudioRecorder#startRecording</a>
337
+ </li>
338
+ </ul>
339
+ </dd>
340
+
341
+ <dt class="tag-source">Source:</dt>
342
+ <dd class="tag-source">
343
+ <ul class="dummy">
344
+ <li>
345
+ <a href="tasks_audioRecorder.js.html">tasks/audioRecorder.js</a>,
346
+ <a href="tasks_audioRecorder.js.html#line73">line 73</a>
347
+ </li>
348
+ </ul>
349
+ </dd>
350
+ </dl>
351
+
352
+ <h4 class="name" id="stopRecording">
353
+ <span class="type-signature"></span>stopRecording<span class="type-signature"></span>
354
+ </h4>
355
+
356
+ <div class="description">Method to stop the recording process.</div>
357
+
358
+ <dl class="details">
359
+ <dt class="tag-overrides">Overrides:</dt>
360
+ <dd class="tag-overrides">
361
+ <ul class="dummy">
362
+ <li>
363
+ <a href="AudioRecorder.html#stopRecording">AudioRecorder#stopRecording</a>
364
+ </li>
365
+ </ul>
366
+ </dd>
367
+
368
+ <dt class="tag-source">Source:</dt>
369
+ <dd class="tag-source">
370
+ <ul class="dummy">
371
+ <li>
372
+ <a href="tasks_audioRecorder.js.html">tasks/audioRecorder.js</a>,
373
+ <a href="tasks_audioRecorder.js.html#line88">line 88</a>
374
+ </li>
375
+ </ul>
376
+ </dd>
377
+ </dl>
378
+ </article>
379
+ </section>
380
+ </div>
381
+
382
+ <nav>
383
+ <h2><a href="index.html">Home</a></h2>
384
+ <h3>Classes</h3>
385
+ <ul>
386
+ <li><a href="AudioCalibrator.html">AudioCalibrator</a></li>
387
+ <li><a href="AudioPeer.html">AudioPeer</a></li>
388
+ <li><a href="AudioRecorder.html">AudioRecorder</a></li>
389
+ <li><a href="ImpulseResponse.html">ImpulseResponse</a></li>
390
+ <li><a href="Listener.html">Listener</a></li>
391
+ <li><a href="MlsGenInterface.html">MlsGenInterface</a></li>
392
+ <li><a href="MyEventEmitter.html">MyEventEmitter</a></li>
393
+ <li><a href="PythonServerAPI.html">PythonServerAPI</a></li>
394
+ <li><a href="Speaker.html">Speaker</a></li>
395
+ <li><a href="Volume.html">Volume</a></li>
396
+ </ul>
397
+ <h3>Global</h3>
398
+ <ul>
399
+ <li><a href="global.html#csvToArray">csvToArray</a></li>
400
+ <li><a href="global.html#saveToCSV">saveToCSV</a></li>
401
+ <li><a href="global.html#sleep">sleep</a></li>
402
+ </ul>
403
+ </nav>
404
+
405
+ <br class="clear" />
406
+
407
+ <footer>
408
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri
409
+ Jul 29 2022 15:09:48 GMT-0400 (Eastern Daylight Time)
410
+ </footer>
411
+
412
+ <script>
413
+ prettyPrint();
414
+ </script>
415
+ <script src="scripts/linenumber.js"></script>
416
+ </body>
417
+ </html>
@@ -0,0 +1,251 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>JSDoc: Class: AudioPeer</title>
6
+
7
+ <script src="scripts/prettify/prettify.js"></script>
8
+ <script src="scripts/prettify/lang-css.js"></script>
9
+ <!--[if lt IE 9]>
10
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11
+ <![endif]-->
12
+ <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css" />
13
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css" />
14
+ </head>
15
+
16
+ <body>
17
+ <div id="main">
18
+ <h1 class="page-title">Class: AudioPeer</h1>
19
+
20
+ <section>
21
+ <header>
22
+ <h2>
23
+ <span class="attribs"><span class="type-signature"></span></span>AudioPeer<span
24
+ class="signature"
25
+ >(params)</span
26
+ ><span class="type-signature"></span>
27
+ </h2>
28
+
29
+ <div class="class-description">
30
+ The first layer of abstraction on the PeerJS library. It meant to be extended by the two
31
+ seperate client classes, Speaker and Listener. It implements the shared methods and
32
+ properties of both classes.
33
+ </div>
34
+ </header>
35
+
36
+ <article>
37
+ <div class="container-overview">
38
+ <h2>Constructor</h2>
39
+
40
+ <h4 class="name" id="AudioPeer">
41
+ <span class="type-signature"></span>new AudioPeer<span class="signature"
42
+ >(params)</span
43
+ ><span class="type-signature"></span>
44
+ </h4>
45
+
46
+ <div class="description">
47
+ Creates an instance of AudioPeer Takes the url of the current site and a target
48
+ element where html elements will be appended.
49
+ </div>
50
+
51
+ <h5>Parameters:</h5>
52
+
53
+ <table class="params">
54
+ <thead>
55
+ <tr>
56
+ <th>Name</th>
57
+
58
+ <th>Type</th>
59
+
60
+ <th class="last">Description</th>
61
+ </tr>
62
+ </thead>
63
+
64
+ <tbody>
65
+ <tr>
66
+ <td class="name"><code>params</code></td>
67
+
68
+ <td class="type">
69
+ <span class="param-type"
70
+ ><a href="global.html#initParameters">initParameters</a></span
71
+ >
72
+ </td>
73
+
74
+ <td class="description last">see type definition for initParameters</td>
75
+ </tr>
76
+ </tbody>
77
+ </table>
78
+
79
+ <dl class="details">
80
+ <dt class="tag-source">Source:</dt>
81
+ <dd class="tag-source">
82
+ <ul class="dummy">
83
+ <li>
84
+ <a href="peer-connection_audioPeer.js.html">peer-connection/audioPeer.js</a>,
85
+ <a href="peer-connection_audioPeer.js.html#line23">line 23</a>
86
+ </li>
87
+ </ul>
88
+ </dd>
89
+ </dl>
90
+ </div>
91
+
92
+ <h3 class="subsection-title">Members</h3>
93
+
94
+ <h4 class="name" id="displayUpdate">
95
+ <span class="type-signature"></span>displayUpdate<span class="type-signature"></span>
96
+ </h4>
97
+
98
+ <div class="description">Helper method to display information to DOM element</div>
99
+
100
+ <dl class="details">
101
+ <dt class="tag-source">Source:</dt>
102
+ <dd class="tag-source">
103
+ <ul class="dummy">
104
+ <li>
105
+ <a href="peer-connection_audioPeer.js.html">peer-connection/audioPeer.js</a>,
106
+ <a href="peer-connection_audioPeer.js.html#line59">line 59</a>
107
+ </li>
108
+ </ul>
109
+ </dd>
110
+ </dl>
111
+
112
+ <h4 class="name" id="onPeerClose">
113
+ <span class="type-signature"></span>onPeerClose<span class="type-signature"></span>
114
+ </h4>
115
+
116
+ <div class="description">
117
+ Callback method that cleans up after peer connection is closed
118
+ </div>
119
+
120
+ <dl class="details">
121
+ <dt class="tag-source">Source:</dt>
122
+ <dd class="tag-source">
123
+ <ul class="dummy">
124
+ <li>
125
+ <a href="peer-connection_audioPeer.js.html">peer-connection/audioPeer.js</a>,
126
+ <a href="peer-connection_audioPeer.js.html#line90">line 90</a>
127
+ </li>
128
+ </ul>
129
+ </dd>
130
+ </dl>
131
+
132
+ <h4 class="name" id="onPeerDisconnected">
133
+ <span class="type-signature"></span>onPeerDisconnected<span
134
+ class="type-signature"
135
+ ></span>
136
+ </h4>
137
+
138
+ <div class="description">
139
+ Callback method for when a peer connection is lost saves the last peer id, last server
140
+ id, and attempts to reconnect
141
+ </div>
142
+
143
+ <dl class="details">
144
+ <dt class="tag-source">Source:</dt>
145
+ <dd class="tag-source">
146
+ <ul class="dummy">
147
+ <li>
148
+ <a href="peer-connection_audioPeer.js.html">peer-connection/audioPeer.js</a>,
149
+ <a href="peer-connection_audioPeer.js.html#line77">line 77</a>
150
+ </li>
151
+ </ul>
152
+ </dd>
153
+ </dl>
154
+
155
+ <h4 class="name" id="onPeerError">
156
+ <span class="type-signature"></span>onPeerError<span class="type-signature"></span>
157
+ </h4>
158
+
159
+ <div class="description">Helper method for when an error occurs</div>
160
+
161
+ <dl class="details">
162
+ <dt class="tag-source">Source:</dt>
163
+ <dd class="tag-source">
164
+ <ul class="dummy">
165
+ <li>
166
+ <a href="peer-connection_audioPeer.js.html">peer-connection/audioPeer.js</a>,
167
+ <a href="peer-connection_audioPeer.js.html#line99">line 99</a>
168
+ </li>
169
+ </ul>
170
+ </dd>
171
+ </dl>
172
+
173
+ <h4 class="name" id="parseURLSearchParams">
174
+ <span class="type-signature"></span>parseURLSearchParams<span
175
+ class="type-signature"
176
+ ></span>
177
+ </h4>
178
+
179
+ <div class="description">Helper method that converts url paramters to an object</div>
180
+
181
+ <dl class="details">
182
+ <dt class="tag-source">Source:</dt>
183
+ <dd class="tag-source">
184
+ <ul class="dummy">
185
+ <li>
186
+ <a href="peer-connection_audioPeer.js.html">peer-connection/audioPeer.js</a>,
187
+ <a href="peer-connection_audioPeer.js.html#line108">line 108</a>
188
+ </li>
189
+ </ul>
190
+ </dd>
191
+ </dl>
192
+
193
+ <h4 class="name" id="queryStringFromObject">
194
+ <span class="type-signature"></span>queryStringFromObject<span
195
+ class="type-signature"
196
+ ></span>
197
+ </h4>
198
+
199
+ <div class="description">Helper method that converts an object to a query string</div>
200
+
201
+ <dl class="details">
202
+ <dt class="tag-source">Source:</dt>
203
+ <dd class="tag-source">
204
+ <ul class="dummy">
205
+ <li>
206
+ <a href="peer-connection_audioPeer.js.html">peer-connection/audioPeer.js</a>,
207
+ <a href="peer-connection_audioPeer.js.html#line118">line 118</a>
208
+ </li>
209
+ </ul>
210
+ </dd>
211
+ </dl>
212
+ </article>
213
+ </section>
214
+ </div>
215
+
216
+ <nav>
217
+ <h2><a href="index.html">Home</a></h2>
218
+ <h3>Classes</h3>
219
+ <ul>
220
+ <li><a href="AudioCalibrator.html">AudioCalibrator</a></li>
221
+ <li><a href="AudioPeer.html">AudioPeer</a></li>
222
+ <li><a href="AudioRecorder.html">AudioRecorder</a></li>
223
+ <li><a href="ImpulseResponse.html">ImpulseResponse</a></li>
224
+ <li><a href="Listener.html">Listener</a></li>
225
+ <li><a href="MlsGenInterface.html">MlsGenInterface</a></li>
226
+ <li><a href="MyEventEmitter.html">MyEventEmitter</a></li>
227
+ <li><a href="PythonServerAPI.html">PythonServerAPI</a></li>
228
+ <li><a href="Speaker.html">Speaker</a></li>
229
+ <li><a href="Volume.html">Volume</a></li>
230
+ </ul>
231
+ <h3>Global</h3>
232
+ <ul>
233
+ <li><a href="global.html#csvToArray">csvToArray</a></li>
234
+ <li><a href="global.html#saveToCSV">saveToCSV</a></li>
235
+ <li><a href="global.html#sleep">sleep</a></li>
236
+ </ul>
237
+ </nav>
238
+
239
+ <br class="clear" />
240
+
241
+ <footer>
242
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.10</a> on Fri
243
+ Jul 29 2022 15:09:48 GMT-0400 (Eastern Daylight Time)
244
+ </footer>
245
+
246
+ <script>
247
+ prettyPrint();
248
+ </script>
249
+ <script src="scripts/linenumber.js"></script>
250
+ </body>
251
+ </html>