speaker-calibration 2.2.228 → 2.2.230

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speaker-calibration",
3
- "version": "2.2.228",
3
+ "version": "2.2.230",
4
4
  "description": "Speaker calibration library for auditory testing",
5
5
  "main": "dist/main.js",
6
6
  "directories": {
@@ -421,11 +421,14 @@ export class PhonePeer {
421
421
  const display = document.getElementById('display');
422
422
  if (display) {
423
423
  display.style.textAlign = 'left';
424
+ display.style.fontSize = '11px';
424
425
  }
425
426
 
426
427
  // set the text of the html elements
427
428
  recordingInProgressElement.innerText = recordingInProgress;
428
429
  allowMicrophoneElement.innerText = allowMicrophone;
430
+ allowMicrophoneElement.style.marginBottom = '0.5rem';
431
+ allowMicrophoneElement.style.fontSize = '17px';
429
432
 
430
433
  recordingInProgressElement.style.whiteSpace = 'nowrap';
431
434
  recordingInProgressElement.style.fontWeight = 'bold';
@@ -444,6 +447,7 @@ export class PhonePeer {
444
447
  message.style.lineHeight = '2.5rem';
445
448
  const p = document.createElement('p');
446
449
  p.innerText = backToExperimentWindow;
450
+ p.style.fontSize = '17px';
447
451
  message.appendChild(p);
448
452
 
449
453
  await this.listener.startCalibration();
@@ -55,7 +55,6 @@ class Listener extends AudioPeer {
55
55
  };
56
56
 
57
57
  sendSamplingRate = sampleRate => {
58
- this.displayUpdate('Listener - sendSamplingRate');
59
58
  this.connectionManager.send({
60
59
  name: 'SoundCalibration',
61
60
  payload: {
@@ -66,7 +65,6 @@ class Listener extends AudioPeer {
66
65
  };
67
66
 
68
67
  sendSampleSize = sampleSize => {
69
- this.displayUpdate('Listener - sendSampleSize');
70
68
  this.connectionManager.send({
71
69
  name: 'SoundCalibration',
72
70
  payload: {
@@ -77,7 +75,6 @@ class Listener extends AudioPeer {
77
75
  };
78
76
 
79
77
  sendFlags = flags => {
80
- this.displayUpdate('Listener - sendFlags');
81
78
  this.connectionManager.send({
82
79
  name: 'SoundCalibration',
83
80
  payload: {
@@ -88,7 +85,6 @@ class Listener extends AudioPeer {
88
85
  };
89
86
 
90
87
  sendPermissionStatus = status => {
91
- // this.displayUpdate('Listener - sendPermissionStatus');
92
88
  this.connectionManager.send({
93
89
  name: 'SoundCalibration',
94
90
  payload: {
@@ -142,10 +138,6 @@ class Listener extends AudioPeer {
142
138
  console.log(track);
143
139
  const capabilities = track.getCapabilities();
144
140
 
145
- this.displayUpdate(
146
- `Listener Track Capabilities - ${JSON.stringify(capabilities, undefined, 2)}`
147
- );
148
-
149
141
  const constraints = track.getConstraints();
150
142
 
151
143
  if (capabilities.echoCancellation) {
@@ -164,8 +156,6 @@ class Listener extends AudioPeer {
164
156
  constraints.channelCount = 1;
165
157
  }
166
158
 
167
- this.displayUpdate(`Listener Track Constraints - ${JSON.stringify(constraints, undefined, 2)}`);
168
-
169
159
  // await the promise
170
160
  try {
171
161
  await track.applyConstraints(constraints);
@@ -239,7 +229,7 @@ class Listener extends AudioPeer {
239
229
  };
240
230
 
241
231
  openAudioStream = async () => {
242
- this.displayUpdate('Listener - openAudioStream');
232
+ this.displayUpdate('Listener - openAudioStream', false);
243
233
  const mobileOS = this.getMobileOS();
244
234
  if (process.env.NODE_ENV !== 'development' && mobileOS !== 'iOS') {
245
235
  const err = new UnsupportedDeviceError(`${mobileOS} is not supported`);
@@ -261,13 +251,6 @@ class Listener extends AudioPeer {
261
251
  //audio: {echoCancellation: false, noiseSuppression: false, autoGainControl: false, deviceId: {exact: await this.getDeviceIdByLabel(this.microphoneDeviceId) }},
262
252
  })
263
253
  .then(stream => {
264
- this.displayUpdate(
265
- `Listener Track settings before applied constraints - ${JSON.stringify(
266
- stream.getAudioTracks()[0].getSettings(),
267
- undefined,
268
- 2
269
- )}`
270
- );
271
254
  this.applyHQTrackConstraints(stream)
272
255
  .then(settings => {
273
256
  console.log(settings);
@@ -163,6 +163,7 @@ class Speaker extends AudioPeer {
163
163
 
164
164
  await speaker.connectionManager.waitForPeerConnection();
165
165
  await speaker.connectionManager.resolveWhenHandshakeReceived();
166
+ speaker.connectionManager.sendPageTitle('EasyEyes Microphone');
166
167
 
167
168
  // Send connection parameters to the listener
168
169
  speaker.connectionManager.send(speaker.prepareConnectionParams());